Debian Codegraph @

packages/babel-helpers/test/fixtures/behavior/get-without-receiver/exec.js

raw symbols SCIP
1 // ensure we test the helper implementation,
2 // not built-in Reflect.get to which it defers
3 delete Reflect;
4
5 class Target {
6 get receiver() {
7 return this;
8 }
9 };
10
11 // check that the 1st argument (target) *is* used
12 // in place of missing 3rd argument (receiver)
13 expect(HELPER_GET(new Target, "receiver")).toBeInstanceOf(Target);
14
15 // because the helper replaces itself upon invocation,
16 // check it again with the same arguments
17 expect(HELPER_GET(new Target, "receiver")).toBeInstanceOf(Target);