summaryrefslogtreecommitdiff
path: root/cli/tests/integration
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/integration')
-rw-r--r--cli/tests/integration/repl_tests.rs29
-rw-r--r--cli/tests/integration/run_tests.rs17
2 files changed, 31 insertions, 15 deletions
diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs
index 3c5c3e85f..0e63f1589 100644
--- a/cli/tests/integration/repl_tests.rs
+++ b/cli/tests/integration/repl_tests.rs
@@ -358,15 +358,26 @@ fn typescript_declarations() {
#[test]
fn typescript_decorators() {
- util::with_pty(&["repl"], |mut console| {
- console
- .write_line("function dec(target) { target.prototype.test = () => 2; }");
- console.expect("undefined");
- console.write_line("@dec class Test {}");
- console.expect("[class Test]");
- console.write_line("new Test().test()");
- console.expect("2");
- });
+ let context = TestContextBuilder::default().use_temp_cwd().build();
+ let temp_dir = context.temp_dir();
+ temp_dir.write(
+ "./deno.json",
+ r#"{ "compilerOptions": { "experimentalDecorators": true } }"#,
+ );
+ let config_path = temp_dir.target_path().join("./deno.json");
+ util::with_pty(
+ &["repl", "--config", config_path.to_string_lossy().as_ref()],
+ |mut console| {
+ console.write_line(
+ "function dec(target) { target.prototype.test = () => 2; }",
+ );
+ console.expect("undefined");
+ console.write_line("@dec class Test {}");
+ console.expect("[class Test]");
+ console.write_line("new Test().test()");
+ console.expect("2");
+ },
+ );
}
#[test]
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index 3a2b46133..6c82cfeec 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -1508,8 +1508,13 @@ itest!(no_check {
});
itest!(no_check_decorators {
- args: "run --quiet --reload --no-check run/no_check_decorators.ts",
- output: "run/no_check_decorators.ts.out",
+ args: "run --quiet --reload --no-check run/decorators/experimental/no_check/main.ts",
+ output: "run/decorators/experimental/no_check/main.out",
+});
+
+itest!(decorators_tc39_proposal {
+ args: "run --quiet --reload --check run/decorators/tc39_proposal/main.ts",
+ output: "run/decorators/tc39_proposal/main.out",
});
itest!(check_remote {
@@ -1526,8 +1531,8 @@ itest!(no_check_remote {
});
itest!(runtime_decorators {
- args: "run --quiet --reload --no-check run/runtime_decorators.ts",
- output: "run/runtime_decorators.ts.out",
+ args: "run --quiet --reload --no-check run/decorators/experimental/runtime/main.ts",
+ output: "run/decorators/experimental/runtime/main.out",
});
itest!(seed_random {
@@ -1591,8 +1596,8 @@ itest!(ts_type_imports {
});
itest!(ts_decorators {
- args: "run --reload --check run/ts_decorators.ts",
- output: "run/ts_decorators.ts.out",
+ args: "run --reload --check run/decorators/experimental/ts/main.ts",
+ output: "run/decorators/experimental/ts/main.out",
});
itest!(ts_type_only_import {