Skip to content

Commit cd6ebb1

Browse files
committed
JS: Make test not assume implicit through for maps
1 parent dc2f39c commit cd6ebb1

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

javascript/ql/test/library-tests/TaintTracking/BasicTaintTracking.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ legacyDataFlowDifference
3535
| spread.js:4:15:4:22 | source() | spread.js:18:8:18:8 | y | only flow with NEW data flow library |
3636
| spread.js:4:15:4:22 | source() | spread.js:24:8:24:8 | y | only flow with NEW data flow library |
3737
| tst.js:2:13:2:20 | source() | tst.js:17:10:17:10 | a | only flow with OLD data flow library |
38-
| tst.js:82:23:82:30 | source() | tst.js:84:14:84:20 | grouped | only flow with OLD data flow library |
3938
| use-use-after-implicit-read.js:7:17:7:24 | source() | use-use-after-implicit-read.js:15:10:15:10 | x | only flow with NEW data flow library |
4039
consistencyIssue
4140
| nested-props.js:20 | expected an alert, but found none | NOT OK - but not found | Consistency |
@@ -315,12 +314,13 @@ flow
315314
| tst.js:2:13:2:20 | source() | tst.js:72:10:72:31 | Map.gro ... z => z) |
316315
| tst.js:2:13:2:20 | source() | tst.js:74:10:74:34 | Object. ... z => z) |
317316
| tst.js:2:13:2:20 | source() | tst.js:78:55:78:58 | item |
318-
| tst.js:2:13:2:20 | source() | tst.js:79:14:79:20 | grouped |
317+
| tst.js:2:13:2:20 | source() | tst.js:79:14:79:35 | grouped ... nown()) |
319318
| tst.js:2:13:2:20 | source() | tst.js:100:10:100:17 | x.with() |
320319
| tst.js:2:13:2:20 | source() | tst.js:102:10:102:14 | xWith |
321320
| tst.js:75:22:75:29 | source() | tst.js:75:10:75:52 | Map.gro ... (item)) |
322321
| tst.js:75:22:75:29 | source() | tst.js:75:47:75:50 | item |
323322
| tst.js:82:23:82:30 | source() | tst.js:83:58:83:61 | item |
323+
| tst.js:82:23:82:30 | source() | tst.js:84:14:84:35 | grouped ... nown()) |
324324
| tst.js:87:22:87:29 | source() | tst.js:90:14:90:25 | taintedValue |
325325
| tst.js:93:22:93:29 | source() | tst.js:96:14:96:25 | taintedValue |
326326
| tst.js:93:22:93:29 | source() | tst.js:97:14:97:26 | map.get(true) |

javascript/ql/test/library-tests/TaintTracking/DataFlowTracking.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ flow
191191
| tst.js:2:13:2:20 | source() | tst.js:35:14:35:16 | ary |
192192
| tst.js:2:13:2:20 | source() | tst.js:41:14:41:16 | ary |
193193
| tst.js:2:13:2:20 | source() | tst.js:54:14:54:19 | unsafe |
194+
| tst.js:2:13:2:20 | source() | tst.js:79:14:79:35 | grouped ... nown()) |
194195
| tst.js:82:23:82:30 | source() | tst.js:83:58:83:61 | item |
195196
| tst.js:93:22:93:29 | source() | tst.js:96:14:96:25 | taintedValue |
196197
| tst.js:93:22:93:29 | source() | tst.js:97:14:97:26 | map.get(true) |

javascript/ql/test/library-tests/TaintTracking/tst.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ function test() {
7676

7777
{
7878
const grouped = Map.groupBy(x, (item) => sink(item)); // NOT OK
79-
sink(grouped); // NOT OK
79+
sink(grouped.get(unknown())); // NOT OK
8080
}
8181
{
8282
const list = [source()];
8383
const grouped = Map.groupBy(list, (item) => sink(item)); // NOT OK
84-
sink(grouped); // NOT OK [INCONSISTENCY]
84+
sink(grouped.get(unknown())); // NOT OK
8585
}
8686
{
8787
const data = source();

0 commit comments

Comments
 (0)