diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2024-04-29 10:08:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-29 10:08:27 -0400 |
| commit | da52058a945999d486b07700d2834f027a65947c (patch) | |
| tree | b6031c274cbc36dcefc6d681473e366cdb208c89 /tests/specs/run/no_deno_json/code | |
| parent | b02ffec37c73be8a73b95b33b32efa693e84e01b (diff) | |
chore: migrate bench, publish, and more itests to spec tests (#23584)
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] +} |
