summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
authorHasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com>2024-07-03 02:15:10 +0300
committerGitHub <noreply@github.com>2024-07-02 23:15:10 +0000
commit3324d7203e8d00bb39cfae104e0aec61ba954e9b (patch)
treed5d2b612bca91fd8d5045ca4326c5ff12fcb51dd /tests/specs
parent7d919f6fd980ed54785e86892a518f0bdf68f475 (diff)
fix(compile): prevent setting unstable feature twice (#24381)
Prevent panic when enabling a feature that is already enabled by removing duplicate features. Closes #22015 --------- Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/compile/repetitive_unstable_flag/.gitignore2
-rw-r--r--tests/specs/compile/repetitive_unstable_flag/__test__.jsonc13
-rw-r--r--tests/specs/compile/repetitive_unstable_flag/compile.out2
-rw-r--r--tests/specs/compile/repetitive_unstable_flag/deno.json3
-rw-r--r--tests/specs/compile/repetitive_unstable_flag/main.out1
-rw-r--r--tests/specs/compile/repetitive_unstable_flag/main.ts1
6 files changed, 22 insertions, 0 deletions
diff --git a/tests/specs/compile/repetitive_unstable_flag/.gitignore b/tests/specs/compile/repetitive_unstable_flag/.gitignore
new file mode 100644
index 000000000..ed6b0677d
--- /dev/null
+++ b/tests/specs/compile/repetitive_unstable_flag/.gitignore
@@ -0,0 +1,2 @@
+out.exe
+out
diff --git a/tests/specs/compile/repetitive_unstable_flag/__test__.jsonc b/tests/specs/compile/repetitive_unstable_flag/__test__.jsonc
new file mode 100644
index 000000000..00d38bee6
--- /dev/null
+++ b/tests/specs/compile/repetitive_unstable_flag/__test__.jsonc
@@ -0,0 +1,13 @@
+{
+ "steps": [
+ {
+ "args": "compile --unstable-kv -A --output out main.ts",
+ "output": "compile.out"
+ },
+ {
+ "commandName": "./out",
+ "args": [],
+ "output": "main.out"
+ }
+ ]
+}
diff --git a/tests/specs/compile/repetitive_unstable_flag/compile.out b/tests/specs/compile/repetitive_unstable_flag/compile.out
new file mode 100644
index 000000000..022f2c580
--- /dev/null
+++ b/tests/specs/compile/repetitive_unstable_flag/compile.out
@@ -0,0 +1,2 @@
+Check [WILDCARD]main.ts
+Compile [WILDCARD]main.ts to out[WILDCARD]
diff --git a/tests/specs/compile/repetitive_unstable_flag/deno.json b/tests/specs/compile/repetitive_unstable_flag/deno.json
new file mode 100644
index 000000000..c0401f75f
--- /dev/null
+++ b/tests/specs/compile/repetitive_unstable_flag/deno.json
@@ -0,0 +1,3 @@
+{
+ "unstable": ["kv"]
+}
diff --git a/tests/specs/compile/repetitive_unstable_flag/main.out b/tests/specs/compile/repetitive_unstable_flag/main.out
new file mode 100644
index 000000000..2170a5a7d
--- /dev/null
+++ b/tests/specs/compile/repetitive_unstable_flag/main.out
@@ -0,0 +1 @@
+Duplicate unstable feature issue is resolved as you can see
diff --git a/tests/specs/compile/repetitive_unstable_flag/main.ts b/tests/specs/compile/repetitive_unstable_flag/main.ts
new file mode 100644
index 000000000..c45100cfd
--- /dev/null
+++ b/tests/specs/compile/repetitive_unstable_flag/main.ts
@@ -0,0 +1 @@
+console.log("Duplicate unstable feature issue is resolved as you can see");