Skip to content

Commit 2c1b5aa

Browse files
committed
chore: add missing unit test for issue #49
1 parent 6dd26ea commit 2c1b5aa

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
@@ -75,6 +75,19 @@ describe('copyfiles', () => {
7575
});
7676
}));
7777

78+
test('normal with options argument set as undefined', () =>
79+
new Promise((done: any) => {
80+
writeFileSync('input/a.txt', 'a');
81+
writeFileSync('input/b.txt', 'b');
82+
writeFileSync('input/c.js', 'c');
83+
copyfiles(['input/*.txt', 'output'], undefined, () => {
84+
readdir('output/input', async (_err, files) => {
85+
expect(files).toEqual(['a.txt', 'b.txt']);
86+
done();
87+
});
88+
});
89+
}));
90+
7891
test('modes', () =>
7992
new Promise((done: any) => {
8093
writeFileSync('input/a.txt', 'a', {

0 commit comments

Comments
 (0)