From e18c2edfcbae5238c60b0bca804ee878f72172f7 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Fri, 6 Sep 2024 12:02:45 +0000 Subject: [PATCH] test(transformer): move RegExp transform conformance tests (#5536) Rename transform conformance RegExp test fixtures folder from "esbuild-tests" to "regexp", to reflect that not all these tests are copied from ESBuild. --- tasks/transform_conformance/oxc.snap.md | 2 +- tasks/transform_conformance/src/constants.rs | 4 ++-- .../fixtures}/all-regex-plugins-enabled-by-targets/input.js | 0 .../all-regex-plugins-enabled-by-targets/options.json | 0 .../fixtures}/all-regex-plugins-enabled-by-targets/output.js | 0 .../fixtures/regexp => regexp/test/fixtures}/igm/input.js | 0 .../fixtures/regexp => regexp/test/fixtures}/igm/options.json | 0 .../fixtures/regexp => regexp/test/fixtures}/igm/output.js | 0 .../test/fixtures}/transform-dotall-regex/input.js | 0 .../test/fixtures}/transform-dotall-regex/options.json | 0 .../test/fixtures}/transform-dotall-regex/output.js | 0 .../fixtures}/transform-named-capturing-groups-regex/input.js | 0 .../transform-named-capturing-groups-regex/options.json | 0 .../transform-named-capturing-groups-regex/output.js | 0 .../test/fixtures}/transform-sticky-regex/input.js | 0 .../test/fixtures}/transform-sticky-regex/options.json | 0 .../test/fixtures}/transform-sticky-regex/output.js | 0 .../test/fixtures}/transform-unicode-property-regex/input.js | 0 .../fixtures}/transform-unicode-property-regex/options.json | 0 .../test/fixtures}/transform-unicode-property-regex/output.js | 0 .../test/fixtures}/transform-unicode-regex/input.js | 0 .../test/fixtures}/transform-unicode-regex/options.json | 0 .../test/fixtures}/transform-unicode-regex/output.js | 0 .../test/fixtures}/transform-unicode-sets-regex/input.js | 0 .../test/fixtures}/transform-unicode-sets-regex/options.json | 0 .../test/fixtures}/transform-unicode-sets-regex/output.js | 0 26 files changed, 3 insertions(+), 3 deletions(-) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/all-regex-plugins-enabled-by-targets/input.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/all-regex-plugins-enabled-by-targets/options.json (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/all-regex-plugins-enabled-by-targets/output.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/igm/input.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/igm/options.json (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/igm/output.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-dotall-regex/input.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-dotall-regex/options.json (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-dotall-regex/output.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-named-capturing-groups-regex/input.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-named-capturing-groups-regex/options.json (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-named-capturing-groups-regex/output.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-sticky-regex/input.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-sticky-regex/options.json (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-sticky-regex/output.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-unicode-property-regex/input.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-unicode-property-regex/options.json (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-unicode-property-regex/output.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-unicode-regex/input.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-unicode-regex/options.json (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-unicode-regex/output.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-unicode-sets-regex/input.js (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-unicode-sets-regex/options.json (100%) rename tasks/transform_conformance/tests/{esbuild-tests/test/fixtures/regexp => regexp/test/fixtures}/transform-unicode-sets-regex/output.js (100%) diff --git a/tasks/transform_conformance/oxc.snap.md b/tasks/transform_conformance/oxc.snap.md index 40ce7d8c8d547..742ab0f03fd86 100644 --- a/tasks/transform_conformance/oxc.snap.md +++ b/tasks/transform_conformance/oxc.snap.md @@ -6,7 +6,7 @@ Passed: 21/49 * babel-plugin-transform-nullish-coalescing-operator * babel-plugin-transform-optional-catch-binding * babel-preset-typescript -* esbuild-tests +* regexp # babel-plugin-transform-arrow-functions (1/2) diff --git a/tasks/transform_conformance/src/constants.rs b/tasks/transform_conformance/src/constants.rs index 9d9cb81564a59..d4b1400c3b344 100644 --- a/tasks/transform_conformance/src/constants.rs +++ b/tasks/transform_conformance/src/constants.rs @@ -57,8 +57,8 @@ pub(crate) const PLUGINS: &[&str] = &[ // // Proposal // "babel-plugin-proposal-decorators", - // Tests port from esbuild - "esbuild-tests", + // RegExp tests ported from esbuild + a few additions + "regexp", ]; pub(crate) const PLUGINS_NOT_SUPPORTED_YET: &[&str] = &[ diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/all-regex-plugins-enabled-by-targets/input.js b/tasks/transform_conformance/tests/regexp/test/fixtures/all-regex-plugins-enabled-by-targets/input.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/all-regex-plugins-enabled-by-targets/input.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/all-regex-plugins-enabled-by-targets/input.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/all-regex-plugins-enabled-by-targets/options.json b/tasks/transform_conformance/tests/regexp/test/fixtures/all-regex-plugins-enabled-by-targets/options.json similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/all-regex-plugins-enabled-by-targets/options.json rename to tasks/transform_conformance/tests/regexp/test/fixtures/all-regex-plugins-enabled-by-targets/options.json diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/all-regex-plugins-enabled-by-targets/output.js b/tasks/transform_conformance/tests/regexp/test/fixtures/all-regex-plugins-enabled-by-targets/output.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/all-regex-plugins-enabled-by-targets/output.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/all-regex-plugins-enabled-by-targets/output.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/igm/input.js b/tasks/transform_conformance/tests/regexp/test/fixtures/igm/input.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/igm/input.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/igm/input.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/igm/options.json b/tasks/transform_conformance/tests/regexp/test/fixtures/igm/options.json similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/igm/options.json rename to tasks/transform_conformance/tests/regexp/test/fixtures/igm/options.json diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/igm/output.js b/tasks/transform_conformance/tests/regexp/test/fixtures/igm/output.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/igm/output.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/igm/output.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-dotall-regex/input.js b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-dotall-regex/input.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-dotall-regex/input.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-dotall-regex/input.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-dotall-regex/options.json b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-dotall-regex/options.json similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-dotall-regex/options.json rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-dotall-regex/options.json diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-dotall-regex/output.js b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-dotall-regex/output.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-dotall-regex/output.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-dotall-regex/output.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-named-capturing-groups-regex/input.js b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-named-capturing-groups-regex/input.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-named-capturing-groups-regex/input.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-named-capturing-groups-regex/input.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-named-capturing-groups-regex/options.json b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-named-capturing-groups-regex/options.json similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-named-capturing-groups-regex/options.json rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-named-capturing-groups-regex/options.json diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-named-capturing-groups-regex/output.js b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-named-capturing-groups-regex/output.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-named-capturing-groups-regex/output.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-named-capturing-groups-regex/output.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-sticky-regex/input.js b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-sticky-regex/input.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-sticky-regex/input.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-sticky-regex/input.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-sticky-regex/options.json b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-sticky-regex/options.json similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-sticky-regex/options.json rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-sticky-regex/options.json diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-sticky-regex/output.js b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-sticky-regex/output.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-sticky-regex/output.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-sticky-regex/output.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-property-regex/input.js b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-property-regex/input.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-property-regex/input.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-property-regex/input.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-property-regex/options.json b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-property-regex/options.json similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-property-regex/options.json rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-property-regex/options.json diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-property-regex/output.js b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-property-regex/output.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-property-regex/output.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-property-regex/output.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-regex/input.js b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-regex/input.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-regex/input.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-regex/input.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-regex/options.json b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-regex/options.json similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-regex/options.json rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-regex/options.json diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-regex/output.js b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-regex/output.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-regex/output.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-regex/output.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-sets-regex/input.js b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-sets-regex/input.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-sets-regex/input.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-sets-regex/input.js diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-sets-regex/options.json b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-sets-regex/options.json similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-sets-regex/options.json rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-sets-regex/options.json diff --git a/tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-sets-regex/output.js b/tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-sets-regex/output.js similarity index 100% rename from tasks/transform_conformance/tests/esbuild-tests/test/fixtures/regexp/transform-unicode-sets-regex/output.js rename to tasks/transform_conformance/tests/regexp/test/fixtures/transform-unicode-sets-regex/output.js