Skip to content

Commit 3022c59

Browse files
committed
JS: Add access path alias test
1 parent ab3c03d commit 3022c59

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

javascript/ql/test/library-tests/ModelGeneration/ModelGeneration.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ typeModel
66
| (aliases).Alias1 | aliases | Member[AliasedClass] |
77
| (aliases).Alias1.prototype | (aliases).Alias1 | Instance |
88
| (aliases).Alias1.prototype.foo | (aliases).Alias1.prototype | Member[foo] |
9+
| (long-access-path).a.shortcut.d | long-access-path | Member[a].Member[b].Member[c].Member[d] |
10+
| (long-access-path).a.shortcut.d | long-access-path | Member[a].Member[shortcut].Member[d] |
11+
| (long-access-path).a.shortcut.d.e | (long-access-path).a.shortcut.d | Member[e] |
912
| (reexport).func | reexport | Member[func] |
1013
| (return-this).FluentInterface | return-this | Member[FluentInterface] |
1114
| (return-this).FluentInterface.prototype | (return-this).FluentInterface | Instance |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export const a = {
2+
b: {
3+
c: {
4+
d: {
5+
e: function() {}
6+
}
7+
}
8+
}
9+
};
10+
11+
a.shortcut = a.b.c;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "long-access-path",
3+
"main": "long-access-path.js"
4+
}

0 commit comments

Comments
 (0)