mirror of
https://github.com/denoland/deno.git
synced 2025-02-21 12:53:05 -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
86785f2119
commit
a07adc1a88
10 changed files with 24 additions and 24 deletions
|
@ -220,7 +220,7 @@ fn file_protocol() {
|
||||||
|
|
||||||
itest!(package_json_basic {
|
itest!(package_json_basic {
|
||||||
args: "bench",
|
args: "bench",
|
||||||
output: "package_json/basic/main.bench.out",
|
output: "package_json/basic/lib.bench.out",
|
||||||
envs: env_vars_for_npm_tests(),
|
envs: env_vars_for_npm_tests(),
|
||||||
http_server: true,
|
http_server: true,
|
||||||
cwd: Some("package_json/basic"),
|
cwd: Some("package_json/basic"),
|
||||||
|
|
|
@ -456,7 +456,7 @@ itest!(parallel_output {
|
||||||
|
|
||||||
itest!(package_json_basic {
|
itest!(package_json_basic {
|
||||||
args: "test",
|
args: "test",
|
||||||
output: "package_json/basic/main.test.out",
|
output: "package_json/basic/lib.test.out",
|
||||||
envs: env_vars_for_npm_tests(),
|
envs: env_vars_for_npm_tests(),
|
||||||
http_server: true,
|
http_server: true,
|
||||||
cwd: Some("package_json/basic"),
|
cwd: Some("package_json/basic"),
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import { getValue } from "./main.ts";
|
import { getValue } from "./lib.ts";
|
||||||
|
|
||||||
const _test: string = getValue();
|
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
|
||||||
Download http://localhost:4545/npm/registry/@denotest/esm-basic/1.0.0.tgz
|
Download http://localhost:4545/npm/registry/@denotest/esm-basic/1.0.0.tgz
|
||||||
Check file:///[WILDCARD]/main.bench.ts
|
Check file:///[WILDCARD]/lib.bench.ts
|
||||||
0
|
|
||||||
cpu: [WILDCARD]
|
cpu: [WILDCARD]
|
||||||
runtime: [WILDCARD]
|
runtime: [WILDCARD]
|
||||||
|
|
||||||
file:///[WILDCARD]/main.bench.ts
|
file:///[WILDCARD]/lib.bench.ts
|
||||||
[WILDCARD]
|
[WILDCARD]
|
||||||
-------------------------------------------------- -----------------------------
|
-------------------------------------------------- -----------------------------
|
||||||
should add [WILDCARD]
|
should add [WILDCARD]
|
|
@ -1,4 +1,4 @@
|
||||||
import { add } from "./main.ts";
|
import { add } from "./lib.ts";
|
||||||
|
|
||||||
Deno.bench("should add", () => {
|
Deno.bench("should add", () => {
|
||||||
if (add(1, 2) !== 3) {
|
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
|
||||||
Download http://localhost:4545/npm/registry/@denotest/esm-basic/1.0.0.tgz
|
Download http://localhost:4545/npm/registry/@denotest/esm-basic/1.0.0.tgz
|
||||||
Check file://[WILDCARD]/main.test.ts
|
Check file://[WILDCARD]/lib.test.ts
|
||||||
0
|
running 1 test from [WILDCARD]lib.test.ts
|
||||||
running 1 test from [WILDCARD]main.test.ts
|
|
||||||
should add ... ok ([WILDCARD])
|
should add ... ok ([WILDCARD])
|
||||||
|
|
||||||
ok | 1 passed | 0 failed ([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", () => {
|
Deno.test("should add", () => {
|
||||||
if (add(1, 2) !== 3) {
|
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
|
local: [WILDCARD]main.ts
|
||||||
type: TypeScript
|
type: TypeScript
|
||||||
dependencies: 1 unique
|
dependencies: 2 unique
|
||||||
size: [WILDCARD]
|
size: [WILDCARD]
|
||||||
|
|
||||||
file://[WILDCARD]/package_json/basic/main.ts ([WILDCARD])
|
file:///[WILDCARD]/main.ts (63B)
|
||||||
└── npm:@denotest/esm-basic@1.0.0 ([WILDCARD])
|
└─┬ 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());
|
console.log(getValue());
|
||||||
|
|
||||||
export function add(a: number, b: number) {
|
|
||||||
return a + b;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getValue() {
|
|
||||||
return test.getValue();
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue