Debian Codegraph @

packages/babel-plugin-transform-classes/test/fixtures/spec/default-super/input.js

raw
1 class Test {
2 constructor() {
3 return super.constructor;
4 }
5
6 static test() {
7 return super.constructor;
8 }
9 }
10
11 // Instances
12 expect(Object.getPrototypeOf(Test.prototype)).toBe(Object.prototype);
13 expect(new Test()).toBe(Object);
14
15 // Static
16 expect(Object.getPrototypeOf(Test)).toBe(Function.prototype);
17 expect(Test.test()).toBe(Function);