summaryrefslogtreecommitdiff
path: root/runtime/js
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-01-18 15:02:56 -0500
committerGitHub <noreply@github.com>2022-01-18 15:02:56 -0500
commit0f3a53e5d477ca2c422ed58a65bd368d1eb0a5b2 (patch)
tree43e8199a4b5831c01bfefd439b53a2098ee4805d /runtime/js
parentce52bfc59c6700e64dbe941485d078ceb9dd2158 (diff)
feat: stabilize test steps API (#13400)
Diffstat (limited to 'runtime/js')
-rw-r--r--runtime/js/40_testing.js12
-rw-r--r--runtime/js/99_main.js3
2 files changed, 0 insertions, 15 deletions
diff --git a/runtime/js/40_testing.js b/runtime/js/40_testing.js
index 118db5db1..92d7fe491 100644
--- a/runtime/js/40_testing.js
+++ b/runtime/js/40_testing.js
@@ -29,7 +29,6 @@
RegExpPrototypeTest,
SymbolToStringTag,
} = window.__bootstrap.primordials;
- let testStepsEnabled = false;
const opSanitizerDelayResolveQueue = [];
@@ -746,12 +745,6 @@ finishing test case.`;
* @param fn {(t: TestContext) => void | Promise<void>}
*/
async step(nameOrTestDefinition, fn) {
- if (!testStepsEnabled) {
- throw new Error(
- "Test steps are unstable. The --unstable flag must be provided.",
- );
- }
-
if (parentStep.finalized) {
throw new Error(
"Cannot run test step after parent scope has finished execution. " +
@@ -890,14 +883,9 @@ finishing test case.`;
return value == null ? defaultValue : value;
}
- function enableTestSteps() {
- testStepsEnabled = true;
- }
-
window.__bootstrap.internals = {
...window.__bootstrap.internals ?? {},
runTests,
- enableTestSteps,
};
window.__bootstrap.testing = {
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 534a28733..0c5555dd0 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -214,9 +214,6 @@ delete Object.prototype.__proto__;
runtimeOptions.v8Version,
runtimeOptions.tsVersion,
);
- if (runtimeOptions.unstableFlag) {
- internals.enableTestSteps();
- }
build.setBuildInfo(runtimeOptions.target);
util.setLogDebug(runtimeOptions.debugFlag, source);
const prepareStackTrace = core.createPrepareStackTrace(