Debian Codegraph @

packages/babel-plugin-transform-object-super/test/fixtures/get-set/get-semantics-getter-defined-on-parent/input.js

raw
1 "use strict";
2 const Base = {
3 get test() {
4 expect(this).toBe(obj);
5 return 1;
6 }
7 };
8
9 const obj = {
10 test: 2,
11
12 get() {
13 return super.test;
14 },
15 };
16 Object.setPrototypeOf(obj, Base);
17
18 expect(obj.test).toBe(2);
19 expect(obj.get()).toBe(1);