diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-02-07 13:54:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-07 13:54:32 +0100 |
commit | bf22f114a6e049744866ebaba48faec2cb86549b (patch) | |
tree | ea6814e51bade2355144546f21178f54811a57f2 /runtime/js/40_testing.js | |
parent | 9c7ed1c98b75c3557ac9e269212dcf655f69c0a2 (diff) |
refactor: update runtime code for primordial check for iterators (#13510)
Diffstat (limited to 'runtime/js/40_testing.js')
-rw-r--r-- | runtime/js/40_testing.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/js/40_testing.js b/runtime/js/40_testing.js index 62eb1e9a9..5ff5c6e15 100644 --- a/runtime/js/40_testing.js +++ b/runtime/js/40_testing.js @@ -24,6 +24,7 @@ RegExp, RegExpPrototypeTest, Set, + SafeArrayIterator, StringPrototypeEndsWith, StringPrototypeIncludes, StringPrototypeSlice, @@ -278,7 +279,10 @@ finishing test case.`; const post = core.resources(); - const allResources = new Set([...ObjectKeys(pre), ...ObjectKeys(post)]); + const allResources = new Set([ + ...new SafeArrayIterator(ObjectKeys(pre)), + ...new SafeArrayIterator(ObjectKeys(post)), + ]); const details = []; for (const resource of allResources) { @@ -322,7 +326,7 @@ finishing test case.`; }); try { - await fn(...params); + await fn(...new SafeArrayIterator(params)); } catch (err) { throw err; } finally { @@ -423,7 +427,7 @@ finishing test case.`; const token = pledgePermissions(permissions); try { - await fn(...params); + await fn(...new SafeArrayIterator(params)); } finally { restorePermissions(token); } |