add initProps to single call expression in computed property names - fixes #378
This commit is contained in:
4
test/fixtures/transformation/es6-computed-property-names/two/actual.js
vendored
Normal file
4
test/fixtures/transformation/es6-computed-property-names/two/actual.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
var obj = {
|
||||
first: "first",
|
||||
["second"]: "second",
|
||||
};
|
||||
13
test/fixtures/transformation/es6-computed-property-names/two/expected.js
vendored
Normal file
13
test/fixtures/transformation/es6-computed-property-names/two/expected.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
var _defineProperty = function (obj, key, value) {
|
||||
return Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
};
|
||||
|
||||
var obj = _defineProperty({
|
||||
first: "first" }, "second", "second");
|
||||
Reference in New Issue
Block a user