Framework: introduce config file with all test names to be included in the single tests runner #3801
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR depends on PR #3797 from @blowery and follows work done by @aduth in #3773. It tries to remove some boilerplate code around requiring test files in
*/test/index.js
file. The idea here is to have single runner that loads all test files from single JSON config file. Config file is created in a way that should allow us to remove it completely once we are done with removingMakefile
files. As part of this change I also got rid of other single test runners we created earlier this week and included them in single tests runner created by @blowery:state
lib/domains
How it works
I followed that idea of @aduth to have
describe
block which reflects folders structure of our client application. Basically test structure is identical to what was merged in #3773. Example:Folder name:
client/state/plugins/wporg/test/
Test files:
reducer.js
test-actions
test-selectors
Translates into config file:
Test output:
Testing
client
folder.make test
.Performance
Single test runner contains at this moment 593 passing and 16 pending tests.
Execution time:
Open issues and possible improvements
I'm not sure if it still works with changes I made. I'm leaving it as for now, because I want to see feedback first.
2. Config containing test file names reflects our existing folders structure, so it should be relatively easy to implement logic that executes only subset of tests based on path provided as input param.