Skip to content

Commit 70c519d

Browse files
authored
chore: add missing unit test for previous fix (#61)
1 parent f497142 commit 70c519d

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/__tests__/index.spec.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,19 @@ describe('copyfiles', () => {
8989
});
9090
}));
9191

92+
test('copies files using directory pattern with /**', () =>
93+
new Promise((done: any) => {
94+
writeFileSync('input/a.txt', 'a');
95+
writeFileSync('input/other/c.js', 'c');
96+
copyfiles(['input/**'], 'output', {}, () => {
97+
const files = readdirSync('output/input').sort();
98+
expect(files).toEqual(['a.txt', 'other']);
99+
const otherFiles = readdirSync('output/input/other').sort();
100+
expect(otherFiles).toEqual(['c.js']);
101+
done();
102+
});
103+
}));
104+
92105
test('modes', () =>
93106
new Promise((done: any) => {
94107
writeFileSync('input/a.txt', 'a', {

0 commit comments

Comments
 (0)