Skip to content

Commit bdb0775

Browse files
committed
add transformFromAst to parse options
1 parent 2fbd6a0 commit bdb0775

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/assertions.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { parse, compile } from "../src/sweet";
22
import expect from "expect.js";
33
import { zip, curry, equals, cond, identity, T, and, compose, type, mapObjIndexed, map, keys, has } from 'ramda';
4-
import { transform } from 'babel-core';
4+
import { transformFromAst as transform } from 'babel-core';
55
import Reader from "../src/shift-reader";
66
import { Enforester } from "../src/enforester";
77
import { List } from "immutable";
@@ -49,6 +49,7 @@ function testParseWithOpts(code, acc, expectedAst, options) {
4949

5050
export function testModule(code, loader, expectedAst) {
5151
return testParseWithOpts(code, x => x, expectedAst, {
52+
transform,
5253
loc: false,
5354
moduleResolver: x => x,
5455
moduleLoader: path => loader[path]
@@ -58,6 +59,7 @@ export function testModule(code, loader, expectedAst) {
5859
// if a property has the string <<hygiene> it is ignored
5960
function testParse(code, acc, expectedAst) {
6061
return testParseWithOpts(code, acc, expectedAst, {
62+
transform,
6163
loc: false,
6264
moduleResolver: () => "",
6365
moduleLoader: () => "",

0 commit comments

Comments
 (0)