Skip to content

Commit

Permalink
attempt fix ampproject#3
Browse files Browse the repository at this point in the history
  • Loading branch information
William Chou committed Dec 8, 2017
1 parent 01bce3e commit 2006c8a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions test/functional/test-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -1473,10 +1473,7 @@ describe('Resources discoverWork', () => {
resources.discoverWork_();

expect(resource1.build).to.be.calledOnce;
return Promise.resolve().then(() => {
// Pass should be scheduled after successful resource build.
expect(resources.schedulePass).to.be.calledWithExactly();
});
return expect(resources.schedulePass).to.eventually.be.calledWithExactly();
});

it('should build resource when not built and before doc ready', () => {
Expand All @@ -1491,10 +1488,7 @@ describe('Resources discoverWork', () => {
resources.discoverWork_();

expect(resource1.build).to.be.calledOnce;
return Promise.resolve().then(() => {
// Pass should be scheduled after successful resource build.
expect(resources.schedulePass).to.be.calledWithExactly();
});
return expect(resources.schedulePass).to.eventually.be.calledWithExactly();
});

it('should NOT build non-prerenderable resources in prerender', () => {
Expand Down

0 comments on commit 2006c8a

Please sign in to comment.