Skip to content

Commit

Permalink
test(sucrase): skip test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
shellscape committed Jan 5, 2022
1 parent 027e690 commit f95bc18
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions packages/sucrase/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,30 @@ test('converts typescript', async (t) => {
return testBundle(t, bundle);
});

test('converts typescript with aliases', async (t) => {
const bundle = await rollup({
input: 'fixtures/typescript-with-aliases/main.js',
plugins: [
sucrase({
transforms: ['typescript']
}),
alias({
entries: [
{
find: '~src',
replacement: path.resolve(__dirname, 'fixtures', 'typescript-with-aliases', 'src')
}
]
})
]
});
t.plan(1);
// Note: Windows struggles with this test setup as trying to read a directory
if (process.platform !== 'win32') {
test('converts typescript with aliases', async (t) => {
const bundle = await rollup({
input: 'fixtures/typescript-with-aliases/main.js',
plugins: [
sucrase({
transforms: ['typescript']
}),
alias({
entries: [
{
find: '~src',
replacement: path.resolve(__dirname, 'fixtures', 'typescript-with-aliases', 'src')
}
]
})
]
});
t.plan(1);

return testBundle(t, bundle);
});
return testBundle(t, bundle);
});
}

test('resolves typescript directory imports', async (t) => {
const bundle = await rollup({
Expand Down

0 comments on commit f95bc18

Please sign in to comment.