jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

using i18n.js with teaspoon ? #298

Closed jvenezia closed 9 years ago

jvenezia commented 9 years ago

I'm using teaspoon with qunit to test my ember.js application, which uses i18n.js for internationalization.

When I run tests I get :

   Uncaught ReferenceError: require is not defined

It is called in this file, line 6.

Any clue on this? Thanks!

jejacks0n commented 9 years ago

Have you loaded require.js, and read the documentation for the libraries you're using?


Jeremy Jackson

On Jan 26, 2015, at 7:24 AM, Jeremy Venezia notifications@github.com wrote:

I'm using teaspoon with qunit to test my ember.js application, which uses i18n.js for internationalization.

When I run tests I get :

Uncaught ReferenceError: require is not defined It is called in this file, line 5.

Any clue on this? Thanks!

— Reply to this email directly or view it on GitHub.

jvenezia commented 9 years ago

Yes, I know what I'm doing, and I searched for similar problems before submitting an issue.

I don't need require.js since i'm using rails witch uses sprockets to require files.

I've just realized that Qunit's module may be the problem. So this condition is true, but it should not.

So It may be a I18n.js issue, and not teaspoon... I'm closing this issue and checking this out...

jejacks0n commented 9 years ago

But I see a require call in the library, so I'm unsure how it works without the dependency. Sorry it's not what you want to hear, but it seems to be the problem.


Jeremy Jackson

On Jan 26, 2015, at 10:30 AM, Jeremy Venezia notifications@github.com wrote:

Yes, I know what I'm doing, and I searched for similar problems before submitting an issue.

I don't need require.js since i'm using rails witch uses sprockets to require files.

I've just realized that Qunit's module may be the problem. So this condition is true, but it should not.

So It may be a I18n.js issue, and not teaspoon... I'm closing this issue and checking this out...

— Reply to this email directly or view it on GitHub.

jvenezia commented 9 years ago

Fixed here https://github.com/fnando/i18n-js/issues/294 !

The issue was from I18n.js

Thanks!