diff options
Diffstat (limited to 'tests/specs/run/package_json/with_deno_json')
7 files changed, 55 insertions, 0 deletions
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": "*" + } +} |