Co-authored-by: Mikhail Bashkirov <mikhail.bashkirov@ing.com> Co-authored-by: Thijs Louisse <thijs.louisse@ing.com> Co-authored-by: Joren Broekema <joren.broekema@ing.com> Co-authored-by: Gerjan van Geest <gerjan.van.geest@ing.com> Co-authored-by: Erik Kroes <erik.kroes@ing.com> Co-authored-by: Lars den Bakker <lars.den.bakker@ing.com>
22 lines
625 B
JavaScript
22 lines
625 B
JavaScript
/* eslint-disable no-unused-expressions, no-underscore-dangle */
|
|
import { expect } from '@open-wc/testing';
|
|
import sinon from 'sinon';
|
|
|
|
import { OverlaysManager } from '../src/OverlaysManager.js';
|
|
|
|
function createGlobalOverlayControllerMock() {
|
|
return {
|
|
sync: sinon.spy(),
|
|
update: sinon.spy(),
|
|
show: sinon.spy(),
|
|
hide: sinon.spy(),
|
|
};
|
|
}
|
|
|
|
describe('OverlaysManager', () => {
|
|
it('returns the newly added overlay', () => {
|
|
const myOverlays = new OverlaysManager();
|
|
const myController = createGlobalOverlayControllerMock();
|
|
expect(myOverlays.add(myController)).to.equal(myController);
|
|
});
|
|
});
|