mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fix non-deterministic erros in testing
Without the `--runInBand` flag, jest will create a worker pool of child processes and run the tests withing. No surprise, why the tests were running completely non-deterministically! If we clear the database in the middle of the tests we will end up with no records, or if we run the factories in several tests we end up with many duplicate records. FYI: @mattwr18 @appinteractive @tansaku @Kachulio1
This commit is contained in:
parent
70b20302fe
commit
6f487e2687
@ -14,7 +14,7 @@
|
||||
"lint": "eslint src --config .eslintrc.js",
|
||||
"test": "nyc --reporter=text-lcov yarn run test:jest",
|
||||
"test:jest": "$npm_package_config_no_auth run-p --race start test:cmd:jest",
|
||||
"test:cmd:jest": "jest --forceExit --detectOpenHandles",
|
||||
"test:cmd:jest": "jest --forceExit --detectOpenHandles --runInBand",
|
||||
"test:coverage": "nyc report --reporter=text-lcov > coverage.lcov",
|
||||
"db:script:seed": "wait-on tcp:4001 && babel-node src/seed/seed-db.js",
|
||||
"db:script:reset": "wait-on tcp:4001 && babel-node src/seed/reset-db.js",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user