JS: Add callback type tracking test

This commit is contained in:
Asger Feldthaus
2021-09-08 11:32:05 +02:00
parent 2b7882e6e5
commit 1f6df4e70d
3 changed files with 14 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ test_Connection
| tst.js:112:10:112:14 | obj.x |
| tst.js:114:1:114:28 | getX({ ... on() }) |
| tst.js:114:11:114:25 | getConnection() |
| tst.js:118:12:118:26 | getConnection() |
| tst_conflict.js:6:38:6:77 | api.cha ... ction() |
test_DataCallback
| client.js:3:28:3:34 | x => {} |

View File

@@ -40,6 +40,7 @@ connection
| type tracker without call steps | tst.js:108:8:108:22 | getConnection() |
| type tracker without call steps | tst.js:114:1:114:28 | getX({ ... on() }) |
| type tracker without call steps | tst.js:114:11:114:25 | getConnection() |
| type tracker without call steps | tst.js:118:12:118:26 | getConnection() |
| type tracker without call steps | tst_conflict.js:6:38:6:77 | api.cha ... ction() |
| type tracker without call steps with property MyApplication.namespace.connection | file://:0:0:0:0 | global access path |
| type tracker without call steps with property conflict | tst.js:63:3:63:25 | MyAppli ... mespace |

View File

@@ -113,3 +113,15 @@ function getX(obj) {
}
getX({ x: getConnection() });
getX({ x: somethingElse() });
function makeConnectionAsync(callback) {
callback(getConnection());
}
makeConnectionAsync(conn => {});
makeConnectionAsync(); // suppress single-call precision gains
function makeConnectionAsync2(callback) {
makeConnectionAsync(callback);
}
makeConnectionAsync2(conn => {});
makeConnectionAsync2(); // suppress single-call precision gains