-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Test: Drop whitelist config for server and test folders #4673
Conversation
9097a62
to
8c453e8
Compare
I guess we can already take similar step for |
Hmm, client test failed. No idea why, I'll look into that tomorrow ;) |
8c453e8
to
6a41f78
Compare
Circle CI is green again, but I have no idea why those tests failed before. I couldn't reproduce locally. I dropped now also |
82469ab
to
3659822
Compare
const sandbox = sinon.sandbox.create(); | ||
let app, config, localRequest; | ||
|
||
before( () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to be on a safe side and require all stuff here. I opened follow up #4697 to refactor this very desktop
dependent test.
3659822
to
3b4dd45
Compare
parallel: true | ||
files: | ||
- server/**/test/*.js | ||
- server/**/test/*.jsx | ||
- NODE_ENV=test make client/config/index.js && MOCHA_FILE=./test-results-tests.xml npm run test-tests -- --reporter=mocha-junit-reporter -w: | ||
- NODE_ENV=test make client/config/index.js && MOCHA_FILE=./test-results-test.xml npm run test-test -- --reporter=mocha-junit-reporter: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make the building of the config an earlier part of the run and stop repeating it?
I feel like I tried it and circle did some weird things.. Might be worth trying again to DRY this up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll give it a try :)
7dcefac
to
eb863cc
Compare
I moved config generation to |
🚢 |
Part of #4596.
At the moment I removed
test.json
whitelist forserver
andtest
folder. We need to keep whitelist forclient
folder until we migrate all remaining test folders. To make everything compatible I also changes the way we enabled whitelist. It's now always enabled forclient
folder only.I also renamed npm script for
test
folder fromtest-tests
totest-test
to align it with other subfolders.Testing
All test runs should pass:
npm run test-client
npm run test-server
npm run test-test
Also for single test file:
npm run test-client client/lib/accept/test/index.js
npm run test-test test/test/helpers/use-nock/test/index.js
And finally we need to make sure that on Circle CI test runner doesn't run any tests if no test files are provided. Locally it should always load all possible tests when no test files are specified in npm command.