Debian Codegraph @

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

raw
1 var Test = /*#__PURE__*/function () {
2 "use strict";
3
4 function Test() {
5 babelHelpers.classCallCheck(this, Test);
6 return babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "constructor", this);
7 }
8 babelHelpers.createClass(Test, null, [{
9 key: "test",
10 value: function test() {
11 return babelHelpers.get(babelHelpers.getPrototypeOf(Test), "constructor", this);
12 }
13 }]);
14 return Test;
15 }(); // Instances
16 expect(Object.getPrototypeOf(Test.prototype)).toBe(Object.prototype);
17 expect(new Test()).toBe(Object);
18
19 // Static
20 expect(Object.getPrototypeOf(Test)).toBe(Function.prototype);
21 expect(Test.test()).toBe(Function);