@@ -27,14 +27,18 @@ describe('gulp-requirejs', function() {
2727 } ) ;
2828
2929 stream . on ( 'data' , function ( output ) {
30- should . exist ( output ) ;
31- should . exist ( output . path ) ;
32- should . exist ( output . relative ) ;
33- should . exist ( output . contents ) ;
34-
35- output . relative . should . equal ( 'simple_init.js' ) ;
36- String ( output . contents ) . should . equal ( fs . readFileSync ( 'test/expected/simple_init.js' , 'utf8' ) ) ;
37- done ( ) ;
30+ try {
31+ should . exist ( output ) ;
32+ should . exist ( output . path ) ;
33+ should . exist ( output . relative ) ;
34+ should . exist ( output . contents ) ;
35+
36+ output . relative . should . equal ( 'simple_init.js' ) ;
37+ String ( output . contents ) . should . equal ( fs . readFileSync ( 'test/expected/simple_init.js' , 'utf8' ) ) ;
38+ done ( ) ;
39+ } catch ( e ) {
40+ done ( e ) ;
41+ }
3842 } ) ;
3943 } ) ;
4044
@@ -59,14 +63,18 @@ describe('gulp-requirejs', function() {
5963 } ) ;
6064
6165 stream . on ( 'data' , function ( output ) {
62- should . exist ( output ) ;
63- should . exist ( output . path ) ;
64- should . exist ( output . relative ) ;
65- should . exist ( output . contents ) ;
66-
67- output . relative . should . equal ( 'umd_init.js' ) ;
68- String ( output . contents ) . should . equal ( fs . readFileSync ( 'test/expected/umd_init.js' , 'utf8' ) ) ;
69- done ( ) ;
66+ try {
67+ should . exist ( output ) ;
68+ should . exist ( output . path ) ;
69+ should . exist ( output . relative ) ;
70+ should . exist ( output . contents ) ;
71+
72+ output . relative . should . equal ( 'umd_init.js' ) ;
73+ String ( output . contents ) . should . equal ( fs . readFileSync ( 'test/expected/umd_init.js' , 'utf8' ) ) ;
74+ done ( ) ;
75+ } catch ( e ) {
76+ done ( e ) ;
77+ }
7078 } ) ;
7179 } ) ;
7280
@@ -96,14 +104,18 @@ describe('gulp-requirejs', function() {
96104 } ) ;
97105
98106 stream . on ( 'data' , function ( output ) {
99- should . exist ( output ) ;
100- should . exist ( output . path ) ;
101- should . exist ( output . relative ) ;
102- should . exist ( output . contents ) ;
103-
104- output . relative . should . equal ( 'complex_init.js' ) ;
105- String ( output . contents ) . should . equal ( fs . readFileSync ( 'test/expected/complex_init.js' , 'utf8' ) ) ;
106- done ( ) ;
107+ try {
108+ should . exist ( output ) ;
109+ should . exist ( output . path ) ;
110+ should . exist ( output . relative ) ;
111+ should . exist ( output . contents ) ;
112+
113+ output . relative . should . equal ( 'complex_init.js' ) ;
114+ String ( output . contents ) . should . equal ( fs . readFileSync ( 'test/expected/complex_init.js' , 'utf8' ) ) ;
115+ done ( ) ;
116+ } catch ( e ) {
117+ done ( e ) ;
118+ }
107119 } ) ;
108120 } ) ;
109121 } ) ;
0 commit comments