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/publish/javascript_missing_decl_file | |
parent | b02ffec37c73be8a73b95b33b32efa693e84e01b (diff) |
chore: migrate bench, publish, and more itests to spec tests (#23584)
Diffstat (limited to 'tests/specs/publish/javascript_missing_decl_file')
5 files changed, 39 insertions, 0 deletions
diff --git a/tests/specs/publish/javascript_missing_decl_file/__test__.jsonc b/tests/specs/publish/javascript_missing_decl_file/__test__.jsonc new file mode 100644 index 000000000..1e760cf22 --- /dev/null +++ b/tests/specs/publish/javascript_missing_decl_file/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "publish --token 'sadfasdf'", + "output": "javascript_missing_decl_file.out", + "exitCode": 0 +} diff --git a/tests/specs/publish/javascript_missing_decl_file/deno.json b/tests/specs/publish/javascript_missing_decl_file/deno.json new file mode 100644 index 000000000..e12927c26 --- /dev/null +++ b/tests/specs/publish/javascript_missing_decl_file/deno.json @@ -0,0 +1,8 @@ +{ + "name": "@foo/bar", + "version": "1.0.0", + "exports": { + ".": "./mod.js", + "./other": "./other.js" + } +} diff --git a/tests/specs/publish/javascript_missing_decl_file/javascript_missing_decl_file.out b/tests/specs/publish/javascript_missing_decl_file/javascript_missing_decl_file.out new file mode 100644 index 000000000..08e92e320 --- /dev/null +++ b/tests/specs/publish/javascript_missing_decl_file/javascript_missing_decl_file.out @@ -0,0 +1,20 @@ +Checking for slow types in the public API... +warning[unsupported-javascript-entrypoint]: used a JavaScript module without type declarations as an entrypoint + --> [WILDCARD]mod.js + = hint: add a type declaration (d.ts) for the JavaScript module, or rewrite it to TypeScript + + info: JavaScript files with no corresponding declaration require type inference to be type checked + info: fast check avoids type inference, so JavaScript entrypoints should be avoided + docs: https://jsr.io/go/slow-type-unsupported-javascript-entrypoint + +warning[unsupported-javascript-entrypoint]: used a JavaScript module without type declarations as an entrypoint + --> [WILDCARD]other.js + = hint: add a type declaration (d.ts) for the JavaScript module, or rewrite it to TypeScript + + info: JavaScript files with no corresponding declaration require type inference to be type checked + info: fast check avoids type inference, so JavaScript entrypoints should be avoided + docs: https://jsr.io/go/slow-type-unsupported-javascript-entrypoint + +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/specs/publish/javascript_missing_decl_file/mod.js b/tests/specs/publish/javascript_missing_decl_file/mod.js new file mode 100644 index 000000000..4a62fa5b4 --- /dev/null +++ b/tests/specs/publish/javascript_missing_decl_file/mod.js @@ -0,0 +1,3 @@ +export function getRandom() { + return Math.random(); +} diff --git a/tests/specs/publish/javascript_missing_decl_file/other.js b/tests/specs/publish/javascript_missing_decl_file/other.js new file mode 100644 index 000000000..89ffb80ba --- /dev/null +++ b/tests/specs/publish/javascript_missing_decl_file/other.js @@ -0,0 +1,3 @@ +export function other() { + return Math.random(); +} |