From 882e3c71f277787395d31ecaea9168f000fec1e5 Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Mon, 16 Dec 2024 20:10:32 +0100 Subject: [PATCH] add specs --- test/index.test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/index.test.ts b/test/index.test.ts index 3e29650..a254a1c 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -364,3 +364,18 @@ test('sync with empty array matches nothing', () => { const files = globSync({ patterns: [] }); assert.deepEqual(files.sort(), []); }); + +test('*', async () => { + const files = await glob({ patterns: ['./*'], cwd, onlyDirectories: true, expandDirectories: false }); + assert.deepEqual(files.sort(), ['a/', 'b/']); +}); + +test('.a/*', async () => { + const files = await glob({ patterns: ['.a/*'], cwd, onlyDirectories: true, expandDirectories: false }); + assert.deepEqual(files.sort(), ['.a/a/']); +}); + +test('. + .a/*', async () => { + const files = await glob({ patterns: ['.', '.a/*'], cwd, onlyDirectories: true, expandDirectories: false }); + assert.deepEqual(files.sort(), ['.', '.a/a/']); +});