From 03639c68e15e5a3f4cae74440789b13c7fae30c9 Mon Sep 17 00:00:00 2001 From: Ryan Zimmerman Date: Tue, 11 Aug 2026 15:55:43 -0400 Subject: [PATCH] Add test for directory as input --- test/glob.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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'), + ) +})