mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
11 lines
176 B
JavaScript
11 lines
176 B
JavaScript
function build(val) {
|
|
return class {
|
|
[this.key]() {
|
|
return val;
|
|
}
|
|
};
|
|
}
|
|
|
|
var Class = build.call({ key: "foo" }, "bar");
|
|
expect(new Class().foo()).toBe("bar");
|