Files
babel/packages/babel-plugin-proposal-class-properties/test/fixtures/general/instance-computed/input.js
2018-01-09 15:36:42 +01:00

14 lines
195 B
JavaScript

function test(x) {
class F {
[x] = 1;
constructor() {}
}
x = 'deadbeef';
assert.strictEqual(new F().foo, 1);
x = 'wrong';
assert.strictEqual(new F().foo, 1);
}
test('foo');