From 1587387bccb6dbecd85f5141dd7543f013d47cd8 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 6 May 2024 21:06:01 -0400 Subject: chore(test): move npm registries to separate servers and to the `tests/registry` folder (#23717) 1. Moves the npm registries to their own dedicated ports. 2. Moves the data files out of `tests/testdata/npm/registry` to `tests/registry/npm`. --- .../@denotest/jsx-with-no-pragmas/1.0.0/foo.jsx | 5 +++ .../@denotest/jsx-with-no-pragmas/1.0.0/foo.tsx | 5 +++ .../jsr/@denotest/jsx-with-no-pragmas/1.0.0/mod.ts | 7 ++++ .../@denotest/jsx-with-no-pragmas/1.0.0_meta.json | 40 ++++++++++++++++++++++ .../jsr/@denotest/jsx-with-no-pragmas/meta.json | 5 +++ 5 files changed, 62 insertions(+) create mode 100644 tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.jsx create mode 100644 tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.tsx create mode 100644 tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/mod.ts create mode 100644 tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0_meta.json create mode 100644 tests/registry/jsr/@denotest/jsx-with-no-pragmas/meta.json (limited to 'tests/registry/jsr/@denotest/jsx-with-no-pragmas') diff --git a/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.jsx b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.jsx new file mode 100644 index 000000000..ae310a74e --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.jsx @@ -0,0 +1,5 @@ +import { renderToString } from "npm:preact-render-to-string"; + +export default function render() { + return renderToString(
foo.jsx
); +} diff --git a/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.tsx b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.tsx new file mode 100644 index 000000000..021c2d49e --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/foo.tsx @@ -0,0 +1,5 @@ +import { renderToString } from "npm:preact-render-to-string"; + +export default function render() { + return renderToString(
foo.tsx
); +} diff --git a/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/mod.ts b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/mod.ts new file mode 100644 index 000000000..05c549f64 --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0/mod.ts @@ -0,0 +1,7 @@ +import renderJsx from "./foo.jsx"; +import renderTsx from "./foo.tsx"; + +export function render() { + console.log(renderJsx()); + console.log(renderTsx()); +} diff --git a/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0_meta.json b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0_meta.json new file mode 100644 index 000000000..417950442 --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/1.0.0_meta.json @@ -0,0 +1,40 @@ +{ + "exports": { + ".": "./mod.ts" + }, + "moduleGraph1": { + "/mod.ts": { + "dependencies": [{ + "type": "static", + "kind": "import", + "range": [[0, 0], [0, 35]], + "specifier": "./foo.jsx", + "specifierRange": [[0, 22], [0, 33]] + }, { + "type": "static", + "kind": "import", + "range": [[1, 0], [1, 25]], + "specifier": "./foo.tsx", + "specifierRange": [[1, 22], [1, 33]] + }] + }, + "/foo.jsx": { + "dependencies": [{ + "type": "static", + "kind": "import", + "range": [[0, 0], [0, 60]], + "specifier": "npm:preact-render-to-string", + "specifierRange": [[0, 32], [0, 60]] + }] + }, + "/foo.tsx": { + "dependencies": [{ + "type": "static", + "kind": "import", + "range": [[0, 0], [0, 60]], + "specifier": "npm:preact-render-to-string", + "specifierRange": [[0, 32], [0, 60]] + }] + } + } +} diff --git a/tests/registry/jsr/@denotest/jsx-with-no-pragmas/meta.json b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/meta.json new file mode 100644 index 000000000..02601e4d0 --- /dev/null +++ b/tests/registry/jsr/@denotest/jsx-with-no-pragmas/meta.json @@ -0,0 +1,5 @@ +{ + "versions": { + "1.0.0": {} + } +} -- cgit v1.2.3