Skip to content

Commit 691d058

Browse files
committed
refactor(coverage): complex_exprs.js
- improve coverage
1 parent 6543d38 commit 691d058

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/HydraScript.IntegrationTests/Samples/complex_exprs.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ const negSizeStr = -(~obj.arr) as string
66
>>> negSizeStr
77

88
const correctCast = negSizeStr == "-2"
9-
if (correctCast){
10-
let single = [0]
11-
let x = single[0] = obj.arr[2 - 2]
9+
let num = correctCast ? -2 : 0
10+
if (correctCast) {
11+
let single = [num]
12+
let x = single[0] = num = obj.arr[2 - 2]
1213
>>> x
1314
}

0 commit comments

Comments
 (0)