mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
chore: fix flaky package_json_basic tests (#17940)
https://github.com/denoland/deno/actions/runs/4267836955/jobs/7429836369 Closes #17946
This commit is contained in:
parent
3cd24fa8d0
commit
da5b5d4688
10 changed files with 24 additions and 24 deletions
|
@ -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"),
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
import { getValue } from "./main.ts";
|
||||
import { getValue } from "./lib.ts";
|
||||
|
||||
const _test: string = getValue();
|
||||
|
|
|
@ -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]
|
|
@ -1,4 +1,4 @@
|
|||
import { add } from "./main.ts";
|
||||
import { add } from "./lib.ts";
|
||||
|
||||
Deno.bench("should add", () => {
|
||||
if (add(1, 2) !== 3) {
|
|
@ -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])
|
|
@ -1,4 +1,4 @@
|
|||
import { add } from "./main.ts";
|
||||
import { add } from "./lib.ts";
|
||||
|
||||
Deno.test("should add", () => {
|
||||
if (add(1, 2) !== 3) {
|
9
cli/tests/testdata/package_json/basic/lib.ts
vendored
Normal file
9
cli/tests/testdata/package_json/basic/lib.ts
vendored
Normal file
|
@ -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();
|
||||
}
|
|
@ -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)
|
||||
|
|
12
cli/tests/testdata/package_json/basic/main.ts
vendored
12
cli/tests/testdata/package_json/basic/main.ts
vendored
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue