Skip to content

Commit

Permalink
move tests to tests/specs
Browse files Browse the repository at this point in the history
  • Loading branch information
petamoriken committed Apr 27, 2024
1 parent 203e243 commit 830b68b
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 23 deletions.
17 changes: 0 additions & 17 deletions tests/integration/run_tests.rs
Expand Up @@ -1694,23 +1694,6 @@ fn type_directives_js_main() {
assert_not_contains!(output.combined_output(), "type_reference.d.ts");
}

itest!(test_import_assertions {
args: "run --reload run/deno_import_assertions.js",
output: "run/deno_import_assertions.js.out",
});

#[test]
fn test_import_assertions_with_deno_futures_env() {
let context = TestContextBuilder::new().add_future_env_vars().build();
let output = context
.new_command()
.args("run --quiet --reload run/deno_import_assertions.js")
.run();
output
.assert_exit_code(1)
.assert_matches_file("run/deno_import_assertions.ts.out2");
}

itest!(type_directives_redirect {
args: "run --reload --check run/type_directives_redirect.ts",
output: "run/type_directives_redirect.ts.out",
Expand Down
15 changes: 15 additions & 0 deletions tests/specs/future/import_assertions/__test__.jsonc
@@ -0,0 +1,15 @@
{
"steps": [
{
"args": "run main.js",
"output": "main.out",
"envs": {
"DENO_FUTURE": "1"
}
},
{
"args": "run main.js",
"output": "main.out2"
}
]
}
2 changes: 2 additions & 0 deletions tests/specs/future/import_assertions/main.js
@@ -0,0 +1,2 @@
import foo from "./main.json" assert { type: "json" };
console.log(foo);
4 changes: 4 additions & 0 deletions tests/specs/future/import_assertions/main.out
@@ -0,0 +1,4 @@
error: Uncaught SyntaxError: Unexpected identifier 'assert'
import foo from "./main.json" assert { type: "json" };
^
at <anonymous> (file:///[WILDCARD]/main.js:[WILDCARD])
2 changes: 0 additions & 2 deletions tests/testdata/run/deno_import_assertions.js

This file was deleted.

4 changes: 0 additions & 4 deletions tests/testdata/run/deno_import_assertions.js.out2

This file was deleted.

0 comments on commit 830b68b

Please sign in to comment.