diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration/publish_tests.rs | 10 | ||||
-rw-r--r-- | cli/tests/testdata/publish/deno_jsonc.out | 6 | ||||
-rw-r--r-- | cli/tests/testdata/publish/deno_jsonc/deno.jsonc | 11 | ||||
-rw-r--r-- | cli/tests/testdata/publish/deno_jsonc/mod.ts | 5 | ||||
-rw-r--r-- | cli/tests/testdata/publish/deno_jsonc/std_http.ts | 6 | ||||
-rw-r--r-- | cli/tests/testdata/publish/missing_deno_json.out | 2 |
6 files changed, 39 insertions, 1 deletions
diff --git a/cli/tests/integration/publish_tests.rs b/cli/tests/integration/publish_tests.rs index a28736fac..e185065aa 100644 --- a/cli/tests/integration/publish_tests.rs +++ b/cli/tests/integration/publish_tests.rs @@ -71,6 +71,16 @@ itest!(successful { temp_cwd: true, }); +itest!(config_file_jsonc { + args: "publish --token 'sadfasdf'", + output: "publish/deno_jsonc.out", + cwd: Some("publish/deno_jsonc"), + copy_temp_dir: Some("publish/deno_jsonc"), + envs: env_vars_for_registry(), + http_server: true, + temp_cwd: true, +}); + itest!(workspace_all { args: "publish --token 'sadfasdf'", output: "publish/workspace.out", diff --git a/cli/tests/testdata/publish/deno_jsonc.out b/cli/tests/testdata/publish/deno_jsonc.out new file mode 100644 index 000000000..2d5e4ffea --- /dev/null +++ b/cli/tests/testdata/publish/deno_jsonc.out @@ -0,0 +1,6 @@ +Checking fast check type graph for errors... +Ensuring type checks... +Check file:///[WILDCARD]/publish/deno_jsonc/mod.ts +Publishing @foo/bar@1.0.0 ... +Successfully published @foo/bar@1.0.0 +Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/cli/tests/testdata/publish/deno_jsonc/deno.jsonc b/cli/tests/testdata/publish/deno_jsonc/deno.jsonc new file mode 100644 index 000000000..4c9dfb08c --- /dev/null +++ b/cli/tests/testdata/publish/deno_jsonc/deno.jsonc @@ -0,0 +1,11 @@ +{ + // It's .jsonc file so it can have comments + "name": "@foo/bar", + "version": "1.0.0", + "exports": { + ".": "./mod.ts" + }, + "imports": { + "@std/http": "./std_http.ts" + } +} diff --git a/cli/tests/testdata/publish/deno_jsonc/mod.ts b/cli/tests/testdata/publish/deno_jsonc/mod.ts new file mode 100644 index 000000000..4bb6da255 --- /dev/null +++ b/cli/tests/testdata/publish/deno_jsonc/mod.ts @@ -0,0 +1,5 @@ +import http from "@std/http"; + +export function foobar(): { fileServer(): void } { + return http.fileServer; +} diff --git a/cli/tests/testdata/publish/deno_jsonc/std_http.ts b/cli/tests/testdata/publish/deno_jsonc/std_http.ts new file mode 100644 index 000000000..9d57b36f3 --- /dev/null +++ b/cli/tests/testdata/publish/deno_jsonc/std_http.ts @@ -0,0 +1,6 @@ +// temp until we get jsr:@std/http in the test server +export default { + fileServer() { + console.log("Hi"); + }, +}; diff --git a/cli/tests/testdata/publish/missing_deno_json.out b/cli/tests/testdata/publish/missing_deno_json.out index adaf33ea8..adb472c71 100644 --- a/cli/tests/testdata/publish/missing_deno_json.out +++ b/cli/tests/testdata/publish/missing_deno_json.out @@ -1 +1 @@ -error: Failed to read deno.json file at [WILDCARD]missing_deno_json[WILDCARD]
\ No newline at end of file +error: Couldn't find a deno.json or a deno.jsonc configuration file in [WILDCARD]
\ No newline at end of file |