Skip to content

Commit 35ae085

Browse files
authored
Add test for directory as input (#521)
1 parent 1489c2f commit 35ae085

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

‎test/glob.js‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,29 @@ test('works with glob patterns', async (t) => {
3030
await read('test/fixtures/glob/s.css'),
3131
)
3232
})
33+
34+
test('works with directory input', async (t) => {
35+
const output = tmp()
36+
37+
const { error, stderr } = await cli([
38+
'test/fixtures/glob',
39+
'-d',
40+
output,
41+
'--no-map',
42+
])
43+
44+
t.falsy(error, stderr)
45+
46+
t.is(
47+
await read(path.join(output, 'a.css')),
48+
await read('test/fixtures/glob/a.css'),
49+
)
50+
t.is(
51+
await read(path.join(output, 'b.css')),
52+
await read('test/fixtures/glob/b.css'),
53+
)
54+
t.is(
55+
await read(path.join(output, 's.css')),
56+
await read('test/fixtures/glob/s.css'),
57+
)
58+
})

0 commit comments

Comments
 (0)