Debian Codegraph @

packages/babel-plugin-proposal-class-properties/test/fixtures/public/native-classes/exec.js

raw
1 class Foo {
2 static foo = "foo";
3 bar = "bar";
4
5 static test() {
6 return Foo.foo;
7 }
8
9 test() {
10 return this.bar;
11 }
12 }
13
14 const f = new Foo();
15 expect("foo" in Foo).toBe(true)
16 expect("bar" in f).toBe(true)
17 expect(Foo.test()).toBe("foo")
18 expect(f.test()).toBe("bar")