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
appModeis passed in to the constructor here: https://github.com/testem/testem/blob/50ca9c274ec904d77a90915840349142231aadff/lib/config.js#L44that
Configclass isrequiredhere: https://github.com/testem/testem/blob/50ca9c274ec904d77a90915840349142231aadff/lib/api.js#L4and constructed here: https://github.com/testem/testem/blob/50ca9c274ec904d77a90915840349142231aadff/lib/api.js#L53 So we need to find out how
optionsis set and whensetupis called.optionsinApiis set here: https://github.com/testem/testem/blob/50ca9c274ec904d77a90915840349142231aadff/lib/api.js#L74-L86 (startDevandstartCi-- 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
progOptionsgets 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.