-
Notifications
You must be signed in to change notification settings - Fork 231
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
Update karma to run both firefox & chrome tests #894
Update karma to run both firefox & chrome tests #894
Conversation
This has to be optional. From my testing a few months ago Chrome does not work well inside a container, which means its probably not going to work well in Travis either. Our tests have to be runnable inside a container for when we move to testing all of our stuff on openshift itself |
With most of us developing in Chrome anyway, I'm not sure we get much benefit from running the spec tests in Chrome. |
|
b45638b
to
14fd5d0
Compare
how about this? can now set the browser else default to FF: browsers=Chrome grunt test |
you should do that with a grunt option not an environment variable for consistency with how we do all of our options |
tried that, grunt doesn't exist in the |
looks like you can override anything in the config file in the Gruntfile https://github.com/karma-runner/grunt-karma#heres-an-example-that-puts-the-config-in-the-gruntfile |
14fd5d0
to
c0e91e2
Compare
Aha, I tried this in karma: {
unit: {
configFile: 'test/karma.conf.js',
singleRun: true,
browsers: grunt.options('browsers') ? [grunt.options('browsers')] : ['Firefox']
}
}, But it doesn't work cuz no karma: {
unit: {
configFile: 'test/karma.conf.js',
singleRun: true,
// defaulting to Firefox for running tests, but recommend Chrome for writing
// tests due to better error messages:
// grunt test --browsers=Chrome
browsers: grunt.option('browsers') ? [grunt.option('browsers')] : ['Firefox']
}
} Seems better? |
Yeah generally looks like the right direction to me. On Mon, Nov 21, 2016 at 2:52 PM, Ben Petersen [email protected]
|
😄 |
i'd probably just go with comma separated and do a string split if the On Mon, Nov 21, 2016 at 3:03 PM, Ben Petersen [email protected]
|
c0e91e2
to
c6f3267
Compare
Nice, that works, no quiry 'multiple options for grunt test
grunt test --browsers=Chrome
grunt test --browsers=Chrome,Firefox |
[merge] |
Evaluated for origin web console merge up to c6f3267 |
Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/750/) (Base Commit: 23682f1) |
Updating Karma to run both tests in both Firefox & Chrome concurrently:
@jwforres @spadgett