fix tests as per acorn upgrade
This commit is contained in:
@@ -33,22 +33,22 @@ SystemFormatter.prototype._exportsWildcard = function (objectIdentifier) {
|
||||
var right = objectIdentifier;
|
||||
|
||||
var block = t.blockStatement([
|
||||
this._makeExportStatements([leftIdentifier, valIdentifier])
|
||||
this.buildExportCall(leftIdentifier, valIdentifier)
|
||||
]);
|
||||
|
||||
return t.forInStatement(left, right, block);
|
||||
};
|
||||
|
||||
SystemFormatter.prototype._exportsAssign = function (id, init, isExpression) {
|
||||
return this.buildExportCall(id.name, init, true);
|
||||
return this.buildExportCall(t.literal(id.name), init, true);
|
||||
};
|
||||
|
||||
SystemFormatter.prototype.remapExportAssignment = function (node) {
|
||||
return this.buildExportCall(node.left.name, node);
|
||||
return this.buildExportCall(t.literal(node.left.name), node);
|
||||
};
|
||||
|
||||
SystemFormatter.prototype.buildExportCall = function (id, init, isStatement) {
|
||||
var call = t.callExpression(this.exportIdentifier, [t.literal(id), init]);
|
||||
var call = t.callExpression(this.exportIdentifier, [id, init]);
|
||||
if (isStatement) {
|
||||
return t.expressionStatement(call);
|
||||
} else {
|
||||
|
||||
@@ -1 +1 @@
|
||||
export default function a() {};
|
||||
export default function a() {}
|
||||
|
||||
@@ -4,8 +4,8 @@ export default [];
|
||||
export default foo;
|
||||
export default function () {};
|
||||
export default class {};
|
||||
export default function foo() {};
|
||||
export default class Foo {};
|
||||
export default function foo() {}
|
||||
export default class Foo {}
|
||||
export * from "foo";
|
||||
export { foo } from "foo";
|
||||
export { foo, bar } from "foo";
|
||||
|
||||
@@ -4,8 +4,8 @@ export default [];
|
||||
export default foo;
|
||||
export default function () {};
|
||||
export default class {};
|
||||
export default function foo() {};
|
||||
export default class Foo {};
|
||||
export default function foo() {}
|
||||
export default class Foo {}
|
||||
export * from "foo";
|
||||
export { foo } from "foo";
|
||||
export { foo, bar } from "foo";
|
||||
|
||||
Reference in New Issue
Block a user