lundi 30 mai 2016

How to debug "Could not find module" in Ember.js acceptance tests?

I'm in the process of updating a project to Ember 2.5.0 but stumbled upon an obstacle with running the acceptance tests: after trying to import moduleForAcceptance following the documentation for 2.5.0, I'm getting the error

Could not find module timelines-front/tests/helpers/module-for-acceptance imported from timelines-front/tests/acceptance/create-note-test

The import line is a straight from the documentation:

import moduleForAcceptance from 'timelines-front/tests/helpers/module-for-acceptance';

I tried creating a new Ember project with one test route and an acceptance test, all generated with CLI, and the import works as expected, so I'm assuming that there's something in my app or test code that is messing up with the import statement.

Trying to isolate the case I tried the following after ember new without success in reproducing the error:

  • Copying package.json, bower.json and installing.
  • Comparing testem.json to testem.js.
  • Checking my Phantomjs version (running 2.1.1)
  • Copying Brocfile.js and disabling ember-cli-build.js

My question is: how can I debug the include path and / or find what in the app code is changing it and ruining the import?




Aucun commentaire:

Enregistrer un commentaire