Skip to content

Added better jasmine console reporter #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var file = require('gulp-file');
var semver = require('semver');
var sharedNeo4j = require('./test/internal/shared-neo4j').default;
var ts = require('gulp-typescript');
var JasmineConsoleReporter = require('jasmine-console-reporter');

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

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

gulp.task('watch', function () {
Expand Down Expand Up @@ -241,7 +242,7 @@ gulp.task('run-stress-tests', function () {
return gulp.src('test/**/stress.test.js')
.pipe(jasmine({
includeStackTrace: true,
verbose: true
reporter: newJasmineConsoleReporter()
})).on('end', logActiveNodeHandles);
});

Expand Down Expand Up @@ -273,3 +274,13 @@ function logActiveNodeHandles() {
console.log('-- Active NodeJS handles START\n', process._getActiveHandles(), '\n-- Active NodeJS handles END');
}
}

function newJasmineConsoleReporter() {
return new JasmineConsoleReporter({
colors: 1,
cleanStack: 1,
verbosity: 4,
listStyle: 'indent',
activity: false
});
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@
"gulp-file": "^0.3.0",
"gulp-install": "^0.6.0",
"gulp-jasmine": "^2.1.0",
"gulp-jasmine-browser": "^0.2.3",
"gulp-jasmine-browser": "^1.9.1",
"gulp-replace": "^0.5.4",
"gulp-typescript": "^3.1.7",
"gulp-uglify": "^1.4.2",
"gulp-util": "^3.0.6",
"gulp-watch": "^4.3.5",
"jasmine-console-reporter": "^2.0.1",
"lodash": "^4.17.4",
"lolex": "^1.5.2",
"minimist": "^1.2.0",
Expand Down