Skip to content

Commit f95bc18

Browse files
committedJan 5, 2022
test(sucrase): skip test on Windows
1 parent 027e690 commit f95bc18

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed
 

‎packages/sucrase/test/test.js

+23-20
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,30 @@ test('converts typescript', async (t) => {
5454
return testBundle(t, bundle);
5555
});
5656

57-
test('converts typescript with aliases', async (t) => {
58-
const bundle = await rollup({
59-
input: 'fixtures/typescript-with-aliases/main.js',
60-
plugins: [
61-
sucrase({
62-
transforms: ['typescript']
63-
}),
64-
alias({
65-
entries: [
66-
{
67-
find: '~src',
68-
replacement: path.resolve(__dirname, 'fixtures', 'typescript-with-aliases', 'src')
69-
}
70-
]
71-
})
72-
]
73-
});
74-
t.plan(1);
57+
// Note: Windows struggles with this test setup as trying to read a directory
58+
if (process.platform !== 'win32') {
59+
test('converts typescript with aliases', async (t) => {
60+
const bundle = await rollup({
61+
input: 'fixtures/typescript-with-aliases/main.js',
62+
plugins: [
63+
sucrase({
64+
transforms: ['typescript']
65+
}),
66+
alias({
67+
entries: [
68+
{
69+
find: '~src',
70+
replacement: path.resolve(__dirname, 'fixtures', 'typescript-with-aliases', 'src')
71+
}
72+
]
73+
})
74+
]
75+
});
76+
t.plan(1);
7577

76-
return testBundle(t, bundle);
77-
});
78+
return testBundle(t, bundle);
79+
});
80+
}
7881

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

0 commit comments

Comments
 (0)
Please sign in to comment.