4

I am trying to run my tests using Ember-CLI - Testem. Ember-CLI uses tests/index.html and not the usual testem.json config for testing.

Is there any way I can exclude certain files from being built into app.js?

Usecase : I have some js files where I inject some dependencies. These dependencies are different during the testing environment. I would like to ignore these files and inject the dependencies from my test-injectors.

Vishesh Joshi
  • 1,521
  • 2
  • 13
  • 32

1 Answers1

0

I'm answering in the context of an ember application using ember-cli 1.13.8 and ember 2.1. ember-cli does use testem.json unless you pass another test configuration file via ember test -c path/to/testem.json. Though, not all options from testem.json are integrated into ember-cli's test process.

To exclude trees, checkout: ember-cli exclude a directory beneath "tests" from being watched by "ember serve"

For ignoring specific files in tests, you can rename files so that they do not match the pattern embedded into ember-cli-test-loader: https://github.com/ember-cli/ember-cli-test-loader/blob/master/test-loader.js#L38-L40

Community
  • 1
  • 1
efx
  • 140
  • 10