lazd / gulp-karma

Karma plugin for gulp
MIT License
75 stars 36 forks source link

Files order is not preserved #2

Closed marklagendijk closed 10 years ago

marklagendijk commented 10 years ago

When you pass your testfiles via pipe the order is not preserved. Example, 'file2' can end up in front of files of 'dir1'.

gulp.src(['file1.js', 'dir1/**/*.js', 'file2.js'])
    .pipe(karma({
        configFile: 'myKarmaConfigFile.conf.js'
    }));

This causes issues in situations where you rely on the order of execution.

lazd commented 10 years ago

The plugin itself doesn't deal with file order, glob-stream does. It looks like this has been fixed as the latest version of glob-stream (3.1.2) contains tests for these cases and is a dependency of the latest version of gulp (3.2.4).

What version of gulp are you using? Try updating to the latest and testing again, it should work as expected.

marklagendijk commented 10 years ago

I tried updating to the latest Gulp, but that did not fix it. When I have the time I will try to create a simple reproducable use case, and open an issue on the glob-stream repo.

lazd commented 10 years ago

@marklagendijk, sounds good. Take a look at https://github.com/wearefractal/glob-stream/issues/7 as well as the tests here https://github.com/wearefractal/glob-stream/blob/master/test/main.js#L47-L89