Skip to content

Commit 9bdb26e

Browse files
committed
Bug 1554951 [wpt PR 17043] - wake-lock: Fix invalid types test in wakelock-type.https.any.js, a=testonly
Automatic update from web-platform-tests wake-lock: Fix invalid types test in wakelock-type.https.any.js (#17043) During #17019's review process, `async` was dropped from a promise_test(), and we ended up not returning a Promise there at all. Fix the test by wrapping the `invalidTypes.map()` call in `Promise.all()`. -- wp5At-commits: 13653dfec844625b952a4a06dcc3d0ee62c01dde wpt-pr: 17043 UltraBlame original commit: 2e0eab1eb577da837fce4c973813f6e175b50ac5
1 parent c292329 commit 9bdb26e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

testing/web-platform/tests/wake-lock/wakelock-type.https.any.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ promise_test(t => {
1313
"",
1414
true
1515
];
16-
invalidTypes.map(async invalidType => {
17-
await promise_rejects(t, new TypeError(), WakeLock.request(invalidType));
18-
});
16+
return Promise.all(invalidTypes.map(invalidType => {
17+
return promise_rejects(t, new TypeError(), WakeLock.request(invalidType));
18+
}));
1919
}, "'TypeError' is thrown when set an invalid wake lock type");

0 commit comments

Comments
 (0)