New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
text! plugin could not load the HTML template during test #8
Comments
I think it happens because the code which looks for "text!" string is not part of require.js, but rather a plugin, and that plugin is not installed in the karma-requirejs (i think). Having the same problem now. |
Actually, all you need to do is to require the "text.js" file (from https://github.com/requirejs/text) before you require the files that include HTML. Should work after that. |
Same issue here. I fixed it by specifying my requirejs-text plugin in the deps array before my tests in test-main.js. e.g.:
|
Same issue here. I fixed it by specifying my requirejs-text plugin in the deps array before my tests in test-main.js. But I have an other error
I don't understand this error My test-main.js is:
And the error is produce by this file
The project worked directly in web but not in CLI |
Is this still an issue? |
Just had the issue |
|
In my case, I had to add the following to karma.conf.js:
|
I have a text! to load my basic HTML template to use for my Backbone Require.js project at here - https://github.com/mech/front_end_demo
If you run the server, the template will get the properly loaded, but the karma test runner did not seem to be able to load the HTML file. It can somehow only load if I renamed the file to
show.js
instead ofshow.html
. This conclude that the path is visible, just that it cannot load HTML files?Error: /base/app/assets/javascripts/src/client/templates/show.html HTTP status: 404
Appreciated for any help.
The text was updated successfully, but these errors were encountered: