Skip to content

Commit 3b962dc

Browse files
committed
JS: Add explicit type tracking test
1 parent afcdc12 commit 3b962dc

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

javascript/ql/test/library-tests/TypeTracking/ClassStyle.expected

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ test_ApiObject
1010
| tst_conflict.js:6:38:6:49 | api.chain1() |
1111
| tst_conflict.js:6:38:6:58 | api.cha ... hain2() |
1212
test_Connection
13+
| client.js:1:10:1:27 | exportedConnection |
1314
| tst.js:7:15:7:18 | conn |
1415
| tst.js:11:5:11:19 | this.connection |
1516
| tst.js:16:10:16:49 | api.cha ... ction() |
@@ -22,8 +23,10 @@ test_Connection
2223
| tst.js:62:40:62:79 | api.cha ... ction() |
2324
| tst.js:63:38:63:77 | api.cha ... ction() |
2425
| tst.js:67:14:67:47 | MyAppli ... nection |
26+
| tst.js:78:35:78:49 | getConnection() |
2527
| tst_conflict.js:6:38:6:77 | api.cha ... ction() |
2628
test_DataCallback
29+
| client.js:3:28:3:34 | x => {} |
2730
| tst.js:10:11:10:12 | cb |
2831
| tst.js:21:1:23:1 | functio ... ata);\\n} |
2932
| tst.js:30:26:30:27 | cb |
@@ -35,6 +38,7 @@ test_DataCallback
3538
| tst.js:58:16:58:22 | x => {} |
3639
| tst.js:68:16:70:3 | data => ... a);\\n } |
3740
test_DataValue
41+
| client.js:3:28:3:28 | x |
3842
| tst.js:21:18:21:21 | data |
3943
| tst.js:25:19:25:22 | data |
4044
| tst.js:33:17:33:20 | data |

javascript/ql/test/library-tests/TypeTracking/PredicateStyle.expected

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ connection
1313
| type tracker with call steps | tst.js:7:15:7:18 | conn |
1414
| type tracker with call steps | tst.js:11:5:11:19 | this.connection |
1515
| type tracker with call steps with property connection | tst.js:7:14:7:13 | this |
16+
| type tracker without call steps | client.js:1:10:1:27 | exportedConnection |
1617
| type tracker without call steps | tst.js:16:10:16:49 | api.cha ... ction() |
1718
| type tracker without call steps | tst.js:19:7:19:21 | getConnection() |
1819
| type tracker without call steps | tst.js:31:9:31:23 | getConnection() |
@@ -23,12 +24,14 @@ connection
2324
| type tracker without call steps | tst.js:62:40:62:79 | api.cha ... ction() |
2425
| type tracker without call steps | tst.js:63:38:63:77 | api.cha ... ction() |
2526
| type tracker without call steps | tst.js:67:14:67:47 | MyAppli ... nection |
27+
| type tracker without call steps | tst.js:78:35:78:49 | getConnection() |
2628
| type tracker without call steps | tst_conflict.js:6:38:6:77 | api.cha ... ction() |
2729
| type tracker without call steps with property MyApplication.namespace.connection | file://:0:0:0:0 | global access path |
2830
| type tracker without call steps with property conflict | tst.js:63:3:63:25 | MyAppli ... mespace |
2931
| type tracker without call steps with property conflict | tst_conflict.js:6:3:6:25 | MyAppli ... mespace |
3032
| type tracker without call steps with property connection | tst.js:62:3:62:25 | MyAppli ... mespace |
3133
dataCallback
34+
| client.js:3:28:3:34 | x => {} |
3235
| tst.js:10:11:10:12 | cb |
3336
| tst.js:21:1:23:1 | functio ... ata);\\n} |
3437
| tst.js:30:26:30:27 | cb |
@@ -40,6 +43,7 @@ dataCallback
4043
| tst.js:58:16:58:22 | x => {} |
4144
| tst.js:68:16:70:3 | data => ... a);\\n } |
4245
dataValue
46+
| client.js:3:28:3:28 | x |
4347
| tst.js:21:18:21:21 | data |
4448
| tst.js:25:19:25:22 | data |
4549
| tst.js:33:17:33:20 | data |
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { exportedConnection } from './tst';
2+
3+
exportedConnection.getData(x => {});

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,5 @@ function useConnection() {
7474
useData(data);
7575
});
7676
}
77+
78+
export const exportedConnection = getConnection();

0 commit comments

Comments
 (0)