Skip to content

Commit

Permalink
add test identical logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tiendt committed Aug 4, 2017
1 parent 2ac30b5 commit 9004f6f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/functional/test-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@ describe('Logging', () => {
let sandbox;
let iframe;
let element;
let element1;
let element2;

beforeEach(() => {
sandbox = sinon.sandbox.create();
Expand All @@ -703,6 +705,15 @@ describe('Logging', () => {
iframe.contentWindow.document.body.appendChild(element);
expect(user(element).suffix_).to.equal(USER_ERROR_EMBED_SENTINEL);
});

it('should not create extra identical logs', () => {
element1 = document.createElement('embed_1');
element2 = document.createElement('embed_2');
iframe.contentWindow.document.body.appendChild(element1);
iframe.contentWindow.document.body.appendChild(element2);
expect(user()).to.equal(user(this.element));
expect(user(element1)).to.equal(user(element2));
});
});
});

0 comments on commit 9004f6f

Please sign in to comment.