diff options
Diffstat (limited to 'tests')
5 files changed, 46 insertions, 3 deletions
diff --git a/tests/integration/init_tests.rs b/tests/integration/init_tests.rs index d3908eae4..d2a9fa59b 100644 --- a/tests/integration/init_tests.rs +++ b/tests/integration/init_tests.rs @@ -6,7 +6,7 @@ use util::TestContextBuilder; #[test] fn init_subcommand_without_dir() { - let context = TestContextBuilder::new().use_temp_cwd().build(); + let context = TestContextBuilder::for_jsr().use_temp_cwd().build(); let cwd = context.temp_dir().path(); let output = context.new_command().args("init").split_output().run(); @@ -46,7 +46,7 @@ fn init_subcommand_without_dir() { #[test] fn init_subcommand_with_dir_arg() { - let context = TestContextBuilder::new().use_temp_cwd().build(); + let context = TestContextBuilder::for_jsr().use_temp_cwd().build(); let cwd = context.temp_dir().path(); let output = context @@ -92,7 +92,7 @@ fn init_subcommand_with_dir_arg() { #[test] fn init_subcommand_with_quiet_arg() { - let context = TestContextBuilder::new().use_temp_cwd().build(); + let context = TestContextBuilder::for_jsr().use_temp_cwd().build(); let cwd = context.temp_dir().path(); let output = context diff --git a/tests/testdata/jsr/registry/@std/assert/0.220.1/assert_equals.ts b/tests/testdata/jsr/registry/@std/assert/0.220.1/assert_equals.ts new file mode 100644 index 000000000..bd58194d0 --- /dev/null +++ b/tests/testdata/jsr/registry/@std/assert/0.220.1/assert_equals.ts @@ -0,0 +1,9 @@ +// deno-lint-ignore-file +export function assertEquals<T>( + actual: T, + expected: T, + msg?: string, + options: { formatter?: (value: unknown) => string } = {}, +) { + return true; +} diff --git a/tests/testdata/jsr/registry/@std/assert/0.220.1/mod.ts b/tests/testdata/jsr/registry/@std/assert/0.220.1/mod.ts new file mode 100644 index 000000000..2d7913a02 --- /dev/null +++ b/tests/testdata/jsr/registry/@std/assert/0.220.1/mod.ts @@ -0,0 +1,20 @@ +// 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"; diff --git a/tests/testdata/jsr/registry/@std/assert/0.220.1_meta.json b/tests/testdata/jsr/registry/@std/assert/0.220.1_meta.json new file mode 100644 index 000000000..677928167 --- /dev/null +++ b/tests/testdata/jsr/registry/@std/assert/0.220.1_meta.json @@ -0,0 +1,6 @@ +{ + "exports": { + ".": "./mod.ts", + "./assert_equals": "./assert_equals.ts" + } +} diff --git a/tests/testdata/jsr/registry/@std/assert/meta.json b/tests/testdata/jsr/registry/@std/assert/meta.json new file mode 100644 index 000000000..4bb721c89 --- /dev/null +++ b/tests/testdata/jsr/registry/@std/assert/meta.json @@ -0,0 +1,8 @@ +{ + "scope": "std", + "name": "assert", + "latest": "0.220.1", + "versions": { + "0.220.1": {} + } +} |