From 2006c8a3cfe10fc04e54ed9acf8fb134eb6df405 Mon Sep 17 00:00:00 2001 From: William Chou Date: Fri, 8 Dec 2017 18:40:17 -0500 Subject: [PATCH] attempt fix #3 --- test/functional/test-resources.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/functional/test-resources.js b/test/functional/test-resources.js index c7f80440181f9..8252c4dc5d786 100644 --- a/test/functional/test-resources.js +++ b/test/functional/test-resources.js @@ -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', () => { @@ -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', () => {