diff options
Diffstat (limited to 'tests/specs/run/no_deno_json/code')
6 files changed, 32 insertions, 0 deletions
diff --git a/tests/specs/run/no_deno_json/code/main.ts b/tests/specs/run/no_deno_json/code/main.ts new file mode 100644 index 000000000..1e6e50040 --- /dev/null +++ b/tests/specs/run/no_deno_json/code/main.ts @@ -0,0 +1,4 @@ +import chalk from "chalk"; + +console.log("ok"); +console.log(chalk); diff --git a/tests/specs/run/no_deno_json/code/no_package_json_imports.ts b/tests/specs/run/no_deno_json/code/no_package_json_imports.ts new file mode 100644 index 000000000..0f3785f91 --- /dev/null +++ b/tests/specs/run/no_deno_json/code/no_package_json_imports.ts @@ -0,0 +1 @@ +console.log(5); diff --git a/tests/specs/run/no_deno_json/code/noconfig.ts b/tests/specs/run/no_deno_json/code/noconfig.ts new file mode 100644 index 000000000..e6f77f92b --- /dev/null +++ b/tests/specs/run/no_deno_json/code/noconfig.ts @@ -0,0 +1,8 @@ +// ensure the cwd is this directory +const cwd = Deno.cwd(); +if (!cwd.endsWith("code")) { + console.log(cwd); + throw "FAIL"; +} else { + console.log("success"); +} diff --git a/tests/specs/run/no_deno_json/code/package.json b/tests/specs/run/no_deno_json/code/package.json new file mode 100644 index 000000000..a85b890a8 --- /dev/null +++ b/tests/specs/run/no_deno_json/code/package.json @@ -0,0 +1,9 @@ +{ + "dependencies": { + "@denotest/check-error": "1.0.0", + "chalk": "4" + }, + "devDependencies": { + "@denotest/cjs-default-export": "1.0.0" + } +} diff --git a/tests/specs/run/no_deno_json/code/sub_dir/main.js b/tests/specs/run/no_deno_json/code/sub_dir/main.js new file mode 100644 index 000000000..492a8fa40 --- /dev/null +++ b/tests/specs/run/no_deno_json/code/sub_dir/main.js @@ -0,0 +1,3 @@ +import "chalk"; +console.log(Deno.cwd()); +console.log(Deno.statSync("../node_modules")); diff --git a/tests/specs/run/no_deno_json/code/sub_dir/main.out b/tests/specs/run/no_deno_json/code/sub_dir/main.out new file mode 100644 index 000000000..0ec791960 --- /dev/null +++ b/tests/specs/run/no_deno_json/code/sub_dir/main.out @@ -0,0 +1,7 @@ +Download http://[WILDCARD] +[WILDCARD]sub_dir +{ + [WILDCARD] + isDirectory: true, + [WILDCARD] +} |