Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Commit

Permalink
Make #252 less painful, mark not-isolated tests
Browse files Browse the repository at this point in the history
With this commit you can run

```
npm run test-isolated
```

over and over again and the tests should pass. This does not fix the
issue mentioned above but it makes it less painful. At least I can make
my changes and run all tests exluding those that are not isolated. When I'm done
with my changes I can re-import the data and run all the tests, even those that
are not isolated.

This is what I did to get all the tests passing on my machine:

```
sudo rm /var/lib/neo4j/data/databases/* -r
sudo cp -rp ~/Downloads/temp/neo4j-graphql-js/recommendations.db/ /var/lib/neo4j/data/databases/graph.db
sudo systemctl restart neo4j.service
```

Very annoying.

@johnymontana @michaeldgraham do you know if there is a single command
that brings the database into a state where it was *before* running the
test case? Something that we could use in a `beforeEach` or `afterEach`?

See: #252 (comment)
  • Loading branch information
roschaefer committed May 23, 2019
1 parent f5af6d5 commit 2ed8ea3
Show file tree
Hide file tree
Showing 6 changed files with 307 additions and 285 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ references:
run_tests: &run_tests
run:
name: Run Tests
command: ./node_modules/.bin/nyc ./node_modules/.bin/ava test/*.js test/neo4j-schema/*Test.js
command: npm run test-all

env_neo4j34ee: &env_neo4j34ee
NEO4J_DIST: 'enterprise'
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ dist/
node-version
neo4j-version

test/tck/
test/tck/*
!test/tck/.gitkeep
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"parse-tck": "babel-node test/helpers/tck/parseTck.js",
"test-tck": "nyc ava --fail-fast test/tck/",
"report-coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"test-all": "nyc ava test/*.js test/neo4j-schema/*Test.js --verbose",
"test-all": "nyc ava test/ --verbose",
"test-isolated": "nyc ava test/ --verbose --match='!*not-isolated*'",
"debug": "nodemon ./example/apollo-server/movies.js --exec babel-node --inspect-brk=9229 --nolazy",
"debug-typedefs": "nodemon ./example/apollo-server/movies-typedefs.js --exec babel-node --inspect-brk=9229 --nolazy",
"debug-interface": "nodemon ./example/apollo-server/interfaceError.js --exec babel-node --inspect-brk=9229 --nolazy"
Expand Down
Loading

0 comments on commit 2ed8ea3

Please sign in to comment.