diff options
author | Matt Mastracci <matthew@mastracci.com> | 2024-02-10 13:22:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-10 20:22:13 +0000 |
commit | f5e46c9bf2f50d66a953fa133161fc829cecff06 (patch) | |
tree | 8faf2f5831c1c7b11d842cd9908d141082c869a5 /tests/testdata/cache | |
parent | d2477f780630a812bfd65e3987b70c0d309385bb (diff) |
chore: move cli/tests/ -> tests/ (#22369)
This looks like a massive PR, but it's only a move from cli/tests ->
tests, and updates of relative paths for files.
This is the first step towards aggregate all of the integration test
files under tests/, which will lead to a set of integration tests that
can run without the CLI binary being built.
While we could leave these tests under `cli`, it would require us to
keep a more complex directory structure for the various test runners. In
addition, we have a lot of complexity to ignore various test files in
the `cli` project itself (cargo publish exclusion rules, autotests =
false, etc).
And finally, the `tests/` folder will eventually house the `test_ffi`,
`test_napi` and other testing code, reducing the size of the root repo
directory.
For easier review, the extremely large and noisy "move" is in the first
commit (with no changes -- just a move), while the remainder of the
changes to actual files is in the second commit.
Diffstat (limited to 'tests/testdata/cache')
-rw-r--r-- | tests/testdata/cache/036_import_map_fetch.out | 0 | ||||
-rw-r--r-- | tests/testdata/cache/037_fetch_multiple.out | 5 | ||||
-rw-r--r-- | tests/testdata/cache/095_cache_with_bare_import.ts | 1 | ||||
-rw-r--r-- | tests/testdata/cache/095_cache_with_bare_import.ts.out | 2 | ||||
-rw-r--r-- | tests/testdata/cache/cache_extensionless.out | 2 | ||||
-rw-r--r-- | tests/testdata/cache/cache_random_extension.out | 2 | ||||
-rw-r--r-- | tests/testdata/cache/check_local_by_default.out | 0 | ||||
-rw-r--r-- | tests/testdata/cache/check_local_by_default.ts | 3 | ||||
-rw-r--r-- | tests/testdata/cache/check_local_by_default2.out | 0 | ||||
-rw-r--r-- | tests/testdata/cache/check_local_by_default2.ts | 6 | ||||
-rw-r--r-- | tests/testdata/cache/ignore_require.js | 2 | ||||
-rw-r--r-- | tests/testdata/cache/json_import/main.ts | 2 | ||||
-rw-r--r-- | tests/testdata/cache/json_import/test.json | 5 | ||||
-rw-r--r-- | tests/testdata/cache/performance_stats.out | 16 | ||||
-rw-r--r-- | tests/testdata/cache/redirect_cache.out | 5 |
15 files changed, 51 insertions, 0 deletions
diff --git a/tests/testdata/cache/036_import_map_fetch.out b/tests/testdata/cache/036_import_map_fetch.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/testdata/cache/036_import_map_fetch.out diff --git a/tests/testdata/cache/037_fetch_multiple.out b/tests/testdata/cache/037_fetch_multiple.out new file mode 100644 index 000000000..f4c0c314b --- /dev/null +++ b/tests/testdata/cache/037_fetch_multiple.out @@ -0,0 +1,5 @@ +Download http://localhost:4545/subdir/mod2.ts +Download http://localhost:4545/subdir/mt_text_typescript.t1.ts +Download http://localhost:4545/subdir/print_hello.ts +Check [WILDCARD]/fetch/test.ts +Check [WILDCARD]/fetch/other.ts diff --git a/tests/testdata/cache/095_cache_with_bare_import.ts b/tests/testdata/cache/095_cache_with_bare_import.ts new file mode 100644 index 000000000..c0748305d --- /dev/null +++ b/tests/testdata/cache/095_cache_with_bare_import.ts @@ -0,0 +1 @@ +import "foo"; diff --git a/tests/testdata/cache/095_cache_with_bare_import.ts.out b/tests/testdata/cache/095_cache_with_bare_import.ts.out new file mode 100644 index 000000000..2668a6e08 --- /dev/null +++ b/tests/testdata/cache/095_cache_with_bare_import.ts.out @@ -0,0 +1,2 @@ +[WILDCARD]error: Relative import path "foo" not prefixed with / or ./ or ../ + at file:///[WILDCARD]/095_cache_with_bare_import.ts:[WILDCARD] diff --git a/tests/testdata/cache/cache_extensionless.out b/tests/testdata/cache/cache_extensionless.out new file mode 100644 index 000000000..3694c67cb --- /dev/null +++ b/tests/testdata/cache/cache_extensionless.out @@ -0,0 +1,2 @@ +[WILDCARD] +Check http://localhost:4545/subdir/no_js_ext diff --git a/tests/testdata/cache/cache_random_extension.out b/tests/testdata/cache/cache_random_extension.out new file mode 100644 index 000000000..745a2e0e3 --- /dev/null +++ b/tests/testdata/cache/cache_random_extension.out @@ -0,0 +1,2 @@ +[WILDCARD] +Check http://localhost:4545/subdir/no_js_ext@1.0.0 diff --git a/tests/testdata/cache/check_local_by_default.out b/tests/testdata/cache/check_local_by_default.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/testdata/cache/check_local_by_default.out diff --git a/tests/testdata/cache/check_local_by_default.ts b/tests/testdata/cache/check_local_by_default.ts new file mode 100644 index 000000000..2ae8c2692 --- /dev/null +++ b/tests/testdata/cache/check_local_by_default.ts @@ -0,0 +1,3 @@ +import * as a from "http://localhost:4545/subdir/type_error.ts"; + +console.log(a.a); diff --git a/tests/testdata/cache/check_local_by_default2.out b/tests/testdata/cache/check_local_by_default2.out new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/testdata/cache/check_local_by_default2.out diff --git a/tests/testdata/cache/check_local_by_default2.ts b/tests/testdata/cache/check_local_by_default2.ts new file mode 100644 index 000000000..5177ff944 --- /dev/null +++ b/tests/testdata/cache/check_local_by_default2.ts @@ -0,0 +1,6 @@ +import * as a from "http://localhost:4545/subdir/type_error.ts"; + +const b: "b" = 12; + +console.log(a.a); +console.log(b); diff --git a/tests/testdata/cache/ignore_require.js b/tests/testdata/cache/ignore_require.js new file mode 100644 index 000000000..a8ef15021 --- /dev/null +++ b/tests/testdata/cache/ignore_require.js @@ -0,0 +1,2 @@ +// deno-lint-ignore-file +require("invalid module specifier"); diff --git a/tests/testdata/cache/json_import/main.ts b/tests/testdata/cache/json_import/main.ts new file mode 100644 index 000000000..78273558f --- /dev/null +++ b/tests/testdata/cache/json_import/main.ts @@ -0,0 +1,2 @@ +import asdf from "./test.json" assert { type: "json" }; +console.log(asdf); diff --git a/tests/testdata/cache/json_import/test.json b/tests/testdata/cache/json_import/test.json new file mode 100644 index 000000000..258849a68 --- /dev/null +++ b/tests/testdata/cache/json_import/test.json @@ -0,0 +1,5 @@ +{ + "foo": { + "bar": 1 + } +} diff --git a/tests/testdata/cache/performance_stats.out b/tests/testdata/cache/performance_stats.out new file mode 100644 index 000000000..141829ee6 --- /dev/null +++ b/tests/testdata/cache/performance_stats.out @@ -0,0 +1,16 @@ +[WILDCARD] +DEBUG RS - [WILDCARD] - Compilation statistics: + Files: [WILDCARD] + Nodes: [WILDCARD] + Identifiers: [WILDCARD] + Symbols: [WILDCARD] + Types: [WILDCARD] + Instantiations: [WILDCARD] + Parse time: [WILDCARD] + Bind time: [WILDCARD] + Check time: [WILDCARD] + Emit time: [WILDCARD] + Total TS time: [WILDCARD] + Compile time: [WILDCARD] + +[WILDCARD] diff --git a/tests/testdata/cache/redirect_cache.out b/tests/testdata/cache/redirect_cache.out new file mode 100644 index 000000000..8905c4529 --- /dev/null +++ b/tests/testdata/cache/redirect_cache.out @@ -0,0 +1,5 @@ +Download http://localhost:4548/subdir/redirects/a.ts +Download http://localhost:4546/subdir/redirects/a.ts +Download http://localhost:4545/subdir/redirects/a.ts +Download http://localhost:4545/subdir/redirects/b.ts +Check http://localhost:4548/subdir/redirects/a.ts |