Skip to content

Commit 77b8d1c

Browse files
fix bundler test
1 parent 9542141 commit 77b8d1c

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

__tests__/push/bundler.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,21 +111,21 @@ describe('Bundler', () => {
111111
});
112112

113113
it('build journey', async () => {
114-
const content = await bundler.build(journeyFile, generateTempPath());
114+
const content = await bundler.build(journeyFile, '', generateTempPath());
115115
await validateZip(content);
116116
});
117117

118118
it('bundle should be idempotent', async () => {
119-
const content1 = await bundler.build(journeyFile, generateTempPath());
120-
const content2 = await bundler.build(journeyFile, generateTempPath());
119+
const content1 = await bundler.build(journeyFile, '', generateTempPath());
120+
const content2 = await bundler.build(journeyFile, '', generateTempPath());
121121
expect(content1).toEqual(content2);
122122
});
123123

124124
it('throw errors on incorrect path', async () => {
125125
try {
126-
await bundler.build(join(PROJECT_DIR, 'blah.ts'), generateTempPath());
126+
await bundler.build(join(PROJECT_DIR, 'blah.ts'), '', generateTempPath());
127127
} catch (e) {
128-
expect(e.message).toContain('Build failed');
128+
expect(e.message).toContain('no such file or directory');
129129
}
130130
});
131131
});

src/push/transform-journey.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ export async function transform(absPath: string, journeyName: string) {
9696
retainLines: true,
9797
babelrc: false,
9898
configFile: false,
99+
parserOpts: {
100+
plugins: ['typescript'],
101+
},
99102
plugins: [
100103
[
101104
JourneyTransformPlugin,

0 commit comments

Comments
 (0)