# Testing and Coffescript

**URL:** <https://discuss.emberjs.com/t/testing-and-coffescript/11491>\
**Category:** Testing\
**Created:** [August 30, 2016, 1:59pm UTC](https://discuss.emberjs.com/t/testing-and-coffescript/11491 "2016-08-30T13:59:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ofridagan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/ofridagan/32/15760_2.png) [@ofridagan](https://discuss.emberjs.com/u/ofridagan)\
**Post date:** [August 30, 2016, 1:59pm UTC](https://discuss.emberjs.com/t/testing-and-coffescript/11491/1 "2016-08-30T13:59:09Z")

</div>

Hi,

I’m using Ember 1.13.13 and trying to run tests with: `ember test`.

In my tests I use something like: moduleFor(‘route:four-oh-four’, ‘FourOhFourRoute’, {}) but I get: Promise rejected before it exists: Attempting to register an unknown factory: `route:four-oh-four`

I suspect it has something to do with coffeescript… Does anyone used ember-cli-coffescript with tests successfully?

Thanks.

---

<div class="post-metadata">

**Author:** ![ofridagan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/ofridagan/32/15760_2.png) [@ofridagan](https://discuss.emberjs.com/u/ofridagan)\
**Post date:** [August 31, 2016, 1:00pm UTC](https://discuss.emberjs.com/t/testing-and-coffescript/11491/2 "2016-08-31T13:00:50Z")

</div>

I’m sorry, my mistake. My problem had nothing to do with coffeescript!

I ignored one Phantom.js error before all the “unknown factory” errors. It was just an “Unexpected token ‘,’” The reason was duplicate key in some json object.

It caused all the other modules to not load… hence the “unknown factory” errors
