summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/tests/integration/bench_tests.rs2
-rw-r--r--cli/tests/integration/test_tests.rs2
-rw-r--r--cli/tests/testdata/package_json/basic/fail_check.ts2
-rw-r--r--cli/tests/testdata/package_json/basic/lib.bench.out (renamed from cli/tests/testdata/package_json/basic/main.bench.out)5
-rw-r--r--cli/tests/testdata/package_json/basic/lib.bench.ts (renamed from cli/tests/testdata/package_json/basic/main.bench.ts)2
-rw-r--r--cli/tests/testdata/package_json/basic/lib.test.out (renamed from cli/tests/testdata/package_json/basic/main.test.out)5
-rw-r--r--cli/tests/testdata/package_json/basic/lib.test.ts (renamed from cli/tests/testdata/package_json/basic/main.test.ts)2
-rw-r--r--cli/tests/testdata/package_json/basic/lib.ts9
-rw-r--r--cli/tests/testdata/package_json/basic/main.info.out7
-rw-r--r--cli/tests/testdata/package_json/basic/main.ts12
10 files changed, 24 insertions, 24 deletions
diff --git a/cli/tests/integration/bench_tests.rs b/cli/tests/integration/bench_tests.rs
index 5a010ec62..240c4b2d4 100644
--- a/cli/tests/integration/bench_tests.rs
+++ b/cli/tests/integration/bench_tests.rs
@@ -220,7 +220,7 @@ fn file_protocol() {
itest!(package_json_basic {
args: "bench",
- output: "package_json/basic/main.bench.out",
+ output: "package_json/basic/lib.bench.out",
envs: env_vars_for_npm_tests(),
http_server: true,
cwd: Some("package_json/basic"),
diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs
index 8b318e8e1..d52109d2b 100644
--- a/cli/tests/integration/test_tests.rs
+++ b/cli/tests/integration/test_tests.rs
@@ -456,7 +456,7 @@ itest!(parallel_output {
itest!(package_json_basic {
args: "test",
- output: "package_json/basic/main.test.out",
+ output: "package_json/basic/lib.test.out",
envs: env_vars_for_npm_tests(),
http_server: true,
cwd: Some("package_json/basic"),
diff --git a/cli/tests/testdata/package_json/basic/fail_check.ts b/cli/tests/testdata/package_json/basic/fail_check.ts
index ce849d92f..cef10763d 100644
--- a/cli/tests/testdata/package_json/basic/fail_check.ts
+++ b/cli/tests/testdata/package_json/basic/fail_check.ts
@@ -1,3 +1,3 @@
-import { getValue } from "./main.ts";
+import { getValue } from "./lib.ts";
const _test: string = getValue();
diff --git a/cli/tests/testdata/package_json/basic/main.bench.out b/cli/tests/testdata/package_json/basic/lib.bench.out
index db0db2114..589f17655 100644
--- a/cli/tests/testdata/package_json/basic/main.bench.out
+++ b/cli/tests/testdata/package_json/basic/lib.bench.out
@@ -1,11 +1,10 @@
Download http://localhost:4545/npm/registry/@denotest/esm-basic
Download http://localhost:4545/npm/registry/@denotest/esm-basic/1.0.0.tgz
-Check file:///[WILDCARD]/main.bench.ts
-0
+Check file:///[WILDCARD]/lib.bench.ts
cpu: [WILDCARD]
runtime: [WILDCARD]
-file:///[WILDCARD]/main.bench.ts
+file:///[WILDCARD]/lib.bench.ts
[WILDCARD]
-------------------------------------------------- -----------------------------
should add [WILDCARD]
diff --git a/cli/tests/testdata/package_json/basic/main.bench.ts b/cli/tests/testdata/package_json/basic/lib.bench.ts
index 51bfc7bba..e6b79d025 100644
--- a/cli/tests/testdata/package_json/basic/main.bench.ts
+++ b/cli/tests/testdata/package_json/basic/lib.bench.ts
@@ -1,4 +1,4 @@
-import { add } from "./main.ts";
+import { add } from "./lib.ts";
Deno.bench("should add", () => {
if (add(1, 2) !== 3) {
diff --git a/cli/tests/testdata/package_json/basic/main.test.out b/cli/tests/testdata/package_json/basic/lib.test.out
index b04420b3b..f0fe89612 100644
--- a/cli/tests/testdata/package_json/basic/main.test.out
+++ b/cli/tests/testdata/package_json/basic/lib.test.out
@@ -1,8 +1,7 @@
Download http://localhost:4545/npm/registry/@denotest/esm-basic
Download http://localhost:4545/npm/registry/@denotest/esm-basic/1.0.0.tgz
-Check file://[WILDCARD]/main.test.ts
-0
-running 1 test from [WILDCARD]main.test.ts
+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/cli/tests/testdata/package_json/basic/main.test.ts b/cli/tests/testdata/package_json/basic/lib.test.ts
index 298ce1f5b..4e833e1f3 100644
--- a/cli/tests/testdata/package_json/basic/main.test.ts
+++ b/cli/tests/testdata/package_json/basic/lib.test.ts
@@ -1,4 +1,4 @@
-import { add } from "./main.ts";
+import { add } from "./lib.ts";
Deno.test("should add", () => {
if (add(1, 2) !== 3) {
diff --git a/cli/tests/testdata/package_json/basic/lib.ts b/cli/tests/testdata/package_json/basic/lib.ts
new file mode 100644
index 000000000..1deed81f7
--- /dev/null
+++ b/cli/tests/testdata/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/cli/tests/testdata/package_json/basic/main.info.out b/cli/tests/testdata/package_json/basic/main.info.out
index 48c10a0ba..bf36f4f19 100644
--- a/cli/tests/testdata/package_json/basic/main.info.out
+++ b/cli/tests/testdata/package_json/basic/main.info.out
@@ -1,7 +1,8 @@
local: [WILDCARD]main.ts
type: TypeScript
-dependencies: 1 unique
+dependencies: 2 unique
size: [WILDCARD]
-file://[WILDCARD]/package_json/basic/main.ts ([WILDCARD])
-└── npm:@denotest/esm-basic@1.0.0 ([WILDCARD])
+file:///[WILDCARD]/main.ts (63B)
+└─┬ file:///[WILDCARD]/lib.ts (166B)
+ └── npm:@denotest/esm-basic@1.0.0 (345B)
diff --git a/cli/tests/testdata/package_json/basic/main.ts b/cli/tests/testdata/package_json/basic/main.ts
index 5911fe32d..e241f3002 100644
--- a/cli/tests/testdata/package_json/basic/main.ts
+++ b/cli/tests/testdata/package_json/basic/main.ts
@@ -1,11 +1,3 @@
-import * as test from "@denotest/esm-basic";
+import { getValue } from "./lib.ts";
-console.log(test.getValue());
-
-export function add(a: number, b: number) {
- return a + b;
-}
-
-export function getValue() {
- return test.getValue();
-}
+console.log(getValue());