Skip to content

Commit

Permalink
chore: Add tests showing globbing of many files
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Jan 4, 2023
1 parent f60f138 commit 790c0cb
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

var path = require('path');
var expect = require('expect');
var sinon = require('sinon');

Expand Down Expand Up @@ -1029,6 +1030,30 @@ function suite(moduleName) {

gs.destroy();
});

it('handles tons of files with double-star glob', function (done) {
var gs = globStream('./node_modules/**/LICENSE', {
cwd: path.resolve(__dirname, '../'),
});

function assert(results) {
expect(results.length).toBeGreaterThan(16);
}

stream.pipeline([gs, concat(assert)], done);
});

it('handles tons of files with single-star glob', function (done) {
var gs = globStream('./node_modules/*', {
cwd: path.resolve(__dirname, '../'),
});

function assert(results) {
expect(results.length).toBeGreaterThan(16);
}

stream.pipeline([gs, concat(assert)], done);
});
});
}

Expand Down

0 comments on commit 790c0cb

Please sign in to comment.