I have this in my testem.js
launch_in_ci: ['Chromium'],
launch_in_dev: ['Chrome'],
Is there any way to run ember test
and specify CI/dev environment?
I know I can use this solution but this looks like not the right way since I have configuration file.
Here is how testem chooses which config to use: https://github.com/testem/testem/blob/50ca9c274ec904d77a90915840349142231aadff/lib/config.js#L294 (I just searched for launch_in_dev on their github
appMode
is passed in to the constructor here: https://github.com/testem/testem/blob/50ca9c274ec904d77a90915840349142231aadff/lib/config.js#L44
that Config
class is required
here: https://github.com/testem/testem/blob/50ca9c274ec904d77a90915840349142231aadff/lib/api.js#L4
and constructed here: https://github.com/testem/testem/blob/50ca9c274ec904d77a90915840349142231aadff/lib/api.js#L53 So we need to find out how options
is set and when setup
is called.
options
in Api
is set here: https://github.com/testem/testem/blob/50ca9c274ec904d77a90915840349142231aadff/lib/api.js#L74-L86 ( startDev
and startCi
-- these seem fairly specific -- hopefully we're close to finding the answer.)
those methods are both called here: https://github.com/testem/testem/blob/50ca9c274ec904d77a90915840349142231aadff/testem.js#L79-L81
and now what we're looking for is how progOptions
gets built.
It comes from here: https://github.com/testem/testem/blob/50ca9c274ec904d77a90915840349142231aadff/testem.js#L5 which is from https://www.npmjs.com/package/commander
which means we need to read through all the following config below where commander is required.
App mode is set: https://github.com/testem/testem/blob/50ca9c274ec904d77a90915840349142231aadff/testem.js#L8-L52 in the evaluation of each of these. Which maybe means that this is normally not an automated switch and ember is abstracting this for us.
So let's hop on over to ember-cli: a search brought me to this file: https://github.com/ember-cli/ember-cli/blob/b24b73b388934796ca915ca665b48a27c857199b/lib/tasks/test.js#L13
but here it looks like ember is always running CI.
so.. idk. I'll leave this here for others to go spelunking, but I gotta do some chores now.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.