Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima Voytenko committed Feb 23, 2021
1 parent 15d8080 commit d79a5e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/test-custom-element-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,15 +471,15 @@ describes.realWin('CustomElement V1', {amp: true}, (env) => {
builderMock.expects('scheduleAsap').atLeast(1);
});

it('should force build and immediately resolve if not loading', async () => {
it('should force build and wait for whenLoaded even if not marked as loading', async () => {
const promise = element.ensureLoaded();

doc.body.appendChild(element);
element.upgrade(TestElement);

await element.buildInternal();
await promise;
expect(ensureLoadedStub).to.not.be.called;
expect(ensureLoadedStub).to.be.calledOnce;

await element.whenLoaded();
});
Expand Down

0 comments on commit d79a5e7

Please sign in to comment.