-
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
State: Remove subtree Makefiles in favor of single test runner #3773
Changes from all commits
0a42327
b08b1d5
ece40d7
12c0e8e
e358ef8
bc0576c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
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 played around with this a bit too, and came up with:
With single test usage:
The only downside is we don't get the setup/cleanup from the index.js file.
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.
@gwwar: I think we might be able to do something with
package.json
scripts, asnpm
will automatically traverse up to the closestpackage.json
. The idea would be to specify thetest
as running Mocha with all of our environment variables. This could be in apackage.json
inclient/state
, or in the rootpackage.json
, so long as we detect whether the current working directory is outside the project root.Then, running
cd client/state/sites/plans && npm test
would only run the site plans tests.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.
That seems like a big downside?
Maybe something to bake into a custom runner at the root? Only add files that match a glob, but always add the root, which has setup / teardown.