Skip to content

Commit 9919de9

Browse files
committed
Introduce testcontainers for integration tests
`testcontainers` replaces `boltkit` as library to start docker containers. The container should be able to start when `npm run test`, `npm run test::integration` and `npm run test::browser` are run if methods are not called from testkit. Running the tests direct from the IDE should be also an supported usecase.
1 parent e8bddb7 commit 9919de9

27 files changed

+1349
-468
lines changed

packages/neo4j-driver/gulpfile.babel.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ gulp.task('test-nodejs-stub', () => {
139139
return runJasmineTests('#stub*')
140140
})
141141

142-
gulp.task('test-nodejs-integration', () => {
142+
gulp.task('test-nodejs-integration', async () => {
143+
await sharedNeo4j.start()
143144
return runJasmineTests('#integration*')
144145
})
145146

@@ -190,13 +191,11 @@ gulp.task('set', function () {
190191
})
191192

192193
gulp.task('start-neo4j', function (done) {
193-
sharedNeo4j.start()
194-
done()
194+
sharedNeo4j.start().then(done)
195195
})
196196

197197
gulp.task('stop-neo4j', function (done) {
198-
sharedNeo4j.stop()
199-
done()
198+
sharedNeo4j.stop().then(done)
200199
})
201200

202201
gulp.task('run-stress-tests', function () {
@@ -242,7 +241,7 @@ gulp.task('test-browser', gulp.series('browser', 'run-browser-test'))
242241

243242
gulp.task(
244243
'test',
245-
gulp.series('run-ts-declaration-tests', 'test-nodejs', 'test-browser')
244+
gulp.series('run-ts-declaration-tests', 'start-neo4j', 'test-nodejs', 'test-browser', 'stop-neo4j')
246245
)
247246

248247
gulp.task('default', gulp.series('test'))

0 commit comments

Comments
 (0)