Skip to content

Commit

Permalink
pdate
Browse files Browse the repository at this point in the history
  • Loading branch information
petamoriken committed Apr 27, 2024
1 parent 4f59ead commit a23a992
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions cli/main.rs
Expand Up @@ -392,6 +392,8 @@ fn resolve_flags_and_init(
DenoSubcommand::Lsp => vec!["--max-old-space-size=3072".to_string()],
_ => {
if *DENO_FUTURE {
// TypeScript removes the `assert` keywords in the deno_ast transpile, so this flag only affects JavaScript
// TODO(petamoriken): Need to check TypeScript `assert` keywords in deno_ast
vec!["--no-harmony-import-assertions".to_string()]
} else {
vec![]
Expand Down
7 changes: 3 additions & 4 deletions tests/integration/run_tests.rs
Expand Up @@ -1695,17 +1695,16 @@ fn type_directives_js_main() {
}

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

// TODO(petamoriken): Need to quit TypeScript transpiling `assert` to `with` in deno_ast
#[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.ts")
.args("run --quiet --reload run/deno_import_assertions.js")
.run();
output
.assert_exit_code(1)
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/run/deno_import_assertions.json
@@ -1,3 +1,3 @@
{
"foo": "foo"
}
}

0 comments on commit a23a992

Please sign in to comment.