summaryrefslogtreecommitdiff
path: root/runtime/js/40_testing.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-01-27 16:27:22 +0100
committerGitHub <noreply@github.com>2022-01-27 16:27:22 +0100
commitf248e6f1778dc26db91d3322de2ecca5d1aa9866 (patch)
tree46b1ff59091cc8d31ff67427173d3a0148734007 /runtime/js/40_testing.js
parent382a978859a7a7a4351542be818bb2e59523429c (diff)
Revert "refactor: update runtime code for primordial checks for "instanceof" (#13497)" (#13511)
This reverts commit 884143218fad0e18f7553aaf079d52de703f7601.
Diffstat (limited to 'runtime/js/40_testing.js')
-rw-r--r--runtime/js/40_testing.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/runtime/js/40_testing.js b/runtime/js/40_testing.js
index 62eb1e9a9..5979a523e 100644
--- a/runtime/js/40_testing.js
+++ b/runtime/js/40_testing.js
@@ -9,15 +9,14 @@
const { serializePermissions } = window.__bootstrap.permissions;
const { assert } = window.__bootstrap.util;
const {
- AggregateErrorPrototype,
+ AggregateError,
ArrayPrototypeFilter,
ArrayPrototypePush,
ArrayPrototypeShift,
ArrayPrototypeSome,
DateNow,
Error,
- FunctionPrototype,
- ObjectPrototypeIsPrototypeOf,
+ Function,
Number,
ObjectKeys,
Promise,
@@ -531,7 +530,7 @@ finishing test case.`;
}
function formatError(error) {
- if (ObjectPrototypeIsPrototypeOf(AggregateErrorPrototype, error)) {
+ if (error instanceof AggregateError) {
const message = error
.errors
.map((error) =>
@@ -985,7 +984,7 @@ finishing test case.`;
/** @returns {TestStepDefinition} */
function getDefinition() {
if (typeof nameOrTestDefinition === "string") {
- if (!(ObjectPrototypeIsPrototypeOf(FunctionPrototype, fn))) {
+ if (!(fn instanceof Function)) {
throw new TypeError("Expected function for second argument.");
}
return {