diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/publish_tests.rs | 8 | ||||
-rw-r--r-- | tests/testdata/publish/jsr_jsonc/jsr.jsonc | 11 | ||||
-rw-r--r-- | tests/testdata/publish/jsr_jsonc/mod.out | 6 | ||||
-rw-r--r-- | tests/testdata/publish/jsr_jsonc/mod.ts | 7 | ||||
-rw-r--r-- | tests/testdata/publish/jsr_jsonc/std_http.ts | 6 | ||||
-rw-r--r-- | tests/testdata/publish/missing_deno_json.out | 2 |
6 files changed, 39 insertions, 1 deletions
diff --git a/tests/integration/publish_tests.rs b/tests/integration/publish_tests.rs index e1626ae8d..d2ea27906 100644 --- a/tests/integration/publish_tests.rs +++ b/tests/integration/publish_tests.rs @@ -224,6 +224,14 @@ itest!(config_flag { http_server: true, }); +itest!(jsr_jsonc { + args: "publish --token 'sadfasdf'", + cwd: Some("publish/jsr_jsonc"), + output: "publish/jsr_jsonc/mod.out", + envs: env_vars_for_jsr_tests(), + http_server: true, +}); + #[test] fn ignores_gitignore() { let context = publish_context_builder().build(); diff --git a/tests/testdata/publish/jsr_jsonc/jsr.jsonc b/tests/testdata/publish/jsr_jsonc/jsr.jsonc new file mode 100644 index 000000000..4c9dfb08c --- /dev/null +++ b/tests/testdata/publish/jsr_jsonc/jsr.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/tests/testdata/publish/jsr_jsonc/mod.out b/tests/testdata/publish/jsr_jsonc/mod.out new file mode 100644 index 000000000..38b61d568 --- /dev/null +++ b/tests/testdata/publish/jsr_jsonc/mod.out @@ -0,0 +1,6 @@ +Check file:///[WILDCARD]/publish/jsr_jsonc/mod.ts +Checking for slow types in the public API... +Check file:///[WILDCARD]/publish/jsr_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/tests/testdata/publish/jsr_jsonc/mod.ts b/tests/testdata/publish/jsr_jsonc/mod.ts new file mode 100644 index 000000000..6e8a61bae --- /dev/null +++ b/tests/testdata/publish/jsr_jsonc/mod.ts @@ -0,0 +1,7 @@ +import http from "@std/http"; + +export function foobar(): { fileServer(): void } { + return { + fileServer: http.fileServer, + }; +} diff --git a/tests/testdata/publish/jsr_jsonc/std_http.ts b/tests/testdata/publish/jsr_jsonc/std_http.ts new file mode 100644 index 000000000..9d57b36f3 --- /dev/null +++ b/tests/testdata/publish/jsr_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/tests/testdata/publish/missing_deno_json.out b/tests/testdata/publish/missing_deno_json.out index adb472c71..2c074bf83 100644 --- a/tests/testdata/publish/missing_deno_json.out +++ b/tests/testdata/publish/missing_deno_json.out @@ -1 +1 @@ -error: Couldn't find a deno.json or a deno.jsonc configuration file in [WILDCARD]
\ No newline at end of file +error: Couldn't find a deno.json, deno.jsonc, jsr.json or jsr.jsonc configuration file in [WILDCARD]
\ No newline at end of file |