ember-data-factory-guy: Test Helpers in Factory break development build

Since the new development mode has shipped I notice that factories are being included in the development build in the app’s JS by default and even when I set ENV.factoryGuy = false, i.e. I don’t want to use Factory Guy in development mode.

In one of my factories I import a test helper like so:

import { getAdminFixture } from 'embercom/tests/helpers/data';

but because the factory is being included in dev build and the test helpers aren’t, it breaks my app in development mode with the following error: Could not find module embercom/tests/helpers/data imported from embercom/tests/factories/engage/message-variation

Should we not be excluding the factories from development builds if you don’t want to use the new development mode?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 16

Most upvoted comments

@danielspaniel just to confirm that 2.11.0 works for us when we set:

ENV.factoryGuy = { enabled: false, useScenarios: false };

Factory Guy doesn’t appear in our dev environment. Thanks for making those changes 👍