Skip to content

Commit 8bb6b9d

Browse files
committed
Merge pull request gulpjs#51 from lazd/globarr
Added test for glob array
2 parents 8fae65e + 5574e73 commit 8bb6b9d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/src.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,29 @@ describe('gulp input stream', function() {
2727
done();
2828
});
2929
});
30+
31+
it('should return a input stream for multiple globs', function(done) {
32+
var globArray = [
33+
join(__dirname, "./fixtures/stuff/run.dmc"),
34+
join(__dirname, "./fixtures/stuff/test.dmc")
35+
];
36+
var stream = gulp.src(globArray);
37+
38+
var files = [];
39+
stream.on('error', done);
40+
stream.on('data', function(file) {
41+
should.exist(file);
42+
should.exist(file.path);
43+
files.push(file);
44+
});
45+
stream.on('end', function() {
46+
files.length.should.equal(2);
47+
files[0].path.should.equal(globArray[0]);
48+
files[1].path.should.equal(globArray[1]);
49+
done();
50+
});
51+
});
52+
3053
it('should return a input stream with no contents when read is false', function(done) {
3154
var stream = gulp.src(join(__dirname, "./fixtures/*.coffee"), {read: false});
3255
stream.on('error', done);

0 commit comments

Comments
 (0)