From 968f441da32ae5fc3783a4f9bcda3d34fa276b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 16 Sep 2024 14:39:58 +0100 Subject: test: rewrite some ignored tests to spec tests (#25652) Ref https://github.com/denoland/deno/issues/25241 Rewritten these tests: - check::package_json_basic - check::package_json_fail_check - check::package_json_with_deno_json - info::package_json_basic - test::package_json_basic - run::package_json_auto_discovered_for_npm_binary - run::package_json_with_deno_json --- tests/integration/check_tests.rs | 33 -------------------- tests/integration/info_tests.rs | 12 -------- tests/integration/run_tests.rs | 36 ---------------------- tests/integration/test_tests.rs | 12 -------- tests/specs/check/package_json/__test__.jsonc | 13 ++++++++ tests/specs/check/package_json/check.out | 1 + tests/specs/check/package_json/install.out | 3 ++ tests/specs/check/package_json/lib.ts | 9 ++++++ tests/specs/check/package_json/main.ts | 3 ++ tests/specs/check/package_json/package.json | 5 +++ .../check/package_json_auto_install/__test__.jsonc | 9 ++++++ .../check/package_json_auto_install/check.out | 4 +++ .../check/package_json_auto_install/deno.json | 3 ++ tests/specs/check/package_json_auto_install/lib.ts | 9 ++++++ .../specs/check/package_json_auto_install/main.ts | 3 ++ .../check/package_json_auto_install/package.json | 5 +++ .../check/package_json_fail_check/__test__.jsonc | 14 +++++++++ .../check/package_json_fail_check/fail_check.out | 4 +++ .../check/package_json_fail_check/fail_check.ts | 3 ++ .../check/package_json_fail_check/install.out | 3 ++ tests/specs/check/package_json_fail_check/lib.ts | 9 ++++++ .../check/package_json_fail_check/package.json | 5 +++ .../package_json_with_deno_json/__test__.jsonc | 14 +++++++++ .../check/package_json_with_deno_json/check.out | 11 +++++++ .../check/package_json_with_deno_json/deno.json | 5 +++ .../check/package_json_with_deno_json/install.out | 3 ++ .../check/package_json_with_deno_json/main.ts | 9 ++++++ .../check/package_json_with_deno_json/other.ts | 3 ++ .../check/package_json_with_deno_json/package.json | 5 +++ tests/specs/info/package_json_basic/__test__.jsonc | 13 ++++++++ tests/specs/info/package_json_basic/info.out | 9 ++++++ tests/specs/info/package_json_basic/install.out | 3 ++ tests/specs/info/package_json_basic/lib.ts | 9 ++++++ tests/specs/info/package_json_basic/main.ts | 3 ++ tests/specs/info/package_json_basic/package.json | 5 +++ .../package_json_basic_auto_install/__test__.jsonc | 9 ++++++ .../info/package_json_basic_auto_install/deno.json | 3 ++ .../info/package_json_basic_auto_install/info.out | 8 +++++ .../info/package_json_basic_auto_install/lib.ts | 9 ++++++ .../info/package_json_basic_auto_install/main.ts | 3 ++ .../package_json_basic_auto_install/package.json | 5 +++ .../run/package_json/with_deno_json/__test__.jsonc | 16 ++++++++++ .../run/package_json/with_deno_json/deno.json | 3 ++ tests/specs/run/package_json/with_deno_json/lib.ts | 9 ++++++ .../specs/run/package_json/with_deno_json/lock.out | 18 +++++++++++ .../specs/run/package_json/with_deno_json/main.out | 1 + .../specs/run/package_json/with_deno_json/main.ts | 3 ++ .../run/package_json/with_deno_json/package.json | 5 +++ .../__test__.jsonc | 5 +++ .../deno.json | 3 ++ .../main.out | 8 +++++ .../package.json | 8 +++++ tests/specs/test/package_json_basic/__test__.jsonc | 13 ++++++++ tests/specs/test/package_json_basic/install.out | 3 ++ tests/specs/test/package_json_basic/lib.test.ts | 7 +++++ tests/specs/test/package_json_basic/lib.ts | 9 ++++++ tests/specs/test/package_json_basic/package.json | 5 +++ tests/specs/test/package_json_basic/test.out | 6 ++++ .../package_json_basic_auto_install/__test__.jsonc | 9 ++++++ .../test/package_json_basic_auto_install/deno.json | 3 ++ .../package_json_basic_auto_install/lib.test.ts | 7 +++++ .../test/package_json_basic_auto_install/lib.ts | 9 ++++++ .../package_json_basic_auto_install/package.json | 5 +++ .../test/package_json_basic_auto_install/test.out | 9 ++++++ .../package_json/basic/fail_check.check.out | 4 --- tests/testdata/package_json/basic/fail_check.ts | 3 -- tests/testdata/package_json/basic/lib.test.out | 9 ------ tests/testdata/package_json/basic/lib.test.ts | 7 ----- tests/testdata/package_json/basic/lib.ts | 9 ------ tests/testdata/package_json/basic/main.check.out | 4 --- tests/testdata/package_json/basic/main.info.out | 8 ----- tests/testdata/package_json/basic/main.ts | 3 -- tests/testdata/package_json/basic/package.json | 5 --- tests/testdata/package_json/deno_json/deno.json | 5 --- .../testdata/package_json/deno_json/main.check.out | 11 ------- tests/testdata/package_json/deno_json/main.out | 2 -- tests/testdata/package_json/deno_json/main.ts | 9 ------ tests/testdata/package_json/deno_json/other.ts | 3 -- tests/testdata/package_json/deno_json/package.json | 5 --- .../run/with_package_json/npm_binary/main.out | 7 ----- .../run/with_package_json/npm_binary/package.json | 8 ----- tools/lint.js | 8 ++--- 82 files changed, 402 insertions(+), 199 deletions(-) create mode 100644 tests/specs/check/package_json/__test__.jsonc create mode 100644 tests/specs/check/package_json/check.out create mode 100644 tests/specs/check/package_json/install.out create mode 100644 tests/specs/check/package_json/lib.ts create mode 100644 tests/specs/check/package_json/main.ts create mode 100644 tests/specs/check/package_json/package.json create mode 100644 tests/specs/check/package_json_auto_install/__test__.jsonc create mode 100644 tests/specs/check/package_json_auto_install/check.out create mode 100644 tests/specs/check/package_json_auto_install/deno.json create mode 100644 tests/specs/check/package_json_auto_install/lib.ts create mode 100644 tests/specs/check/package_json_auto_install/main.ts create mode 100644 tests/specs/check/package_json_auto_install/package.json create mode 100644 tests/specs/check/package_json_fail_check/__test__.jsonc create mode 100644 tests/specs/check/package_json_fail_check/fail_check.out create mode 100644 tests/specs/check/package_json_fail_check/fail_check.ts create mode 100644 tests/specs/check/package_json_fail_check/install.out create mode 100644 tests/specs/check/package_json_fail_check/lib.ts create mode 100644 tests/specs/check/package_json_fail_check/package.json create mode 100644 tests/specs/check/package_json_with_deno_json/__test__.jsonc create mode 100644 tests/specs/check/package_json_with_deno_json/check.out create mode 100644 tests/specs/check/package_json_with_deno_json/deno.json create mode 100644 tests/specs/check/package_json_with_deno_json/install.out create mode 100644 tests/specs/check/package_json_with_deno_json/main.ts create mode 100644 tests/specs/check/package_json_with_deno_json/other.ts create mode 100644 tests/specs/check/package_json_with_deno_json/package.json create mode 100644 tests/specs/info/package_json_basic/__test__.jsonc create mode 100644 tests/specs/info/package_json_basic/info.out create mode 100644 tests/specs/info/package_json_basic/install.out create mode 100644 tests/specs/info/package_json_basic/lib.ts create mode 100644 tests/specs/info/package_json_basic/main.ts create mode 100644 tests/specs/info/package_json_basic/package.json create mode 100644 tests/specs/info/package_json_basic_auto_install/__test__.jsonc create mode 100644 tests/specs/info/package_json_basic_auto_install/deno.json create mode 100644 tests/specs/info/package_json_basic_auto_install/info.out create mode 100644 tests/specs/info/package_json_basic_auto_install/lib.ts create mode 100644 tests/specs/info/package_json_basic_auto_install/main.ts create mode 100644 tests/specs/info/package_json_basic_auto_install/package.json create mode 100644 tests/specs/run/package_json/with_deno_json/__test__.jsonc create mode 100644 tests/specs/run/package_json/with_deno_json/deno.json create mode 100644 tests/specs/run/package_json/with_deno_json/lib.ts create mode 100644 tests/specs/run/package_json/with_deno_json/lock.out create mode 100644 tests/specs/run/package_json/with_deno_json/main.out create mode 100644 tests/specs/run/package_json/with_deno_json/main.ts create mode 100644 tests/specs/run/package_json/with_deno_json/package.json create mode 100644 tests/specs/run/package_json_auto_discovered_for_npm_binary/__test__.jsonc create mode 100644 tests/specs/run/package_json_auto_discovered_for_npm_binary/deno.json create mode 100644 tests/specs/run/package_json_auto_discovered_for_npm_binary/main.out create mode 100644 tests/specs/run/package_json_auto_discovered_for_npm_binary/package.json create mode 100644 tests/specs/test/package_json_basic/__test__.jsonc create mode 100644 tests/specs/test/package_json_basic/install.out create mode 100644 tests/specs/test/package_json_basic/lib.test.ts create mode 100644 tests/specs/test/package_json_basic/lib.ts create mode 100644 tests/specs/test/package_json_basic/package.json create mode 100644 tests/specs/test/package_json_basic/test.out create mode 100644 tests/specs/test/package_json_basic_auto_install/__test__.jsonc create mode 100644 tests/specs/test/package_json_basic_auto_install/deno.json create mode 100644 tests/specs/test/package_json_basic_auto_install/lib.test.ts create mode 100644 tests/specs/test/package_json_basic_auto_install/lib.ts create mode 100644 tests/specs/test/package_json_basic_auto_install/package.json create mode 100644 tests/specs/test/package_json_basic_auto_install/test.out delete mode 100644 tests/testdata/package_json/basic/fail_check.check.out delete mode 100644 tests/testdata/package_json/basic/fail_check.ts delete mode 100644 tests/testdata/package_json/basic/lib.test.out delete mode 100644 tests/testdata/package_json/basic/lib.test.ts delete mode 100644 tests/testdata/package_json/basic/lib.ts delete mode 100644 tests/testdata/package_json/basic/main.check.out delete mode 100644 tests/testdata/package_json/basic/main.info.out delete mode 100644 tests/testdata/package_json/basic/main.ts delete mode 100644 tests/testdata/package_json/basic/package.json delete mode 100644 tests/testdata/package_json/deno_json/deno.json delete mode 100644 tests/testdata/package_json/deno_json/main.check.out delete mode 100644 tests/testdata/package_json/deno_json/main.out delete mode 100644 tests/testdata/package_json/deno_json/main.ts delete mode 100644 tests/testdata/package_json/deno_json/other.ts delete mode 100644 tests/testdata/package_json/deno_json/package.json delete mode 100644 tests/testdata/run/with_package_json/npm_binary/main.out delete mode 100644 tests/testdata/run/with_package_json/npm_binary/package.json diff --git a/tests/integration/check_tests.rs b/tests/integration/check_tests.rs index d3111727c..1ccec41eb 100644 --- a/tests/integration/check_tests.rs +++ b/tests/integration/check_tests.rs @@ -246,39 +246,6 @@ itest!(check_dts { exit_code: 1, }); -// TODO(2.0): this should be rewritten to a spec test and first run `deno install` -// itest!(package_json_basic { -// args: "check main.ts", -// output: "package_json/basic/main.check.out", -// envs: env_vars_for_npm_tests(), -// http_server: true, -// cwd: Some("package_json/basic"), -// copy_temp_dir: Some("package_json/basic"), -// exit_code: 0, -// }); - -// TODO(2.0): this should be rewritten to a spec test and first run `deno install` -// itest!(package_json_fail_check { -// args: "check --quiet fail_check.ts", -// output: "package_json/basic/fail_check.check.out", -// envs: env_vars_for_npm_tests(), -// http_server: true, -// cwd: Some("package_json/basic"), -// copy_temp_dir: Some("package_json/basic"), -// exit_code: 1, -// }); - -// TODO(2.0): this should be rewritten to a spec test and first run `deno install` -// itest!(package_json_with_deno_json { -// args: "check --quiet main.ts", -// output: "package_json/deno_json/main.check.out", -// cwd: Some("package_json/deno_json/"), -// copy_temp_dir: Some("package_json/deno_json/"), -// envs: env_vars_for_npm_tests(), -// http_server: true, -// exit_code: 1, -// }); - #[test] fn check_error_in_dep_then_fix() { let test_context = TestContextBuilder::new().use_temp_cwd().build(); diff --git a/tests/integration/info_tests.rs b/tests/integration/info_tests.rs index 38dd9448f..7699baba8 100644 --- a/tests/integration/info_tests.rs +++ b/tests/integration/info_tests.rs @@ -2,7 +2,6 @@ use test_util as util; use test_util::itest; -// use util::env_vars_for_npm_tests; use util::TestContextBuilder; #[test] @@ -110,17 +109,6 @@ itest!(with_config_override { output: "info/with_config/with_config.out", }); -// TODO(2.0): this test should be a spec test and first run `deno install` -// itest!(package_json_basic { -// args: "info --quiet main.ts", -// output: "package_json/basic/main.info.out", -// envs: env_vars_for_npm_tests(), -// http_server: true, -// cwd: Some("package_json/basic"), -// copy_temp_dir: Some("package_json/basic"), -// exit_code: 0, -// }); - itest!(info_import_map { args: "info preact/debug", output: "info/with_import_map/with_import_map.out", diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs index c10f0d1ea..95b6e5a01 100644 --- a/tests/integration/run_tests.rs +++ b/tests/integration/run_tests.rs @@ -3359,42 +3359,6 @@ itest!( } ); -// TODO(2.0): this should be rewritten to a spec test and first run `deno install` -// itest!(package_json_auto_discovered_for_npm_binary { -// args: "run -L debug -A npm:@denotest/bin/cli-esm this is a test", -// output: "run/with_package_json/npm_binary/main.out", -// cwd: Some("run/with_package_json/npm_binary/"), -// copy_temp_dir: Some("run/with_package_json/"), -// envs: env_vars_for_npm_tests(), -// http_server: true, -// }); - -// TODO(2.0): this should be rewritten to a spec test and first run `deno install` -#[test] -#[ignore] -fn package_json_with_deno_json() { - let context = TestContextBuilder::for_npm() - .use_copy_temp_dir("package_json/deno_json/") - .cwd("package_json/deno_json/") - .build(); - let output = context.new_command().args("run --quiet -A main.ts").run(); - output.assert_matches_file("package_json/deno_json/main.out"); - - assert!(context - .temp_dir() - .path() - .join("package_json/deno_json/deno.lock") - .exists()); - - // run again and ensure the top level install doesn't happen twice - let output = context - .new_command() - .args("run --log-level=debug -A main.ts") - .run(); - let output = output.combined_output(); - assert_contains!(output, "Skipping top level install."); -} - #[test] fn package_json_no_node_modules_dir_created() { // it should not create a node_modules directory diff --git a/tests/integration/test_tests.rs b/tests/integration/test_tests.rs index f6c48654d..207e0f260 100644 --- a/tests/integration/test_tests.rs +++ b/tests/integration/test_tests.rs @@ -6,7 +6,6 @@ use test_util as util; use test_util::itest; use util::assert_contains; use util::assert_not_contains; -// use util::env_vars_for_npm_tests; use util::wildcard_match; use util::TestContext; use util::TestContextBuilder; @@ -599,17 +598,6 @@ fn sigint_with_hanging_test() { ); } -// TODO(2.0): this should be rewritten to a spec test and first run `deno install` -// itest!(package_json_basic { -// args: "test", -// output: "package_json/basic/lib.test.out", -// envs: env_vars_for_npm_tests(), -// http_server: true, -// cwd: Some("package_json/basic"), -// copy_temp_dir: Some("package_json/basic"), -// exit_code: 0, -// }); - itest!(test_replace_timers { args: "test test/replace_timers.js", output: "test/replace_timers.js.out", diff --git a/tests/specs/check/package_json/__test__.jsonc b/tests/specs/check/package_json/__test__.jsonc new file mode 100644 index 000000000..29a964b9f --- /dev/null +++ b/tests/specs/check/package_json/__test__.jsonc @@ -0,0 +1,13 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "install", + "output": "install.out" + }, + { + "args": "check main.ts", + "output": "check.out" + } + ] +} diff --git a/tests/specs/check/package_json/check.out b/tests/specs/check/package_json/check.out new file mode 100644 index 000000000..bb9406725 --- /dev/null +++ b/tests/specs/check/package_json/check.out @@ -0,0 +1 @@ +Check file://[WILDCARD]/main.ts diff --git a/tests/specs/check/package_json/install.out b/tests/specs/check/package_json/install.out new file mode 100644 index 000000000..b8114c12a --- /dev/null +++ b/tests/specs/check/package_json/install.out @@ -0,0 +1,3 @@ +Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz +Initialize @denotest/esm-basic@1.0.0 diff --git a/tests/specs/check/package_json/lib.ts b/tests/specs/check/package_json/lib.ts new file mode 100644 index 000000000..1deed81f7 --- /dev/null +++ b/tests/specs/check/package_json/lib.ts @@ -0,0 +1,9 @@ +import * as test from "@denotest/esm-basic"; + +export function add(a: number, b: number) { + return a + b; +} + +export function getValue() { + return test.getValue(); +} diff --git a/tests/specs/check/package_json/main.ts b/tests/specs/check/package_json/main.ts new file mode 100644 index 000000000..e241f3002 --- /dev/null +++ b/tests/specs/check/package_json/main.ts @@ -0,0 +1,3 @@ +import { getValue } from "./lib.ts"; + +console.log(getValue()); diff --git a/tests/specs/check/package_json/package.json b/tests/specs/check/package_json/package.json new file mode 100644 index 000000000..54ca824d6 --- /dev/null +++ b/tests/specs/check/package_json/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/esm-basic": "*" + } +} diff --git a/tests/specs/check/package_json_auto_install/__test__.jsonc b/tests/specs/check/package_json_auto_install/__test__.jsonc new file mode 100644 index 000000000..3fa33cdb7 --- /dev/null +++ b/tests/specs/check/package_json_auto_install/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "check main.ts", + "output": "check.out" + } + ] +} diff --git a/tests/specs/check/package_json_auto_install/check.out b/tests/specs/check/package_json_auto_install/check.out new file mode 100644 index 000000000..db9bd198c --- /dev/null +++ b/tests/specs/check/package_json_auto_install/check.out @@ -0,0 +1,4 @@ +Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz +Initialize @denotest/esm-basic@1.0.0 +Check file://[WILDCARD]/main.ts diff --git a/tests/specs/check/package_json_auto_install/deno.json b/tests/specs/check/package_json_auto_install/deno.json new file mode 100644 index 000000000..fbd70ec48 --- /dev/null +++ b/tests/specs/check/package_json_auto_install/deno.json @@ -0,0 +1,3 @@ +{ + "nodeModulesDir": "auto" +} diff --git a/tests/specs/check/package_json_auto_install/lib.ts b/tests/specs/check/package_json_auto_install/lib.ts new file mode 100644 index 000000000..1deed81f7 --- /dev/null +++ b/tests/specs/check/package_json_auto_install/lib.ts @@ -0,0 +1,9 @@ +import * as test from "@denotest/esm-basic"; + +export function add(a: number, b: number) { + return a + b; +} + +export function getValue() { + return test.getValue(); +} diff --git a/tests/specs/check/package_json_auto_install/main.ts b/tests/specs/check/package_json_auto_install/main.ts new file mode 100644 index 000000000..e241f3002 --- /dev/null +++ b/tests/specs/check/package_json_auto_install/main.ts @@ -0,0 +1,3 @@ +import { getValue } from "./lib.ts"; + +console.log(getValue()); diff --git a/tests/specs/check/package_json_auto_install/package.json b/tests/specs/check/package_json_auto_install/package.json new file mode 100644 index 000000000..54ca824d6 --- /dev/null +++ b/tests/specs/check/package_json_auto_install/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/esm-basic": "*" + } +} diff --git a/tests/specs/check/package_json_fail_check/__test__.jsonc b/tests/specs/check/package_json_fail_check/__test__.jsonc new file mode 100644 index 000000000..e5b4a4db0 --- /dev/null +++ b/tests/specs/check/package_json_fail_check/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "install", + "output": "install.out" + }, + { + "args": "check --quiet fail_check.ts", + "output": "fail_check.out", + "exitCode": 1 + } + ] +} diff --git a/tests/specs/check/package_json_fail_check/fail_check.out b/tests/specs/check/package_json_fail_check/fail_check.out new file mode 100644 index 000000000..03997a051 --- /dev/null +++ b/tests/specs/check/package_json_fail_check/fail_check.out @@ -0,0 +1,4 @@ +error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. +const _test: string = getValue(); + ~~~~~ + at file:///[WILDCARD]/fail_check.ts:3:7 diff --git a/tests/specs/check/package_json_fail_check/fail_check.ts b/tests/specs/check/package_json_fail_check/fail_check.ts new file mode 100644 index 000000000..cef10763d --- /dev/null +++ b/tests/specs/check/package_json_fail_check/fail_check.ts @@ -0,0 +1,3 @@ +import { getValue } from "./lib.ts"; + +const _test: string = getValue(); diff --git a/tests/specs/check/package_json_fail_check/install.out b/tests/specs/check/package_json_fail_check/install.out new file mode 100644 index 000000000..b8114c12a --- /dev/null +++ b/tests/specs/check/package_json_fail_check/install.out @@ -0,0 +1,3 @@ +Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz +Initialize @denotest/esm-basic@1.0.0 diff --git a/tests/specs/check/package_json_fail_check/lib.ts b/tests/specs/check/package_json_fail_check/lib.ts new file mode 100644 index 000000000..1deed81f7 --- /dev/null +++ b/tests/specs/check/package_json_fail_check/lib.ts @@ -0,0 +1,9 @@ +import * as test from "@denotest/esm-basic"; + +export function add(a: number, b: number) { + return a + b; +} + +export function getValue() { + return test.getValue(); +} diff --git a/tests/specs/check/package_json_fail_check/package.json b/tests/specs/check/package_json_fail_check/package.json new file mode 100644 index 000000000..54ca824d6 --- /dev/null +++ b/tests/specs/check/package_json_fail_check/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/esm-basic": "*" + } +} diff --git a/tests/specs/check/package_json_with_deno_json/__test__.jsonc b/tests/specs/check/package_json_with_deno_json/__test__.jsonc new file mode 100644 index 000000000..13752ebee --- /dev/null +++ b/tests/specs/check/package_json_with_deno_json/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "install", + "output": "install.out" + }, + { + "args": "check --quiet main.ts", + "output": "check.out", + "exitCode": 1 + } + ] +} diff --git a/tests/specs/check/package_json_with_deno_json/check.out b/tests/specs/check/package_json_with_deno_json/check.out new file mode 100644 index 000000000..53b6869c0 --- /dev/null +++ b/tests/specs/check/package_json_with_deno_json/check.out @@ -0,0 +1,11 @@ +error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. +const _strValue1: string = NUMBER_VALUE; + ~~~~~~~~~~ + at file:///[WILDCARD]/main.ts:8:7 + +TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. +const _strValue2: string = test.getValue(); + ~~~~~~~~~~ + at file:///[WILDCARD]/main.ts:9:7 + +Found 2 errors. diff --git a/tests/specs/check/package_json_with_deno_json/deno.json b/tests/specs/check/package_json_with_deno_json/deno.json new file mode 100644 index 000000000..8a89da280 --- /dev/null +++ b/tests/specs/check/package_json_with_deno_json/deno.json @@ -0,0 +1,5 @@ +{ + "imports": { + "other": "./other.ts" + } +} diff --git a/tests/specs/check/package_json_with_deno_json/install.out b/tests/specs/check/package_json_with_deno_json/install.out new file mode 100644 index 000000000..b8114c12a --- /dev/null +++ b/tests/specs/check/package_json_with_deno_json/install.out @@ -0,0 +1,3 @@ +Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz +Initialize @denotest/esm-basic@1.0.0 diff --git a/tests/specs/check/package_json_with_deno_json/main.ts b/tests/specs/check/package_json_with_deno_json/main.ts new file mode 100644 index 000000000..7768ff3fc --- /dev/null +++ b/tests/specs/check/package_json_with_deno_json/main.ts @@ -0,0 +1,9 @@ +import { NUMBER_VALUE } from "other"; +import * as test from "@denotest/esm-basic"; + +test.setValue(2); +console.log(test.getValue()); + +// these should cause type errors +const _strValue1: string = NUMBER_VALUE; +const _strValue2: string = test.getValue(); diff --git a/tests/specs/check/package_json_with_deno_json/other.ts b/tests/specs/check/package_json_with_deno_json/other.ts new file mode 100644 index 000000000..997d84adf --- /dev/null +++ b/tests/specs/check/package_json_with_deno_json/other.ts @@ -0,0 +1,3 @@ +console.log(1); + +export const NUMBER_VALUE = 1; diff --git a/tests/specs/check/package_json_with_deno_json/package.json b/tests/specs/check/package_json_with_deno_json/package.json new file mode 100644 index 000000000..54ca824d6 --- /dev/null +++ b/tests/specs/check/package_json_with_deno_json/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/esm-basic": "*" + } +} diff --git a/tests/specs/info/package_json_basic/__test__.jsonc b/tests/specs/info/package_json_basic/__test__.jsonc new file mode 100644 index 000000000..c5672615c --- /dev/null +++ b/tests/specs/info/package_json_basic/__test__.jsonc @@ -0,0 +1,13 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "install", + "output": "install.out" + }, + { + "args": "info --quiet main.ts", + "output": "info.out" + } + ] +} diff --git a/tests/specs/info/package_json_basic/info.out b/tests/specs/info/package_json_basic/info.out new file mode 100644 index 000000000..243010131 --- /dev/null +++ b/tests/specs/info/package_json_basic/info.out @@ -0,0 +1,9 @@ +local: [WILDCARD]main.ts +type: TypeScript +dependencies: 3 unique +size: [WILDCARD] + +file:///[WILDCARD]/main.ts (63B) +└─┬ file:///[WILDCARD]/lib.ts (166B) + ├── file:///[WILDCARD]@denotest/esm-basic/main.mjs (unknown) + └── file:///[WILDCARD]@denotest/esm-basic/main.d.mts (unknown) diff --git a/tests/specs/info/package_json_basic/install.out b/tests/specs/info/package_json_basic/install.out new file mode 100644 index 000000000..b8114c12a --- /dev/null +++ b/tests/specs/info/package_json_basic/install.out @@ -0,0 +1,3 @@ +Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz +Initialize @denotest/esm-basic@1.0.0 diff --git a/tests/specs/info/package_json_basic/lib.ts b/tests/specs/info/package_json_basic/lib.ts new file mode 100644 index 000000000..1deed81f7 --- /dev/null +++ b/tests/specs/info/package_json_basic/lib.ts @@ -0,0 +1,9 @@ +import * as test from "@denotest/esm-basic"; + +export function add(a: number, b: number) { + return a + b; +} + +export function getValue() { + return test.getValue(); +} diff --git a/tests/specs/info/package_json_basic/main.ts b/tests/specs/info/package_json_basic/main.ts new file mode 100644 index 000000000..e241f3002 --- /dev/null +++ b/tests/specs/info/package_json_basic/main.ts @@ -0,0 +1,3 @@ +import { getValue } from "./lib.ts"; + +console.log(getValue()); diff --git a/tests/specs/info/package_json_basic/package.json b/tests/specs/info/package_json_basic/package.json new file mode 100644 index 000000000..54ca824d6 --- /dev/null +++ b/tests/specs/info/package_json_basic/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/esm-basic": "*" + } +} diff --git a/tests/specs/info/package_json_basic_auto_install/__test__.jsonc b/tests/specs/info/package_json_basic_auto_install/__test__.jsonc new file mode 100644 index 000000000..a98f89e91 --- /dev/null +++ b/tests/specs/info/package_json_basic_auto_install/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "info --quiet main.ts", + "output": "info.out" + } + ] +} diff --git a/tests/specs/info/package_json_basic_auto_install/deno.json b/tests/specs/info/package_json_basic_auto_install/deno.json new file mode 100644 index 000000000..fbd70ec48 --- /dev/null +++ b/tests/specs/info/package_json_basic_auto_install/deno.json @@ -0,0 +1,3 @@ +{ + "nodeModulesDir": "auto" +} diff --git a/tests/specs/info/package_json_basic_auto_install/info.out b/tests/specs/info/package_json_basic_auto_install/info.out new file mode 100644 index 000000000..892c0612a --- /dev/null +++ b/tests/specs/info/package_json_basic_auto_install/info.out @@ -0,0 +1,8 @@ +local: [WILDCARD]main.ts +type: TypeScript +dependencies: 2 unique +size: [WILDCARD] + +file:///[WILDCARD]/main.ts (63B) +└─┬ file:///[WILDCARD]/lib.ts (166B) + └── npm:/@denotest/esm-basic@1.0.0 (471B) diff --git a/tests/specs/info/package_json_basic_auto_install/lib.ts b/tests/specs/info/package_json_basic_auto_install/lib.ts new file mode 100644 index 000000000..1deed81f7 --- /dev/null +++ b/tests/specs/info/package_json_basic_auto_install/lib.ts @@ -0,0 +1,9 @@ +import * as test from "@denotest/esm-basic"; + +export function add(a: number, b: number) { + return a + b; +} + +export function getValue() { + return test.getValue(); +} diff --git a/tests/specs/info/package_json_basic_auto_install/main.ts b/tests/specs/info/package_json_basic_auto_install/main.ts new file mode 100644 index 000000000..e241f3002 --- /dev/null +++ b/tests/specs/info/package_json_basic_auto_install/main.ts @@ -0,0 +1,3 @@ +import { getValue } from "./lib.ts"; + +console.log(getValue()); diff --git a/tests/specs/info/package_json_basic_auto_install/package.json b/tests/specs/info/package_json_basic_auto_install/package.json new file mode 100644 index 000000000..54ca824d6 --- /dev/null +++ b/tests/specs/info/package_json_basic_auto_install/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/esm-basic": "*" + } +} diff --git a/tests/specs/run/package_json/with_deno_json/__test__.jsonc b/tests/specs/run/package_json/with_deno_json/__test__.jsonc new file mode 100644 index 000000000..13b6b6de1 --- /dev/null +++ b/tests/specs/run/package_json/with_deno_json/__test__.jsonc @@ -0,0 +1,16 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "run --quiet -A main.ts", + "output": "main.out" + }, + { + "args": [ + "eval", + "console.log(Deno.readTextFileSync('deno.lock').trim())" + ], + "output": "lock.out" + } + ] +} diff --git a/tests/specs/run/package_json/with_deno_json/deno.json b/tests/specs/run/package_json/with_deno_json/deno.json new file mode 100644 index 000000000..fbd70ec48 --- /dev/null +++ b/tests/specs/run/package_json/with_deno_json/deno.json @@ -0,0 +1,3 @@ +{ + "nodeModulesDir": "auto" +} diff --git a/tests/specs/run/package_json/with_deno_json/lib.ts b/tests/specs/run/package_json/with_deno_json/lib.ts new file mode 100644 index 000000000..1deed81f7 --- /dev/null +++ b/tests/specs/run/package_json/with_deno_json/lib.ts @@ -0,0 +1,9 @@ +import * as test from "@denotest/esm-basic"; + +export function add(a: number, b: number) { + return a + b; +} + +export function getValue() { + return test.getValue(); +} diff --git a/tests/specs/run/package_json/with_deno_json/lock.out b/tests/specs/run/package_json/with_deno_json/lock.out new file mode 100644 index 000000000..92aa561b8 --- /dev/null +++ b/tests/specs/run/package_json/with_deno_json/lock.out @@ -0,0 +1,18 @@ +{ + "version": "4", + "specifiers": { + "npm:@denotest/esm-basic@*": "1.0.0" + }, + "npm": { + "@denotest/esm-basic@1.0.0": { + "integrity": "sha512-[WILDCARD]" + } + }, + "workspace": { + "packageJson": { + "dependencies": [ + "npm:@denotest/esm-basic@*" + ] + } + } +} diff --git a/tests/specs/run/package_json/with_deno_json/main.out b/tests/specs/run/package_json/with_deno_json/main.out new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/specs/run/package_json/with_deno_json/main.out @@ -0,0 +1 @@ +0 diff --git a/tests/specs/run/package_json/with_deno_json/main.ts b/tests/specs/run/package_json/with_deno_json/main.ts new file mode 100644 index 000000000..e241f3002 --- /dev/null +++ b/tests/specs/run/package_json/with_deno_json/main.ts @@ -0,0 +1,3 @@ +import { getValue } from "./lib.ts"; + +console.log(getValue()); diff --git a/tests/specs/run/package_json/with_deno_json/package.json b/tests/specs/run/package_json/with_deno_json/package.json new file mode 100644 index 000000000..54ca824d6 --- /dev/null +++ b/tests/specs/run/package_json/with_deno_json/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/esm-basic": "*" + } +} diff --git a/tests/specs/run/package_json_auto_discovered_for_npm_binary/__test__.jsonc b/tests/specs/run/package_json_auto_discovered_for_npm_binary/__test__.jsonc new file mode 100644 index 000000000..dab6ad8d5 --- /dev/null +++ b/tests/specs/run/package_json_auto_discovered_for_npm_binary/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "tempDir": true, + "args": "run -L debug npm:@denotest/bin/cli-esm this is a test", + "output": "main.out" +} diff --git a/tests/specs/run/package_json_auto_discovered_for_npm_binary/deno.json b/tests/specs/run/package_json_auto_discovered_for_npm_binary/deno.json new file mode 100644 index 000000000..fbd70ec48 --- /dev/null +++ b/tests/specs/run/package_json_auto_discovered_for_npm_binary/deno.json @@ -0,0 +1,3 @@ +{ + "nodeModulesDir": "auto" +} diff --git a/tests/specs/run/package_json_auto_discovered_for_npm_binary/main.out b/tests/specs/run/package_json_auto_discovered_for_npm_binary/main.out new file mode 100644 index 000000000..5f687a098 --- /dev/null +++ b/tests/specs/run/package_json_auto_discovered_for_npm_binary/main.out @@ -0,0 +1,8 @@ +[WILDCARD] +[WILDCARD]package.json file found at '[WILDCARD]package.json' +[WILDCARD] +this +is +a +test +[WILDCARD] diff --git a/tests/specs/run/package_json_auto_discovered_for_npm_binary/package.json b/tests/specs/run/package_json_auto_discovered_for_npm_binary/package.json new file mode 100644 index 000000000..9ee3f39a8 --- /dev/null +++ b/tests/specs/run/package_json_auto_discovered_for_npm_binary/package.json @@ -0,0 +1,8 @@ +{ + "dependencies": { + "@denotest/check-error": "1.0.0" + }, + "devDependencies": { + "@denotest/cjs-default-export": "1.0.0" + } +} diff --git a/tests/specs/test/package_json_basic/__test__.jsonc b/tests/specs/test/package_json_basic/__test__.jsonc new file mode 100644 index 000000000..64e43afa5 --- /dev/null +++ b/tests/specs/test/package_json_basic/__test__.jsonc @@ -0,0 +1,13 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "install", + "output": "install.out" + }, + { + "args": "test", + "output": "test.out" + } + ] +} diff --git a/tests/specs/test/package_json_basic/install.out b/tests/specs/test/package_json_basic/install.out new file mode 100644 index 000000000..b8114c12a --- /dev/null +++ b/tests/specs/test/package_json_basic/install.out @@ -0,0 +1,3 @@ +Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz +Initialize @denotest/esm-basic@1.0.0 diff --git a/tests/specs/test/package_json_basic/lib.test.ts b/tests/specs/test/package_json_basic/lib.test.ts new file mode 100644 index 000000000..4e833e1f3 --- /dev/null +++ b/tests/specs/test/package_json_basic/lib.test.ts @@ -0,0 +1,7 @@ +import { add } from "./lib.ts"; + +Deno.test("should add", () => { + if (add(1, 2) !== 3) { + throw new Error("Fail"); + } +}); diff --git a/tests/specs/test/package_json_basic/lib.ts b/tests/specs/test/package_json_basic/lib.ts new file mode 100644 index 000000000..1deed81f7 --- /dev/null +++ b/tests/specs/test/package_json_basic/lib.ts @@ -0,0 +1,9 @@ +import * as test from "@denotest/esm-basic"; + +export function add(a: number, b: number) { + return a + b; +} + +export function getValue() { + return test.getValue(); +} diff --git a/tests/specs/test/package_json_basic/package.json b/tests/specs/test/package_json_basic/package.json new file mode 100644 index 000000000..54ca824d6 --- /dev/null +++ b/tests/specs/test/package_json_basic/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/esm-basic": "*" + } +} diff --git a/tests/specs/test/package_json_basic/test.out b/tests/specs/test/package_json_basic/test.out new file mode 100644 index 000000000..1ff57c150 --- /dev/null +++ b/tests/specs/test/package_json_basic/test.out @@ -0,0 +1,6 @@ +Check file://[WILDCARD]/lib.test.ts +running 1 test from [WILDCARD]lib.test.ts +should add ... ok ([WILDCARD]) + +ok | 1 passed | 0 failed ([WILDCARD]) + diff --git a/tests/specs/test/package_json_basic_auto_install/__test__.jsonc b/tests/specs/test/package_json_basic_auto_install/__test__.jsonc new file mode 100644 index 000000000..d80f3222a --- /dev/null +++ b/tests/specs/test/package_json_basic_auto_install/__test__.jsonc @@ -0,0 +1,9 @@ +{ + "tempDir": true, + "steps": [ + { + "args": "test", + "output": "test.out" + } + ] +} diff --git a/tests/specs/test/package_json_basic_auto_install/deno.json b/tests/specs/test/package_json_basic_auto_install/deno.json new file mode 100644 index 000000000..fbd70ec48 --- /dev/null +++ b/tests/specs/test/package_json_basic_auto_install/deno.json @@ -0,0 +1,3 @@ +{ + "nodeModulesDir": "auto" +} diff --git a/tests/specs/test/package_json_basic_auto_install/lib.test.ts b/tests/specs/test/package_json_basic_auto_install/lib.test.ts new file mode 100644 index 000000000..4e833e1f3 --- /dev/null +++ b/tests/specs/test/package_json_basic_auto_install/lib.test.ts @@ -0,0 +1,7 @@ +import { add } from "./lib.ts"; + +Deno.test("should add", () => { + if (add(1, 2) !== 3) { + throw new Error("Fail"); + } +}); diff --git a/tests/specs/test/package_json_basic_auto_install/lib.ts b/tests/specs/test/package_json_basic_auto_install/lib.ts new file mode 100644 index 000000000..1deed81f7 --- /dev/null +++ b/tests/specs/test/package_json_basic_auto_install/lib.ts @@ -0,0 +1,9 @@ +import * as test from "@denotest/esm-basic"; + +export function add(a: number, b: number) { + return a + b; +} + +export function getValue() { + return test.getValue(); +} diff --git a/tests/specs/test/package_json_basic_auto_install/package.json b/tests/specs/test/package_json_basic_auto_install/package.json new file mode 100644 index 000000000..54ca824d6 --- /dev/null +++ b/tests/specs/test/package_json_basic_auto_install/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/esm-basic": "*" + } +} diff --git a/tests/specs/test/package_json_basic_auto_install/test.out b/tests/specs/test/package_json_basic_auto_install/test.out new file mode 100644 index 000000000..2f109ef38 --- /dev/null +++ b/tests/specs/test/package_json_basic_auto_install/test.out @@ -0,0 +1,9 @@ +Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz +Initialize @denotest/esm-basic@1.0.0 +Check file://[WILDCARD]/lib.test.ts +running 1 test from [WILDCARD]lib.test.ts +should add ... ok ([WILDCARD]) + +ok | 1 passed | 0 failed ([WILDCARD]) + diff --git a/tests/testdata/package_json/basic/fail_check.check.out b/tests/testdata/package_json/basic/fail_check.check.out deleted file mode 100644 index 03997a051..000000000 --- a/tests/testdata/package_json/basic/fail_check.check.out +++ /dev/null @@ -1,4 +0,0 @@ -error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. -const _test: string = getValue(); - ~~~~~ - at file:///[WILDCARD]/fail_check.ts:3:7 diff --git a/tests/testdata/package_json/basic/fail_check.ts b/tests/testdata/package_json/basic/fail_check.ts deleted file mode 100644 index cef10763d..000000000 --- a/tests/testdata/package_json/basic/fail_check.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getValue } from "./lib.ts"; - -const _test: string = getValue(); diff --git a/tests/testdata/package_json/basic/lib.test.out b/tests/testdata/package_json/basic/lib.test.out deleted file mode 100644 index 2f109ef38..000000000 --- a/tests/testdata/package_json/basic/lib.test.out +++ /dev/null @@ -1,9 +0,0 @@ -Download http://localhost:4260/@denotest/esm-basic -Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz -Initialize @denotest/esm-basic@1.0.0 -Check file://[WILDCARD]/lib.test.ts -running 1 test from [WILDCARD]lib.test.ts -should add ... ok ([WILDCARD]) - -ok | 1 passed | 0 failed ([WILDCARD]) - diff --git a/tests/testdata/package_json/basic/lib.test.ts b/tests/testdata/package_json/basic/lib.test.ts deleted file mode 100644 index 4e833e1f3..000000000 --- a/tests/testdata/package_json/basic/lib.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { add } from "./lib.ts"; - -Deno.test("should add", () => { - if (add(1, 2) !== 3) { - throw new Error("Fail"); - } -}); diff --git a/tests/testdata/package_json/basic/lib.ts b/tests/testdata/package_json/basic/lib.ts deleted file mode 100644 index 1deed81f7..000000000 --- a/tests/testdata/package_json/basic/lib.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as test from "@denotest/esm-basic"; - -export function add(a: number, b: number) { - return a + b; -} - -export function getValue() { - return test.getValue(); -} diff --git a/tests/testdata/package_json/basic/main.check.out b/tests/testdata/package_json/basic/main.check.out deleted file mode 100644 index db9bd198c..000000000 --- a/tests/testdata/package_json/basic/main.check.out +++ /dev/null @@ -1,4 +0,0 @@ -Download http://localhost:4260/@denotest/esm-basic -Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz -Initialize @denotest/esm-basic@1.0.0 -Check file://[WILDCARD]/main.ts diff --git a/tests/testdata/package_json/basic/main.info.out b/tests/testdata/package_json/basic/main.info.out deleted file mode 100644 index 892c0612a..000000000 --- a/tests/testdata/package_json/basic/main.info.out +++ /dev/null @@ -1,8 +0,0 @@ -local: [WILDCARD]main.ts -type: TypeScript -dependencies: 2 unique -size: [WILDCARD] - -file:///[WILDCARD]/main.ts (63B) -└─┬ file:///[WILDCARD]/lib.ts (166B) - └── npm:/@denotest/esm-basic@1.0.0 (471B) diff --git a/tests/testdata/package_json/basic/main.ts b/tests/testdata/package_json/basic/main.ts deleted file mode 100644 index e241f3002..000000000 --- a/tests/testdata/package_json/basic/main.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getValue } from "./lib.ts"; - -console.log(getValue()); diff --git a/tests/testdata/package_json/basic/package.json b/tests/testdata/package_json/basic/package.json deleted file mode 100644 index 54ca824d6..000000000 --- a/tests/testdata/package_json/basic/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@denotest/esm-basic": "*" - } -} diff --git a/tests/testdata/package_json/deno_json/deno.json b/tests/testdata/package_json/deno_json/deno.json deleted file mode 100644 index 8a89da280..000000000 --- a/tests/testdata/package_json/deno_json/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "imports": { - "other": "./other.ts" - } -} diff --git a/tests/testdata/package_json/deno_json/main.check.out b/tests/testdata/package_json/deno_json/main.check.out deleted file mode 100644 index 53b6869c0..000000000 --- a/tests/testdata/package_json/deno_json/main.check.out +++ /dev/null @@ -1,11 +0,0 @@ -error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. -const _strValue1: string = NUMBER_VALUE; - ~~~~~~~~~~ - at file:///[WILDCARD]/main.ts:8:7 - -TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. -const _strValue2: string = test.getValue(); - ~~~~~~~~~~ - at file:///[WILDCARD]/main.ts:9:7 - -Found 2 errors. diff --git a/tests/testdata/package_json/deno_json/main.out b/tests/testdata/package_json/deno_json/main.out deleted file mode 100644 index 1191247b6..000000000 --- a/tests/testdata/package_json/deno_json/main.out +++ /dev/null @@ -1,2 +0,0 @@ -1 -2 diff --git a/tests/testdata/package_json/deno_json/main.ts b/tests/testdata/package_json/deno_json/main.ts deleted file mode 100644 index 7768ff3fc..000000000 --- a/tests/testdata/package_json/deno_json/main.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { NUMBER_VALUE } from "other"; -import * as test from "@denotest/esm-basic"; - -test.setValue(2); -console.log(test.getValue()); - -// these should cause type errors -const _strValue1: string = NUMBER_VALUE; -const _strValue2: string = test.getValue(); diff --git a/tests/testdata/package_json/deno_json/other.ts b/tests/testdata/package_json/deno_json/other.ts deleted file mode 100644 index 997d84adf..000000000 --- a/tests/testdata/package_json/deno_json/other.ts +++ /dev/null @@ -1,3 +0,0 @@ -console.log(1); - -export const NUMBER_VALUE = 1; diff --git a/tests/testdata/package_json/deno_json/package.json b/tests/testdata/package_json/deno_json/package.json deleted file mode 100644 index 54ca824d6..000000000 --- a/tests/testdata/package_json/deno_json/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "@denotest/esm-basic": "*" - } -} diff --git a/tests/testdata/run/with_package_json/npm_binary/main.out b/tests/testdata/run/with_package_json/npm_binary/main.out deleted file mode 100644 index 13d196a5e..000000000 --- a/tests/testdata/run/with_package_json/npm_binary/main.out +++ /dev/null @@ -1,7 +0,0 @@ -[WILDCARD]package.json file found at '[WILDCARD]with_package_json[WILDCARD]npm_binary[WILDCARD]package.json' -[WILDCARD] -this -is -a -test -[WILDCARD] diff --git a/tests/testdata/run/with_package_json/npm_binary/package.json b/tests/testdata/run/with_package_json/npm_binary/package.json deleted file mode 100644 index 9ee3f39a8..000000000 --- a/tests/testdata/run/with_package_json/npm_binary/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "dependencies": { - "@denotest/check-error": "1.0.0" - }, - "devDependencies": { - "@denotest/cjs-default-export": "1.0.0" - } -} diff --git a/tools/lint.js b/tools/lint.js index bb4781e27..013bd4930 100755 --- a/tools/lint.js +++ b/tools/lint.js @@ -198,13 +198,13 @@ async function ensureNoNewITests() { "bench_tests.rs": 0, "cache_tests.rs": 0, "cert_tests.rs": 0, - "check_tests.rs": 21, + "check_tests.rs": 18, "compile_tests.rs": 0, "coverage_tests.rs": 0, "eval_tests.rs": 0, "flags_tests.rs": 0, "fmt_tests.rs": 16, - "info_tests.rs": 18, + "info_tests.rs": 17, "init_tests.rs": 0, "inspector_tests.rs": 0, "install_tests.rs": 0, @@ -220,10 +220,10 @@ async function ensureNoNewITests() { "pm_tests.rs": 0, "publish_tests.rs": 0, "repl_tests.rs": 0, - "run_tests.rs": 335, + "run_tests.rs": 334, "shared_library_tests.rs": 0, "task_tests.rs": 4, - "test_tests.rs": 74, + "test_tests.rs": 73, "upgrade_tests.rs": 0, "vendor_tests.rs": 1, "watcher_tests.rs": 0, -- cgit v1.2.3