JS: Add test showing lack of flow out of inner function

This commit is contained in:
Asger F
2019-09-09 16:29:43 +01:00
parent 76438f98ad
commit 3479f02082
3 changed files with 24 additions and 0 deletions

View File

@@ -24,6 +24,9 @@ test_Connection
| tst.js:63:38:63:77 | api.cha ... ction() |
| tst.js:67:14:67:47 | MyAppli ... nection |
| tst.js:78:35:78:49 | getConnection() |
| tst.js:80:16:80:19 | conn |
| tst.js:84:22:84:22 | x |
| tst.js:96:7:96:21 | getConnection() |
| tst_conflict.js:6:38:6:77 | api.cha ... ction() |
test_DataCallback
| client.js:3:28:3:34 | x => {} |

View File

@@ -12,6 +12,8 @@ apiObject
connection
| type tracker with call steps | tst.js:7:15:7:18 | conn |
| type tracker with call steps | tst.js:11:5:11:19 | this.connection |
| type tracker with call steps | tst.js:80:16:80:19 | conn |
| type tracker with call steps | tst.js:84:22:84:22 | x |
| type tracker with call steps with property connection | tst.js:7:14:7:13 | this |
| type tracker without call steps | client.js:1:10:1:27 | exportedConnection |
| type tracker without call steps | tst.js:16:10:16:49 | api.cha ... ction() |
@@ -25,6 +27,7 @@ connection
| type tracker without call steps | tst.js:63:38:63:77 | api.cha ... ction() |
| type tracker without call steps | tst.js:67:14:67:47 | MyAppli ... nection |
| type tracker without call steps | tst.js:78:35:78:49 | getConnection() |
| type tracker without call steps | tst.js:96:7:96:21 | 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

@@ -76,3 +76,21 @@ function useConnection() {
}
export const exportedConnection = getConnection();
function outer(conn) {
function innerCapture() {
return conn;
}
function innerCall(x) {
return x;
}
innerCapture();
innerCall(conn);
innerCall(somethingElse());
function otherInner() {
innerCapture();
}
}
outer(getConnection());