Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ab3c03d

Browse files
committed
JS: Add test where root export object is a function
1 parent f4e05cc commit ab3c03d

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ typeModel
1616
| (return-this).FluentInterface.prototype.foo | (return-this).FluentInterface.prototype | Member[foo] |
1717
| (return-this).FluentInterface.prototype.notFluent | (return-this).FluentInterface.prototype | Member[notFluent] |
1818
| (return-this).FluentInterface.prototype.notFluent2 | (return-this).FluentInterface.prototype | Member[notFluent2] |
19+
| (root-function).PublicClass | root-function | Member[PublicClass] |
20+
| (root-function).PublicClass.prototype | (root-function).PublicClass | Instance |
21+
| (root-function).PublicClass.prototype | root-function | ReturnValue |
22+
| (root-function).PublicClass.prototype.method | (root-function).PublicClass.prototype | Member[method] |
1923
| (semi-internal-class).PublicClass | semi-internal-class | Member[PublicClass] |
2024
| (semi-internal-class).PublicClass.prototype | (semi-internal-class).PublicClass | Instance |
2125
| (semi-internal-class).PublicClass.prototype | (semi-internal-class).SemiInternalClass.prototype.method | ReturnValue |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "root-function",
3+
"main": "root-function.js"
4+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class C {
2+
method() {}
3+
}
4+
5+
module.exports = function() {
6+
return new C();
7+
}
8+
9+
module.exports.PublicClass = C;

0 commit comments

Comments
 (0)