fastboot icon indicating copy to clipboard operation
fastboot copied to clipboard

Changing the FastBoot runtime environment

Open ryanto opened this issue 5 years ago • 3 comments

I've got a question about how to best load an Ember application built from Ember CLI into FastBoot for ember-cli-fastboot-testing

I have an Ember application that's built using ember-cli, so it's build time environment is development. When I load that dist path into new FastBoot() it uses the the application's config environment of development, which makes sense!

However, I'm wondering if I can take that same build and load it into FastBoot with a run time environment of test. I guess this question boils down to: Do I have the ability to tell FastBoot to use a different run time environment + config from what the app was built with?

What I'm trying to accomplish: I want fastboot-testing to piggy back off of the dist built by ember-cli-fastboot, but when it loads that dist I want it to use a runtime env of test.

ryanto avatar Apr 18 '19 21:04 ryanto

Came here from stumbling onto this problem after getting test failures with ember-cli-fastboot-testing when running tests from localhost:4200/tests. It'd be great if we could do this ^

jkeen avatar Jan 14 '20 17:01 jkeen

Same here. I have some logs that run on FastBoot only for test env and they don't run when I test with localhost:4200/tests.

viniciussbs avatar Jan 16 '20 12:01 viniciussbs

I think ember test and ember build both accept --envrironment where you can specify development vs test https://cli.emberjs.com/release/advanced-use/cli-commands-reference/#embertest

xg-wang avatar Feb 09 '21 21:02 xg-wang