lion/packages/singleton-manager/test/singleton-demo.test.js
Thomas Allmer 7f49f2c6a6 feat: manager to support single instances with nested npm installations
BREAKING CHANGE: add singleton-manager
2020-05-18 15:25:21 +02:00

15 lines
687 B
JavaScript

import { expect } from '@open-wc/testing';
import '../demo/singleton/overlayCompatibility.js';
import { overlays } from '../demo/singleton/node_modules/overlays/instance.js';
import { overlays as overlays2 } from '../demo/singleton/node_modules/page-b/node_modules/overlays/instance.js';
describe('singleton-demo', () => {
it('uses the compatibility overrides', async () => {
// Note: we can not test how it would work without applying the compatibility layer
// as it is a global side effect and there is only one karma instance running.
expect(overlays.name).to.equal('Compatible from App');
expect(overlays2.name).to.equal('Compatible from App');
});
});