Skip to content

Commit 273f021

Browse files
committed
Update test refs
1 parent c7e0acf commit 273f021

File tree

1 file changed

+12
-9
lines changed
  • crates/swc_ecma_minifier/tests/fixture/issues/10936

1 file changed

+12
-9
lines changed
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
const variable = {};
22
console.log("OrderNumber=" + variable.data?.orderNumber + "|AuditNo=" + variable.data?.auditNo + "|JournalType=" + transactionTypeCode[variable.data.transactionType] + "|IsPreview=0");
3-
variable?.notExist;
4-
variable.data?.value;
5-
obj?.a?.b?.c;
3+
// Additional test cases
4+
export const test1 = "12";
5+
export const test2 = "12";
6+
export const test3 = "1" + variable?.notExist + "2";
7+
export const test4 = "1" + variable.data?.value + "2";
8+
export const test5 = "1" + obj?.a?.b?.c + "2";
69
// Function calls can return null/undefined
7-
someFunction();
8-
obj.method();
10+
export const test6 = "1" + someFunction() + "2";
11+
export const test7 = "1" + obj.method() + "2";
912
// Identifiers can be null/undefined
10-
unknownVar;
13+
export const test8 = "1" + unknownVar + "2";
1114
// Other expressions that can be null/undefined
12-
condition;
13-
await promise;
14-
new Constructor();
15+
export const test9 = "1" + (condition ? null : 'x') + "2";
16+
export const test10 = "1" + await promise + "2";
17+
export const test11 = "1" + new Constructor() + "2";

0 commit comments

Comments
 (0)