From ac06c354783a7cfc119e204ae522b891796bed94 Mon Sep 17 00:00:00 2001 From: Andre Wiggins Date: Wed, 15 Nov 2023 15:24:18 -1000 Subject: [PATCH] Clean up old tests --- .../react-transform/test/node/index.test.tsx | 64 +------------------ 1 file changed, 2 insertions(+), 62 deletions(-) diff --git a/packages/react-transform/test/node/index.test.tsx b/packages/react-transform/test/node/index.test.tsx index 170ed3499..f7a522438 100644 --- a/packages/react-transform/test/node/index.test.tsx +++ b/packages/react-transform/test/node/index.test.tsx @@ -138,7 +138,7 @@ function runGeneratedTestCases(config: TestCaseConfig) { }); } - describe.only("object method components", () => { + describe("object method components", () => { runTestCases(config, objMethodComp(codeConfig)); }); @@ -170,7 +170,7 @@ function runGeneratedTestCases(config: TestCaseConfig) { }); } -describe.only("React Signals Babel Transform", () => { +describe("React Signals Babel Transform", () => { describe("auto mode transforms", () => { runGeneratedTestCases({ useValidAutoMode: true, @@ -418,46 +418,6 @@ describe("React Signals Babel Transform", () => { runTest(inputCode, expectedOutput, { mode: "manual" }); }); - - it("transforms object properties assigned to functions with leading opt-in JSDoc comments", () => { - const inputCode = ` - var obj = {}; - /** @trackSignals */ - obj.a = () => {}; - /** @trackSignals */ - obj.b = function () {}; - /** @trackSignals */ - obj["c"] = function () {}; - `; - - const expectedOutput = ` - import { useSignals as _useSignals } from "@preact/signals-react/runtime"; - var obj = {}; - /** @trackSignals */ - obj.a = () => { - var _effect = _useSignals(); - try {} finally { - _effect.f(); - } - }; - /** @trackSignals */ - obj.b = function () { - var _effect2 = _useSignals(); - try {} finally { - _effect2.f(); - } - }; - /** @trackSignals */ - obj["c"] = function () { - var _effect3 = _useSignals(); - try {} finally { - _effect3.f(); - } - }; - `; - - runTest(inputCode, expectedOutput, { mode: "manual" }); - }); }); describe("auto mode opt-out transformations", () => { @@ -499,26 +459,6 @@ describe("React Signals Babel Transform", () => { runTest(inputCode, expectedOutput, { mode: "auto" }); }); - - it("skips transforming object properties assigned to functions with leading opt-out JSDoc comments", () => { - const inputCode = ` - var obj = {}; - /** @noTrackSignals */ - obj.a = () =>
; - /** @noTrackSignals */ - obj.b = function () { - return
; - }; - /** @noTrackSignals */ - obj["c"] = function () { - return
; - }; - `; - - const expectedOutput = inputCode; - - runTest(inputCode, expectedOutput, { mode: "auto" }); - }); }); describe("auto mode no transformations", () => {