mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
16 lines
228 B
JavaScript
16 lines
228 B
JavaScript
class Foo {
|
|
foo = function() {
|
|
return this;
|
|
}
|
|
|
|
test(other) {
|
|
return [this.foo(), other.foo()];
|
|
}
|
|
}
|
|
|
|
const f = new Foo;
|
|
const o = new Foo;
|
|
const test = f.test(o);
|
|
expect(test[0]).toBe(f);
|
|
expect(test[1]).toBe(o);
|