Skip to content

Commit 7c3c483

Browse files
committed
Remove useless promise wrapper in functional tests
The promise returned by `requestTestPage` already covers waiting for the end of async callback.
1 parent 90d4b21 commit 7c3c483

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

test/functional.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,20 +1248,17 @@ module.exports = {
12481248
);
12491249

12501250
// Test that the generated scripts work fine
1251-
await new Promise(resolve => {
1252-
testSetup.requestTestPage(
1253-
browser,
1254-
path.join(config.getContext(), 'www'),
1255-
[
1256-
'build/runtime.js',
1257-
`build/${scriptName}`,
1258-
],
1259-
async({ page }) => {
1260-
expect(await page.evaluate(() => document.body.textContent)).to.contains('[1,2,3,4]');
1261-
resolve();
1262-
}
1263-
);
1264-
});
1251+
await testSetup.requestTestPage(
1252+
browser,
1253+
path.join(config.getContext(), 'www'),
1254+
[
1255+
'build/runtime.js',
1256+
`build/${scriptName}`,
1257+
],
1258+
async({ page }) => {
1259+
expect(await page.evaluate(() => document.body.textContent)).to.contains('[1,2,3,4]');
1260+
}
1261+
);
12651262
}
12661263

12671264
done();

0 commit comments

Comments
 (0)