mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
19 lines
275 B
JavaScript
19 lines
275 B
JavaScript
class Foo {
|
|
static foo = "foo";
|
|
bar = "bar";
|
|
|
|
static test() {
|
|
return Foo.foo;
|
|
}
|
|
|
|
test() {
|
|
return this.bar;
|
|
}
|
|
}
|
|
|
|
const f = new Foo();
|
|
expect("foo" in Foo).toBe(true)
|
|
expect("bar" in f).toBe(true)
|
|
expect(Foo.test()).toBe("foo")
|
|
expect(f.test()).toBe("bar")
|