Skip to content

Commit c9d057a

Browse files
committed
test: add test for multiple paths
1 parent b57dd3f commit c9d057a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/files/glob-source.spec.js

+15
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,21 @@ describe('glob-source', () => {
100100
expect(result[1].path).to.equal('/dir/file-3.css')
101101
})
102102

103+
it('multiple paths', async function () {
104+
if (!isNode) {
105+
return this.skip()
106+
}
107+
108+
const result = await all(globSource(
109+
path.relative(process.cwd(), path.join(__dirname, '..', 'fixtures', 'dir', 'file-1.txt')),
110+
path.relative(process.cwd(), path.join(__dirname, '..', 'fixtures', 'dir', 'file-2.js'))
111+
))
112+
113+
expect(result.length).to.equal(2)
114+
expect(result[0].path).to.equal('file-1.txt')
115+
expect(result[1].path).to.equal('file-2.js')
116+
})
117+
103118
it('requires recursive flag for directory', async function () {
104119
if (!isNode) {
105120
return this.skip()

0 commit comments

Comments
 (0)