diff --git a/test/glob.js b/test/glob.js index 863fc39..38743f7 100644 --- a/test/glob.js +++ b/test/glob.js @@ -30,3 +30,29 @@ test('works with glob patterns', async (t) => { await read('test/fixtures/glob/s.css'), ) }) + +test('works with directory input', async (t) => { + const output = tmp() + + const { error, stderr } = await cli([ + 'test/fixtures/glob', + '-d', + output, + '--no-map', + ]) + + t.falsy(error, stderr) + + t.is( + await read(path.join(output, 'a.css')), + await read('test/fixtures/glob/a.css'), + ) + t.is( + await read(path.join(output, 'b.css')), + await read('test/fixtures/glob/b.css'), + ) + t.is( + await read(path.join(output, 's.css')), + await read('test/fixtures/glob/s.css'), + ) +})