diff options
Diffstat (limited to 'cli/tests/testdata/package_json')
11 files changed, 69 insertions, 0 deletions
diff --git a/cli/tests/testdata/package_json/basic/fail_check.check.out b/cli/tests/testdata/package_json/basic/fail_check.check.out new file mode 100644 index 000000000..03997a051 --- /dev/null +++ b/cli/tests/testdata/package_json/basic/fail_check.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/cli/tests/testdata/package_json/basic/fail_check.ts b/cli/tests/testdata/package_json/basic/fail_check.ts new file mode 100644 index 000000000..ce849d92f --- /dev/null +++ b/cli/tests/testdata/package_json/basic/fail_check.ts @@ -0,0 +1,3 @@ +import { getValue } from "./main.ts"; + +const _test: string = getValue(); diff --git a/cli/tests/testdata/package_json/basic/main.bench.out b/cli/tests/testdata/package_json/basic/main.bench.out new file mode 100644 index 000000000..db0db2114 --- /dev/null +++ b/cli/tests/testdata/package_json/basic/main.bench.out @@ -0,0 +1,11 @@ +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 +cpu: [WILDCARD] +runtime: [WILDCARD] + +file:///[WILDCARD]/main.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/main.bench.ts new file mode 100644 index 000000000..51bfc7bba --- /dev/null +++ b/cli/tests/testdata/package_json/basic/main.bench.ts @@ -0,0 +1,7 @@ +import { add } from "./main.ts"; + +Deno.bench("should add", () => { + if (add(1, 2) !== 3) { + throw new Error("Fail"); + } +}); diff --git a/cli/tests/testdata/package_json/basic/main.cache.out b/cli/tests/testdata/package_json/basic/main.cache.out new file mode 100644 index 000000000..4be62e9eb --- /dev/null +++ b/cli/tests/testdata/package_json/basic/main.cache.out @@ -0,0 +1,2 @@ +Download http://localhost:4545/npm/registry/@denotest/esm-basic +Download http://localhost:4545/npm/registry/@denotest/esm-basic/1.0.0.tgz diff --git a/cli/tests/testdata/package_json/basic/main.check.out b/cli/tests/testdata/package_json/basic/main.check.out new file mode 100644 index 000000000..09c377314 --- /dev/null +++ b/cli/tests/testdata/package_json/basic/main.check.out @@ -0,0 +1,3 @@ +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.ts diff --git a/cli/tests/testdata/package_json/basic/main.info.out b/cli/tests/testdata/package_json/basic/main.info.out new file mode 100644 index 000000000..48c10a0ba --- /dev/null +++ b/cli/tests/testdata/package_json/basic/main.info.out @@ -0,0 +1,7 @@ +local: [WILDCARD]main.ts +type: TypeScript +dependencies: 1 unique +size: [WILDCARD] + +file://[WILDCARD]/package_json/basic/main.ts ([WILDCARD]) +└── npm:@denotest/esm-basic@1.0.0 ([WILDCARD]) diff --git a/cli/tests/testdata/package_json/basic/main.test.out b/cli/tests/testdata/package_json/basic/main.test.out new file mode 100644 index 000000000..b04420b3b --- /dev/null +++ b/cli/tests/testdata/package_json/basic/main.test.out @@ -0,0 +1,9 @@ +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 +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/main.test.ts new file mode 100644 index 000000000..298ce1f5b --- /dev/null +++ b/cli/tests/testdata/package_json/basic/main.test.ts @@ -0,0 +1,7 @@ +import { add } from "./main.ts"; + +Deno.test("should add", () => { + if (add(1, 2) !== 3) { + throw new Error("Fail"); + } +}); diff --git a/cli/tests/testdata/package_json/basic/main.ts b/cli/tests/testdata/package_json/basic/main.ts new file mode 100644 index 000000000..5911fe32d --- /dev/null +++ b/cli/tests/testdata/package_json/basic/main.ts @@ -0,0 +1,11 @@ +import * as test from "@denotest/esm-basic"; + +console.log(test.getValue()); + +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/package.json b/cli/tests/testdata/package_json/basic/package.json new file mode 100644 index 000000000..54ca824d6 --- /dev/null +++ b/cli/tests/testdata/package_json/basic/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/esm-basic": "*" + } +} |