Skip to content

Commit e1514fd

Browse files
authored
Merge pull request neo4j#305 from lutovich/1.5-console-reporter
Added better jasmine console reporter
2 parents 99e8b97 + 06d40ad commit e1514fd

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

gulpfile.babel.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ var file = require('gulp-file');
4444
var semver = require('semver');
4545
var sharedNeo4j = require('./test/internal/shared-neo4j').default;
4646
var ts = require('gulp-typescript');
47+
var JasmineConsoleReporter = require('jasmine-console-reporter');
4748

4849
/**
4950
* Useful to investigate resource leaks in tests. Enable to see active sockets and file handles after the 'test' task.
@@ -166,7 +167,7 @@ gulp.task('test-nodejs', ['install-driver-into-sandbox'], function () {
166167
return gulp.src('test/**/*.test.js')
167168
.pipe(jasmine({
168169
includeStackTrace: true,
169-
verbose: true
170+
reporter: newJasmineConsoleReporter()
170171
})).on('end', logActiveNodeHandles);
171172
});
172173

@@ -177,7 +178,7 @@ gulp.task('test-browser', function (cb) {
177178
gulp.task('run-browser-test', function(){
178179
return gulp.src('lib/browser/neo4j-web.test.js')
179180
.pipe(jasmineBrowser.specRunner({console: true}))
180-
.pipe(jasmineBrowser.headless())
181+
.pipe(jasmineBrowser.headless({reporter: newJasmineConsoleReporter()}))
181182
});
182183

183184
gulp.task('watch', function () {
@@ -241,7 +242,7 @@ gulp.task('run-stress-tests', function () {
241242
return gulp.src('test/**/stress.test.js')
242243
.pipe(jasmine({
243244
includeStackTrace: true,
244-
verbose: true
245+
reporter: newJasmineConsoleReporter()
245246
})).on('end', logActiveNodeHandles);
246247
});
247248

@@ -273,3 +274,13 @@ function logActiveNodeHandles() {
273274
console.log('-- Active NodeJS handles START\n', process._getActiveHandles(), '\n-- Active NodeJS handles END');
274275
}
275276
}
277+
278+
function newJasmineConsoleReporter() {
279+
return new JasmineConsoleReporter({
280+
colors: 1,
281+
cleanStack: 1,
282+
verbosity: 4,
283+
listStyle: 'indent',
284+
activity: false
285+
});
286+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@
4242
"gulp-file": "^0.3.0",
4343
"gulp-install": "^0.6.0",
4444
"gulp-jasmine": "^2.1.0",
45-
"gulp-jasmine-browser": "^0.2.3",
45+
"gulp-jasmine-browser": "^1.9.1",
4646
"gulp-replace": "^0.5.4",
4747
"gulp-typescript": "^3.1.7",
4848
"gulp-uglify": "^1.4.2",
4949
"gulp-util": "^3.0.6",
5050
"gulp-watch": "^4.3.5",
51+
"jasmine-console-reporter": "^2.0.1",
5152
"lodash": "^4.17.4",
5253
"lolex": "^1.5.2",
5354
"minimist": "^1.2.0",

0 commit comments

Comments
 (0)