Debian Codegraph @

packages/babel-plugin-proposal-decorators/test/fixtures/2022-03-ordering/field-initializers-after-methods/exec.js

raw symbols SCIP
1 var counter = 0;
2
3 @(x => x)
4 class A {
5 foo = (() => {
6 counter++;
7 expect(typeof this.method).toBe("function");
8 expect(this.foo).toBeUndefined();
9 expect(this.bar).toBeUndefined();
10 return "foo";
11 })();
12
13 method() {}
14
15 bar = (() => {
16 counter++;
17 expect(typeof this.method).toBe("function");
18 expect(this.foo).toBe("foo");
19 expect(this.bar).toBeUndefined();
20 })();
21 }
22
23 expect(counter).toBe(0);
24
25 new A();
26
27 expect(counter).toBe(2);