Debian Codegraph @

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

raw
1 "use strict";
2 const Base = {
3 };
4
5 const obj = {
6 get test() { },
7
8 set() {
9 return super.test = 3;
10 },
11 };
12 Object.setPrototypeOf(obj, Base);
13
14 expect(() => {
15 // this requires helpers to be in file (not external), so they
16 // are in "strict" mode code.
17 obj.set();
18 }).toThrow(TypeError);
19 expect(Base.test).toBeUndefined();
20 expect(obj.test).toBeUndefined();