-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Better test-jasmine karma.conf.js with minimist #1524
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
Conversation
- better handle test suite arguments (normalize file name) - add --bundleTest=<> argument to make testing bundle test easier to run - add --watch, --verbose, --width, --height and --info flags
test/jasmine/karma.conf.js
Outdated
}, | ||
'default': { | ||
info: false, | ||
watch: false, |
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.
watch
is set to false
by default so that npm run test-jasmine
exits on complete by default.
We could alternatively make npm run test-jasmine
auto-watch and auto-rerun like previously and a --no-watch
flag instead. I'm open to suggestions
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 like having watch on 99% of the time. And even when I don't want to run multiple times (ie when I'm running the full suite) it's easy enough to just ctrl-c
at the end. So I'd definitely vote to flip the default.
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.
Sounds good!
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.
done in 7cf9943
return _.length === 1 ? | ||
_[0] + SUFFIX : | ||
'{' + _.join(',') + '}' + SUFFIX; | ||
}; |
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.
This logic
npm run test-jasmine -- axes bar scatter
does the same as
npm run test-jasmine -- axes_test.js tests/scatter_test.js bar
I hope you enjoy not having to type those tests/
and _test.js
to run individual test suites.
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.
THIS IS GREAT. Though I'd mostly internalized tests/*.js
, it's a real nice feature, especially for newcomers!
- `nowatch` is false by default locally and true by default on CI
Love it! 💃 |
This PR 🔪
citest-jasmine
test script and allows easier and better configuration of our jasmine test runner using theminimist
argument parser.From the new
npm run test-jasmine -- --info
output:@alexcjohnson @rreusser @monfera @n-riesco I hope you like the improvements.