Skip to content

Commit 790c0cb

Browse files
committed
chore: Add tests showing globbing of many files
1 parent f60f138 commit 790c0cb

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

test/index.js

+25
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict';
22

3+
var path = require('path');
34
var expect = require('expect');
45
var sinon = require('sinon');
56

@@ -1029,6 +1030,30 @@ function suite(moduleName) {
10291030

10301031
gs.destroy();
10311032
});
1033+
1034+
it('handles tons of files with double-star glob', function (done) {
1035+
var gs = globStream('./node_modules/**/LICENSE', {
1036+
cwd: path.resolve(__dirname, '../'),
1037+
});
1038+
1039+
function assert(results) {
1040+
expect(results.length).toBeGreaterThan(16);
1041+
}
1042+
1043+
stream.pipeline([gs, concat(assert)], done);
1044+
});
1045+
1046+
it('handles tons of files with single-star glob', function (done) {
1047+
var gs = globStream('./node_modules/*', {
1048+
cwd: path.resolve(__dirname, '../'),
1049+
});
1050+
1051+
function assert(results) {
1052+
expect(results.length).toBeGreaterThan(16);
1053+
}
1054+
1055+
stream.pipeline([gs, concat(assert)], done);
1056+
});
10321057
});
10331058
}
10341059

0 commit comments

Comments
 (0)