Skip to content

Refactor boltstub, always run related tests #291

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
Sep 27, 2017

Conversation

lutovich
Copy link
Contributor

Previously driver allowed boltkit to be an optional dependency and relied on neokit (submodule) to start/stop neo4j database. That's why all tests that use stub server from boltkit were executed as a separate step. These days boltkit is always required and neokit is gone.

This commit refactors stub server handling and turns all boltkit tests into normal tests that run as part of npm test and runTests script. These tests are however skipped in browser testing because it is not possible to spawn child processes when in phantomjs environment.

Previously driver allowed boltkit to be an optional dependency and
relied on neokit (submodule) to start/stop neo4j database. That's
why all tests that use stub server from boltkit were executed as a
separate step. These days boltkit is always required and
neokit is gone.

This commit refactors stub server handling and turns all boltkit tests
into normal tests that run as part of `npm test` and `runTests` script.
These tests are however skipped in browser testing because it is not
possible to spawn child processes when in phantomjs environment.
@lutovich lutovich requested a review from ali-ince September 22, 2017 23:37

it('should run query', done => {
if (!boltkit.BoltKitSupport) {
if (!boltStub.supported) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about switching between describe or xdescribe based on the value of boltStub.supported before L24? Something like

const fdescribe = boltStub.supported ? describe : xdesribe;

fdescribe('direct driver with stub server', () => ....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting point, if will save us from all these boltStub.supported checks. Let's maybe do it in a separate PR. I'll create a card.

Copy link
Contributor

@ali-ince ali-ince left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lutovich lutovich merged commit bf34d90 into neo4j:1.5 Sep 27, 2017
@lutovich lutovich deleted the 1.5-always-test-boltkit branch September 27, 2017 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants