12 lines
154 B
JavaScript
12 lines
154 B
JavaScript
class Foo {
|
|
bar() {
|
|
return Foo;
|
|
}
|
|
}
|
|
|
|
var Bar = Foo;
|
|
Foo = 5;
|
|
expect(function () {
|
|
Bar.call(6);
|
|
}).toThrow("Cannot call a class as a function");
|