Skip to content

Commit 1b3c6e3

Browse files
committed
Reorganize stub test scripts
1 parent 138764b commit 1b3c6e3

File tree

97 files changed

+1495
-1679
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1495
-1679
lines changed

gulpfile.babel.js

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const file = require('gulp-file')
3535
const semver = require('semver')
3636
const sharedNeo4j = require('./test/internal/shared-neo4j').default
3737
const ts = require('gulp-typescript')
38-
const JasmineConsoleReporter = require('jasmine-console-reporter')
38+
const JasmineReporter = require('jasmine-spec-reporter').SpecReporter
3939
const karma = require('karma')
4040
const log = require('fancy-log')
4141

@@ -218,12 +218,23 @@ function logActiveNodeHandles () {
218218
}
219219

220220
function newJasmineConsoleReporter () {
221-
return new JasmineConsoleReporter({
222-
colors: 1,
223-
cleanStack: 1,
224-
verbosity: 4,
225-
listStyle: 'indent',
226-
activity: false
221+
return new JasmineReporter({
222+
colors: {
223+
enabled: true
224+
},
225+
spec: {
226+
displayDuration: true,
227+
displayErrorMessages: true,
228+
displayStacktrace: true,
229+
displayFailed: true,
230+
displaySuccessful: true,
231+
displayPending: false
232+
},
233+
summary: {
234+
displayFailed: true,
235+
displayStacktrace: true,
236+
displayErrorMessages: true
237+
}
227238
})
228239
}
229240

package-lock.json

Lines changed: 500 additions & 627 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"gulp-uglify": "^3.0.2",
7575
"gulp-watch": "^5.0.1",
7676
"husky": "^2.3.0",
77-
"jasmine-console-reporter": "^3.1.0",
77+
"jasmine-spec-reporter": "^4.2.1",
7878
"karma": "^4.1.0",
7979
"karma-browserify": "^6.0.0",
8080
"karma-chrome-launcher": "^2.2.0",

src/session.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,7 @@ class Session {
153153
const arg = transactionConfig
154154

155155
let txConfig = TxConfig.empty()
156-
if (
157-
typeof arg === 'string' ||
158-
arg instanceof String ||
159-
Array.isArray(arg)
160-
) {
161-
// argument looks like a single or multiple bookmarks
162-
// bookmarks in this function are deprecated but need to be supported for backwards compatibility
163-
this._updateBookmark(new Bookmark(arg))
164-
} else if (arg) {
165-
// argument is probably a transaction configuration
156+
if (arg) {
166157
txConfig = new TxConfig(arg)
167158
}
168159

test/internal/bolt-stub.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ class SupportedBoltStub extends UnsupportedBoltStub {
6060

6161
if (verbose) {
6262
boltStub.stdout.on('data', data => {
63-
console.log(`${data}`)
63+
console.warn(`${data}`)
6464
})
6565
boltStub.stderr.on('data', data => {
66-
console.log(`${data}`)
66+
console.warn(`${data}`)
6767
})
6868
boltStub.on('end', data => {
69-
console.log(data)
69+
console.warn(data)
7070
})
7171
}
7272

@@ -76,7 +76,7 @@ class SupportedBoltStub extends UnsupportedBoltStub {
7676
})
7777

7878
boltStub.on('error', error => {
79-
console.log('Failed to start child process:' + error)
79+
console.warn('Failed to start child process:' + error)
8080
})
8181

8282
return new StubServer(() => exitCode)
@@ -114,7 +114,7 @@ function newDriver (url, config = {}) {
114114
// left here for debugging purposes
115115
const logging = {
116116
level: (process.env['NEOLOGLEVEL'] || 'error').toLowerCase(),
117-
logger: (level, msg) => console.log(`${level}: ${msg}`)
117+
logger: (level, msg) => console.warn(`${level}: ${msg}`)
118118
}
119119
// boltstub currently does not support encryption, create driver with encryption turned off
120120
const newConfig = Object.assign(

0 commit comments

Comments
 (0)