diff options
Diffstat (limited to 'cli/tests/testdata/check')
49 files changed, 0 insertions, 244 deletions
diff --git a/cli/tests/testdata/check/all/check_all.out b/cli/tests/testdata/check/all/check_all.out deleted file mode 100644 index 344264634..000000000 --- a/cli/tests/testdata/check/all/check_all.out +++ /dev/null @@ -1,4 +0,0 @@ -error: TS2322 [ERROR]: Type '12' is not assignable to type '"a"'. -export const a: "a" = 12; - ^ - at http://localhost:4545/subdir/type_error.ts:1:14 diff --git a/cli/tests/testdata/check/all/check_all.ts b/cli/tests/testdata/check/all/check_all.ts deleted file mode 100644 index 2ae8c2692..000000000 --- a/cli/tests/testdata/check/all/check_all.ts +++ /dev/null @@ -1,3 +0,0 @@ -import * as a from "http://localhost:4545/subdir/type_error.ts"; - -console.log(a.a); diff --git a/cli/tests/testdata/check/broadcast_channel.ts b/cli/tests/testdata/check/broadcast_channel.ts deleted file mode 100644 index 6c75b4a8e..000000000 --- a/cli/tests/testdata/check/broadcast_channel.ts +++ /dev/null @@ -1 +0,0 @@ -const _channel = new BroadcastChannel("foo"); diff --git a/cli/tests/testdata/check/cache_config_on_off/deno.json b/cli/tests/testdata/check/cache_config_on_off/deno.json deleted file mode 100644 index 8ad9c9801..000000000 --- a/cli/tests/testdata/check/cache_config_on_off/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "compilerOptions": { - "strict": false - } -} diff --git a/cli/tests/testdata/check/cache_config_on_off/main.ts b/cli/tests/testdata/check/cache_config_on_off/main.ts deleted file mode 100644 index 0f3785f91..000000000 --- a/cli/tests/testdata/check/cache_config_on_off/main.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(5); diff --git a/cli/tests/testdata/check/declaration_header_file_with_no_exports.ts b/cli/tests/testdata/check/declaration_header_file_with_no_exports.ts deleted file mode 100644 index ef5da7a38..000000000 --- a/cli/tests/testdata/check/declaration_header_file_with_no_exports.ts +++ /dev/null @@ -1,2 +0,0 @@ -import * as foo from "./declaration_header_file_with_no_exports_js.js"; -console.log(foo); diff --git a/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.d.ts b/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.d.ts deleted file mode 100644 index e69de29bb..000000000 --- a/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.d.ts +++ /dev/null diff --git a/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js b/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js deleted file mode 100644 index b8ae2bcef..000000000 --- a/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js +++ /dev/null @@ -1 +0,0 @@ -/// <reference types="./declaration_header_file_with_no_exports_js.d.ts" /> diff --git a/cli/tests/testdata/check/deno_not_found/main.out b/cli/tests/testdata/check/deno_not_found/main.out deleted file mode 100644 index dc4a682c7..000000000 --- a/cli/tests/testdata/check/deno_not_found/main.out +++ /dev/null @@ -1,4 +0,0 @@ -error: TS2304 [ERROR]: Cannot find name 'Deno'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'deno.ns' or add a triple-slash directive to the top of your entrypoint (main file): /// <reference lib="deno.ns" /> -Deno; -~~~~ - at file:///[WILDCARD]/check/deno_not_found/main.ts:4:1 diff --git a/cli/tests/testdata/check/deno_not_found/main.ts b/cli/tests/testdata/check/deno_not_found/main.ts deleted file mode 100644 index 3269f047a..000000000 --- a/cli/tests/testdata/check/deno_not_found/main.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// <reference no-default-lib="true"/> -/// <reference lib="es5" /> - -Deno; diff --git a/cli/tests/testdata/check/dts/check_dts.d.ts b/cli/tests/testdata/check/dts/check_dts.d.ts deleted file mode 100644 index 9cf60f063..000000000 --- a/cli/tests/testdata/check/dts/check_dts.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// TS1039 [ERROR]: Initializers are not allowed in ambient contexts. -export const a: string = Deno.version.deno; diff --git a/cli/tests/testdata/check/dts/check_dts.out b/cli/tests/testdata/check/dts/check_dts.out deleted file mode 100644 index e7ff9a009..000000000 --- a/cli/tests/testdata/check/dts/check_dts.out +++ /dev/null @@ -1,4 +0,0 @@ -error: TS1039 [ERROR]: Initializers are not allowed in ambient contexts. -export const a: string = Deno.version.deno; - ~~~~~~~~~~~~~~~~~ - at file:///[WILDCARD]/check_dts.d.ts:2:26 diff --git a/cli/tests/testdata/check/exclude_option/deno.exclude_dir.json b/cli/tests/testdata/check/exclude_option/deno.exclude_dir.json deleted file mode 100644 index 2019f8953..000000000 --- a/cli/tests/testdata/check/exclude_option/deno.exclude_dir.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "exclude": [ - "ignored" - ] -} diff --git a/cli/tests/testdata/check/exclude_option/deno.exclude_glob.json b/cli/tests/testdata/check/exclude_option/deno.exclude_glob.json deleted file mode 100644 index 1d203ba08..000000000 --- a/cli/tests/testdata/check/exclude_option/deno.exclude_glob.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "exclude": [ - "ignored/**/*" - ] -} diff --git a/cli/tests/testdata/check/exclude_option/deno.json b/cli/tests/testdata/check/exclude_option/deno.json deleted file mode 100644 index a9eca74ca..000000000 --- a/cli/tests/testdata/check/exclude_option/deno.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "exclude": [] -} diff --git a/cli/tests/testdata/check/exclude_option/exclude_option.ts.error.out b/cli/tests/testdata/check/exclude_option/exclude_option.ts.error.out deleted file mode 100644 index abd1c1258..000000000 --- a/cli/tests/testdata/check/exclude_option/exclude_option.ts.error.out +++ /dev/null @@ -1,4 +0,0 @@ -error: TS2304 [ERROR]: Cannot find name 'nothing'. -export { nothing }; - ~~~~~~~ - at [WILDCARD] diff --git a/cli/tests/testdata/check/exclude_option/ignored/index.ts b/cli/tests/testdata/check/exclude_option/ignored/index.ts deleted file mode 100644 index 0419cf073..000000000 --- a/cli/tests/testdata/check/exclude_option/ignored/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { nothing }; diff --git a/cli/tests/testdata/check/exclude_option/index.ts b/cli/tests/testdata/check/exclude_option/index.ts deleted file mode 100644 index 8335ca3a2..000000000 --- a/cli/tests/testdata/check/exclude_option/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { nothing } from "./ignored/index.ts"; - -const foo = 1; - -export { foo, nothing }; diff --git a/cli/tests/testdata/check/excluded_file_specified/check.out b/cli/tests/testdata/check/excluded_file_specified/check.out deleted file mode 100644 index 2bc26aaaf..000000000 --- a/cli/tests/testdata/check/excluded_file_specified/check.out +++ /dev/null @@ -1 +0,0 @@ -Warning No matching files found. diff --git a/cli/tests/testdata/check/excluded_file_specified/deno.json b/cli/tests/testdata/check/excluded_file_specified/deno.json deleted file mode 100644 index 039be18df..000000000 --- a/cli/tests/testdata/check/excluded_file_specified/deno.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "types": ["./lib/types.d.ts"] - }, - "exclude": ["lib"] -} diff --git a/cli/tests/testdata/check/excluded_file_specified/lib/types.d.ts b/cli/tests/testdata/check/excluded_file_specified/lib/types.d.ts deleted file mode 100644 index a02ad0cbe..000000000 --- a/cli/tests/testdata/check/excluded_file_specified/lib/types.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// deno-lint-ignore-file -declare var test: number; diff --git a/cli/tests/testdata/check/export_equals_declaration_file/main.ts b/cli/tests/testdata/check/export_equals_declaration_file/main.ts deleted file mode 100644 index e20a735d5..000000000 --- a/cli/tests/testdata/check/export_equals_declaration_file/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @deno-types="./other.d.ts" -import Test, { type Attributes } from "./other.js"; - -const other: Attributes = {}; -console.log(Test()); -console.log(other); diff --git a/cli/tests/testdata/check/export_equals_declaration_file/other.d.ts b/cli/tests/testdata/check/export_equals_declaration_file/other.d.ts deleted file mode 100644 index 5e1274fa5..000000000 --- a/cli/tests/testdata/check/export_equals_declaration_file/other.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export = other; - -declare function other(): string; - -declare namespace other { - interface Attributes { - [attr: string]: string; - } -} diff --git a/cli/tests/testdata/check/export_equals_declaration_file/other.js b/cli/tests/testdata/check/export_equals_declaration_file/other.js deleted file mode 100644 index f66c03162..000000000 --- a/cli/tests/testdata/check/export_equals_declaration_file/other.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function other() { - return "test"; -} diff --git a/cli/tests/testdata/check/jsx_not_checked/main.jsx b/cli/tests/testdata/check/jsx_not_checked/main.jsx deleted file mode 100644 index 8de05f9f7..000000000 --- a/cli/tests/testdata/check/jsx_not_checked/main.jsx +++ /dev/null @@ -1,21 +0,0 @@ -// should not error about jsx-runtime not being found in types here -/** @jsxImportSource npm:react@18.2.0 */ - -import "./other.ts"; - -export default ( - <> - <h1>Hello world</h1> - <p>This is a JSX page</p> - </> -); - -/** - * @param {number} a - * @param {number} b - */ -function add(a, b) { - return a + b; -} - -console.log(add("1", "2")); diff --git a/cli/tests/testdata/check/jsx_not_checked/main.out b/cli/tests/testdata/check/jsx_not_checked/main.out deleted file mode 100644 index 82c1c2358..000000000 --- a/cli/tests/testdata/check/jsx_not_checked/main.out +++ /dev/null @@ -1,13 +0,0 @@ -[UNORDERED_START] -Download http://localhost:4545/npm/registry/react -Download http://localhost:4545/npm/registry/loose-envify -Download http://localhost:4545/npm/registry/js-tokens -Download http://localhost:4545/npm/registry/react/react-18.2.0.tgz -Download http://localhost:4545/npm/registry/loose-envify/loose-envify-1.4.0.tgz -Download http://localhost:4545/npm/registry/js-tokens/js-tokens-4.0.0.tgz -[UNORDERED_END] -Check file:///[WILDCARD]/jsx_not_checked/main.jsx -error: TS2345 [ERROR]: Argument of type 'string' is not assignable to parameter of type 'number'. -console.log(add("1", "2")); - ~~~ - at file:///[WILDCARD]/other.ts:5:17 diff --git a/cli/tests/testdata/check/jsx_not_checked/other.ts b/cli/tests/testdata/check/jsx_not_checked/other.ts deleted file mode 100644 index 47995cb0f..000000000 --- a/cli/tests/testdata/check/jsx_not_checked/other.ts +++ /dev/null @@ -1,5 +0,0 @@ -function add(a: number, b: number) { - return a + b; -} - -console.log(add("1", "2")); diff --git a/cli/tests/testdata/check/jsximportsource_importmap_config/deno.json b/cli/tests/testdata/check/jsximportsource_importmap_config/deno.json deleted file mode 100644 index 6d837af7c..000000000 --- a/cli/tests/testdata/check/jsximportsource_importmap_config/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "jsx" - }, - "importMap": "./import_map.json" -} diff --git a/cli/tests/testdata/check/jsximportsource_importmap_config/import_map.json b/cli/tests/testdata/check/jsximportsource_importmap_config/import_map.json deleted file mode 100644 index e926207af..000000000 --- a/cli/tests/testdata/check/jsximportsource_importmap_config/import_map.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "imports": { - "jsx/jsx-runtime": "./jsx_runtime.ts" - } -} diff --git a/cli/tests/testdata/check/jsximportsource_importmap_config/jsx_runtime.ts b/cli/tests/testdata/check/jsximportsource_importmap_config/jsx_runtime.ts deleted file mode 100644 index 33a07ca73..000000000 --- a/cli/tests/testdata/check/jsximportsource_importmap_config/jsx_runtime.ts +++ /dev/null @@ -1,4 +0,0 @@ -// deno-lint-ignore no-namespace -export namespace JSX { - export type IntrinsicElements = { [key: string]: unknown }; -} diff --git a/cli/tests/testdata/check/jsximportsource_importmap_config/main.bundle.js b/cli/tests/testdata/check/jsximportsource_importmap_config/main.bundle.js deleted file mode 100644 index 6f39c876e..000000000 --- a/cli/tests/testdata/check/jsximportsource_importmap_config/main.bundle.js +++ /dev/null @@ -1,9 +0,0 @@ -// deno-fmt-ignore-file -// deno-lint-ignore-file -// This code was bundled using `deno bundle` and it's not recommended to edit it manually - -const makeParagraph = ()=>jsx("p", { - children: "A paragraph!" - }); -export { makeParagraph as makeParagraph }; - diff --git a/cli/tests/testdata/check/jsximportsource_importmap_config/main.tsx b/cli/tests/testdata/check/jsximportsource_importmap_config/main.tsx deleted file mode 100644 index a1eb24f0b..000000000 --- a/cli/tests/testdata/check/jsximportsource_importmap_config/main.tsx +++ /dev/null @@ -1 +0,0 @@ -export const makeParagraph = () => <p>A paragraph!</p>; diff --git a/cli/tests/testdata/check/module_detection_force.ts b/cli/tests/testdata/check/module_detection_force.ts deleted file mode 100644 index 185ceb816..000000000 --- a/cli/tests/testdata/check/module_detection_force.ts +++ /dev/null @@ -1,3 +0,0 @@ -const a = 1; -await import("./module_detection_force/import.ts"); -console.log(a); diff --git a/cli/tests/testdata/check/module_detection_force/import.ts b/cli/tests/testdata/check/module_detection_force/import.ts deleted file mode 100644 index 66b229870..000000000 --- a/cli/tests/testdata/check/module_detection_force/import.ts +++ /dev/null @@ -1,2 +0,0 @@ -const a = 2; -console.log(a); diff --git a/cli/tests/testdata/check/module_detection_force/main.ts b/cli/tests/testdata/check/module_detection_force/main.ts deleted file mode 100644 index a55c9962b..000000000 --- a/cli/tests/testdata/check/module_detection_force/main.ts +++ /dev/null @@ -1,3 +0,0 @@ -const a = 1; -await import("./import.ts"); -console.log(a); diff --git a/cli/tests/testdata/check/no_error_truncation/deno.json b/cli/tests/testdata/check/no_error_truncation/deno.json deleted file mode 100644 index 643707ccc..000000000 --- a/cli/tests/testdata/check/no_error_truncation/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "compilerOptions": { - "noErrorTruncation": true - } -} diff --git a/cli/tests/testdata/check/no_error_truncation/main.out b/cli/tests/testdata/check/no_error_truncation/main.out deleted file mode 100644 index 13fd5aae4..000000000 --- a/cli/tests/testdata/check/no_error_truncation/main.out +++ /dev/null @@ -1,11 +0,0 @@ -error: TS2322 [ERROR]: Type '{ propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propertyWithAnExceedinglyLongName3: string; propertyWithAnExceedinglyLongName4: string; propertyWithAnExceedinglyLongName5: string; propertyWithAnExceedinglyLongName6: string; propertyWithAnExceedinglyLongName7: string; propertyWithAnExceedinglyLongName8: string; }' is not assignable to type 'string'. -const _s: string = x; - ~~ - at file:///[WILDCARD]/no_error_truncation/main.ts:12:7 - -TS2454 [ERROR]: Variable 'x' is used before being assigned. -const _s: string = x; - ^ - at file:///[WILDCARD]/no_error_truncation/main.ts:12:20 - -Found 2 errors. diff --git a/cli/tests/testdata/check/no_error_truncation/main.ts b/cli/tests/testdata/check/no_error_truncation/main.ts deleted file mode 100644 index bb1856602..000000000 --- a/cli/tests/testdata/check/no_error_truncation/main.ts +++ /dev/null @@ -1,12 +0,0 @@ -let x: { - propertyWithAnExceedinglyLongName1: string; - propertyWithAnExceedinglyLongName2: string; - propertyWithAnExceedinglyLongName3: string; - propertyWithAnExceedinglyLongName4: string; - propertyWithAnExceedinglyLongName5: string; - propertyWithAnExceedinglyLongName6: string; - propertyWithAnExceedinglyLongName7: string; - propertyWithAnExceedinglyLongName8: string; -}; - -const _s: string = x; diff --git a/cli/tests/testdata/check/node_builtin_modules/mod.js b/cli/tests/testdata/check/node_builtin_modules/mod.js deleted file mode 100644 index 196fb9be9..000000000 --- a/cli/tests/testdata/check/node_builtin_modules/mod.js +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-check -import fs from "node:fs"; -const _data = fs.readFileSync("./node_builtin.js", 123); diff --git a/cli/tests/testdata/check/node_builtin_modules/mod.js.out b/cli/tests/testdata/check/node_builtin_modules/mod.js.out deleted file mode 100644 index 97786ebae..000000000 --- a/cli/tests/testdata/check/node_builtin_modules/mod.js.out +++ /dev/null @@ -1,5 +0,0 @@ -error: TS2769 [ERROR]: No overload matches this call. - [WILDCARD] -const _data = fs.readFileSync("./node_builtin.js", 123); - ~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.js:3:52 diff --git a/cli/tests/testdata/check/node_builtin_modules/mod.ts b/cli/tests/testdata/check/node_builtin_modules/mod.ts deleted file mode 100644 index 0e62353fe..000000000 --- a/cli/tests/testdata/check/node_builtin_modules/mod.ts +++ /dev/null @@ -1,9 +0,0 @@ -import fs from "node:fs"; -const _data = fs.readFileSync("./node_builtin.js", 123); - -// check node:module specifically because for deno check it should -// resolve to the @types/node package, but at runtime it uses a different -// builtin object than deno_std -import { builtinModules } from "node:module"; -// should error about being string[] -const _testString: number[] = builtinModules; diff --git a/cli/tests/testdata/check/node_builtin_modules/mod.ts.out b/cli/tests/testdata/check/node_builtin_modules/mod.ts.out deleted file mode 100644 index 49b762cff..000000000 --- a/cli/tests/testdata/check/node_builtin_modules/mod.ts.out +++ /dev/null @@ -1,13 +0,0 @@ -error: TS2769 [ERROR]: No overload matches this call. - [WILDCARD] -const _data = fs.readFileSync("./node_builtin.js", 123); - ~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.ts:2:52 - -TS2322 [ERROR]: Type 'string[]' is not assignable to type 'number[]'. - Type 'string' is not assignable to type 'number'. -const _testString: number[] = builtinModules; - ~~~~~~~~~~~ - at file:///[WILDCARD]/node_builtin_modules/mod.ts:9:7 - -Found 2 errors. diff --git a/cli/tests/testdata/check/npm_install_diagnostics/main.out b/cli/tests/testdata/check/npm_install_diagnostics/main.out deleted file mode 100644 index fe46f0e42..000000000 --- a/cli/tests/testdata/check/npm_install_diagnostics/main.out +++ /dev/null @@ -1,11 +0,0 @@ -error: TS2581 [ERROR]: Cannot find name '$'. Did you mean to import jQuery? Try adding `import $ from "npm:jquery";`. -$; -^ - at file:///[WILDCARD]/npm_install_diagnostics/main.ts:1:1 - -TS2580 [ERROR]: Cannot find name 'process'. -process; -~~~~~~~ - at file:///[WILDCARD]/npm_install_diagnostics/main.ts:2:1 - -Found 2 errors. diff --git a/cli/tests/testdata/check/npm_install_diagnostics/main.ts b/cli/tests/testdata/check/npm_install_diagnostics/main.ts deleted file mode 100644 index 62c0c5619..000000000 --- a/cli/tests/testdata/check/npm_install_diagnostics/main.ts +++ /dev/null @@ -1,2 +0,0 @@ -$; -process; diff --git a/cli/tests/testdata/check/response_json.ts b/cli/tests/testdata/check/response_json.ts deleted file mode 100644 index e936f7bff..000000000 --- a/cli/tests/testdata/check/response_json.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// <reference no-default-lib="true" /> -/// <reference lib="dom" /> -/// <reference lib="esnext" /> - -Response.json({}); diff --git a/cli/tests/testdata/check/types_dts/deno.json b/cli/tests/testdata/check/types_dts/deno.json deleted file mode 100644 index 85f1549e0..000000000 --- a/cli/tests/testdata/check/types_dts/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "types": [ - "./types.d.ts" - ] - } -} diff --git a/cli/tests/testdata/check/types_dts/main.out b/cli/tests/testdata/check/types_dts/main.out deleted file mode 100644 index c769989e3..000000000 --- a/cli/tests/testdata/check/types_dts/main.out +++ /dev/null @@ -1 +0,0 @@ -Check file:///[WILDCARD]/check/types_dts/main.ts diff --git a/cli/tests/testdata/check/types_dts/main.ts b/cli/tests/testdata/check/types_dts/main.ts deleted file mode 100644 index ca375a094..000000000 --- a/cli/tests/testdata/check/types_dts/main.ts +++ /dev/null @@ -1,3 +0,0 @@ -console.log("Hello world!"); - -test.test(); diff --git a/cli/tests/testdata/check/types_dts/types.d.ts b/cli/tests/testdata/check/types_dts/types.d.ts deleted file mode 100644 index 141c2a3d3..000000000 --- a/cli/tests/testdata/check/types_dts/types.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare class test { - static test(): void; -} |