@@ -5,7 +5,6 @@ import * as path from 'path';
5
5
import { execSync } from "child_process" ;
6
6
import PluginError from "plugin-error" ;
7
7
import through from "through2" ;
8
- import Reporter from "jasmine-terminal-reporter" ;
9
8
10
9
/** Recursively delete cache for object with given ID and its children */
11
10
function deleteRequireCache ( id ) {
@@ -28,13 +27,15 @@ function deleteRequireCache(id) {
28
27
function gulpJasmineFixed ( ) {
29
28
const Jasmine = require ( "jasmine" ) ;
30
29
const jasmineRunner = new Jasmine ( ) ;
30
+ jasmineRunner . exitOnCompletion = false ;
31
31
if ( jasmineRunner . env . clearReporters ) {
32
32
jasmineRunner . env . clearReporters ( ) ;
33
33
}
34
- jasmineRunner . addReporter ( new Reporter ( {
35
- isVerbose : true ,
36
- showColors : process . argv . indexOf ( '--no-color' ) === - 1 ,
37
- includeStackTrace : true
34
+ const jasmineReporters = require ( "jasmine-reporters" ) ;
35
+ jasmineRunner . addReporter ( new jasmineReporters . TerminalReporter ( {
36
+ verbosity : 3 ,
37
+ color : process . argv . indexOf ( '--no-color' ) === - 1 ,
38
+ showStack : true
38
39
} ) ) ;
39
40
40
41
return through . obj ( ( file , enc , cb ) => {
@@ -44,7 +45,7 @@ function gulpJasmineFixed() {
44
45
}
45
46
46
47
if ( file . isStream ( ) ) {
47
- cb ( new PluginError ( 'gulp-jasmine ' , 'Streaming not supported' ) ) ;
48
+ cb ( new PluginError ( 'vropkg-gulpfile ' , 'Streaming not supported' ) ) ;
48
49
return ;
49
50
}
50
51
const resolvedPath = path . resolve ( file . path ) ;
@@ -66,8 +67,6 @@ function gulpJasmineFixed() {
66
67
}
67
68
}
68
69
69
- jasmineRunner . exitOnCompletion = false ;
70
-
71
70
const result : Promise < any > = jasmineRunner . execute ( ) ;
72
71
result . then ( result => {
73
72
if ( result . overallStatus === 'passed' ) {
@@ -76,13 +75,11 @@ function gulpJasmineFixed() {
76
75
cb ( ) ;
77
76
} else {
78
77
console . log ( 'At least one spec has failed' ) ;
79
- cb ( new PluginError ( 'gulp-jasmine' , 'Tests failed' , {
80
- showStack : false
81
- } ) ) ;
78
+ cb ( new PluginError ( 'vropkg-gulpfile' , 'Tests failed' , { showStack : false } ) ) ;
82
79
}
83
80
} )
84
81
} catch ( err ) {
85
- cb ( new PluginError ( 'gulp-jasmine ' , err , { showStack : true } ) ) ;
82
+ cb ( new PluginError ( 'vropkg-gulpfile ' , err , { showStack : true } ) ) ;
86
83
}
87
84
} ) ;
88
85
} ;
0 commit comments