Skip to content
This repository was archived by the owner on Nov 10, 2022. It is now read-only.

Let users supply their own test function #315

Merged
merged 4 commits into from
Feb 10, 2020
Merged

Conversation

derekherman
Copy link
Contributor

You may want to run a different test suite like Jest, for example. This will make it so you can create a run_tests function in .dev-lib for convenience.

You may want to run a different test suite like Jest, for example. This will make it so you can create a `run_tests` function in `.dev-lib` for convenience.
@derekherman derekherman requested a review from kasparsd February 9, 2020 05:49
@derekherman
Copy link
Contributor Author

@kasparsd could you review, merge, and tag a new version. I need this so I can send JS coverage to Coveralls. I can obviously do it a thousand other ways like the .travis.yml, but this is a bit more elegant since it also works in the pre-commit hook locally.

Copy link
Contributor

@kasparsd kasparsd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this expecting a user defined run_tests function in .dev-lib, for example?

Since the conditional check does stand out in the middle of all the run_* calls, could we document the purpose of it or the suggested use as an inline comment?

Also, should we make it sound more generic so that it could be used for anything -- not just tests? Maybe run it first thing after the scope check?

@derekherman
Copy link
Contributor Author

@kasparsd Yes this is expecting a user defined run_tests in the .dev-lib. So you're thinking before lint_js_files, have any suggestion for what to call it? How about a before_lint and a before_tests?

@kasparsd
Copy link
Contributor

@derekherman How about a generic run_checks? Then again -- all of the checks are some sort of test so your original run_tests also sounds generic enough. I'll move the generic runner above everything else and we can leave it as is.

@derekherman
Copy link
Contributor Author

@kasparsd sounds good!

@derekherman derekherman merged commit 3e3ced3 into master Feb 10, 2020
@derekherman derekherman deleted the feature/run_tests branch February 10, 2020 09:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants