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`. --- tests/registry/jsr/@std/assert/0.220.1/assert.ts | 4 ++++ .../jsr/@std/assert/0.220.1/assert_equals.ts | 9 +++++++++ tests/registry/jsr/@std/assert/0.220.1/fail.ts | 5 +++++ tests/registry/jsr/@std/assert/0.220.1/mod.ts | 22 ++++++++++++++++++++++ tests/registry/jsr/@std/assert/0.220.1_meta.json | 8 ++++++++ tests/registry/jsr/@std/assert/meta.json | 8 ++++++++ 6 files changed, 56 insertions(+) create mode 100644 tests/registry/jsr/@std/assert/0.220.1/assert.ts create mode 100644 tests/registry/jsr/@std/assert/0.220.1/assert_equals.ts create mode 100644 tests/registry/jsr/@std/assert/0.220.1/fail.ts create mode 100644 tests/registry/jsr/@std/assert/0.220.1/mod.ts create mode 100644 tests/registry/jsr/@std/assert/0.220.1_meta.json create mode 100644 tests/registry/jsr/@std/assert/meta.json (limited to 'tests/registry/jsr/@std/assert') diff --git a/tests/registry/jsr/@std/assert/0.220.1/assert.ts b/tests/registry/jsr/@std/assert/0.220.1/assert.ts new file mode 100644 index 000000000..8c20c347a --- /dev/null +++ b/tests/registry/jsr/@std/assert/0.220.1/assert.ts @@ -0,0 +1,4 @@ +// deno-lint-ignore-file +export function assert(expr: unknown) { + return true; +} diff --git a/tests/registry/jsr/@std/assert/0.220.1/assert_equals.ts b/tests/registry/jsr/@std/assert/0.220.1/assert_equals.ts new file mode 100644 index 000000000..bd58194d0 --- /dev/null +++ b/tests/registry/jsr/@std/assert/0.220.1/assert_equals.ts @@ -0,0 +1,9 @@ +// deno-lint-ignore-file +export function assertEquals( + actual: T, + expected: T, + msg?: string, + options: { formatter?: (value: unknown) => string } = {}, +) { + return true; +} diff --git a/tests/registry/jsr/@std/assert/0.220.1/fail.ts b/tests/registry/jsr/@std/assert/0.220.1/fail.ts new file mode 100644 index 000000000..6c21edda5 --- /dev/null +++ b/tests/registry/jsr/@std/assert/0.220.1/fail.ts @@ -0,0 +1,5 @@ +// deno-lint-ignore-file + +export function fail() { + return true; +} diff --git a/tests/registry/jsr/@std/assert/0.220.1/mod.ts b/tests/registry/jsr/@std/assert/0.220.1/mod.ts new file mode 100644 index 000000000..fdcb56c8c --- /dev/null +++ b/tests/registry/jsr/@std/assert/0.220.1/mod.ts @@ -0,0 +1,22 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +/** A library of assertion functions. + * If the assertion is false an `AssertionError` will be thrown which will + * result in pretty-printed diff of failing assertion. + * + * This module is browser compatible, but do not rely on good formatting of + * values for AssertionError messages in browsers. + * + * ```ts + * import { assert } from "@std/assert/assert"; + * + * assert("I am truthy"); // Doesn't throw + * assert(false); // Throws `AssertionError` + * ``` + * + * @module + */ + +export * from "./assert_equals.ts"; +export * from "./assert.ts"; +export * from "./fail.ts"; diff --git a/tests/registry/jsr/@std/assert/0.220.1_meta.json b/tests/registry/jsr/@std/assert/0.220.1_meta.json new file mode 100644 index 000000000..3ca2db93a --- /dev/null +++ b/tests/registry/jsr/@std/assert/0.220.1_meta.json @@ -0,0 +1,8 @@ +{ + "exports": { + ".": "./mod.ts", + "./assert": "./assert.ts", + "./assert-equals": "./assert-equals.ts", + "./fail": "./fail.ts" + } +} diff --git a/tests/registry/jsr/@std/assert/meta.json b/tests/registry/jsr/@std/assert/meta.json new file mode 100644 index 000000000..4bb721c89 --- /dev/null +++ b/tests/registry/jsr/@std/assert/meta.json @@ -0,0 +1,8 @@ +{ + "scope": "std", + "name": "assert", + "latest": "0.220.1", + "versions": { + "0.220.1": {} + } +} -- cgit v1.2.3