From 0f3a53e5d477ca2c422ed58a65bd368d1eb0a5b2 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 18 Jan 2022 15:02:56 -0500 Subject: feat: stabilize test steps API (#13400) --- runtime/js/40_testing.js | 12 ------------ runtime/js/99_main.js | 3 --- 2 files changed, 15 deletions(-) (limited to 'runtime/js') 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} */ 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( -- cgit v1.2.3