1
1
'use strict' ;
2
+ var path = require ( 'path' ) ;
2
3
var assert = require ( 'assert' ) ;
3
4
var gutil = require ( 'gulp-util' ) ;
4
5
var filter = require ( './' ) ;
@@ -20,12 +21,12 @@ describe('filter()', function () {
20
21
21
22
stream . write ( new gutil . File ( {
22
23
base : __dirname ,
23
- path : __dirname + '/ included.js'
24
+ path : path . join ( __dirname , ' included.js')
24
25
} ) ) ;
25
26
26
27
stream . write ( new gutil . File ( {
27
28
base : __dirname ,
28
- path : __dirname + '/ ignored.js'
29
+ path : path . join ( __dirname , ' ignored.js')
29
30
} ) ) ;
30
31
31
32
stream . end ( ) ;
@@ -48,12 +49,12 @@ describe('filter()', function () {
48
49
49
50
stream . write ( new gutil . File ( {
50
51
base : __dirname ,
51
- path : __dirname + '/ included.js'
52
+ path : path . join ( __dirname , ' included.js')
52
53
} ) ) ;
53
54
54
55
stream . write ( new gutil . File ( {
55
56
base : __dirname ,
56
- path : __dirname + '/ ignored.js'
57
+ path : path . join ( __dirname , ' ignored.js')
57
58
} ) ) ;
58
59
59
60
stream . end ( ) ;
@@ -76,12 +77,12 @@ describe('filter()', function () {
76
77
77
78
stream . write ( new gutil . File ( {
78
79
base : __dirname ,
79
- path : __dirname + '/ nested/ resource.js'
80
+ path : path . join ( __dirname , ' nested' , ' resource.js')
80
81
} ) ) ;
81
82
82
83
stream . write ( new gutil . File ( {
83
84
base : __dirname ,
84
- path : __dirname + '/ nested/ resource.css'
85
+ path : path . join ( __dirname , ' nested' , ' resource.css')
85
86
} ) ) ;
86
87
87
88
stream . end ( ) ;
@@ -260,7 +261,7 @@ describe('filter.restore', function () {
260
261
} ) ;
261
262
262
263
restoreStream . on ( 'end' , function ( ) {
263
- done ( new Error ( 'Not expected to end!' ) ) ;
264
+ cb ( new Error ( 'Not expected to end!' ) ) ;
264
265
} ) ;
265
266
266
267
stream . pipe ( restoreStream ) ;
0 commit comments