Skip to content
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

change the default test-main to strip the base and .js extensions so that sub dependencies load #36

Closed
lukeapage opened this issue Jun 18, 2015 · 4 comments

Comments

@lukeapage
Copy link

as per karma-runner/karma#513 (comment)
and #33

and several stack overflow questions etc.

the default test-main should be adjusted to strip the /base/ and extension so that sub dependencies are not loaded in absolute mode.

@dignifiedquire
Copy link
Member

Would that resolve the need for appending .js at the end of the files?

@dignifiedquire
Copy link
Member

Also, how does this relate to #27?

@dignifiedquire
Copy link
Member

Also is #7 relevant here?

@lukeapage
Copy link
Author

Would that resolve the need for appending .js at the end of the files?

yes. by default requirejs adds .js to files, but when a file is required with a absolute url and extension, all dependencies are loaded as-is. So removing the absolute part of the url and the file extension means that you get back the normal requirejs behaviour where the file extension is not required when you require from within a test.

I believe this is the same as #27 - though the person there is not removing the file extension and in my tests that is also required.

and yes this is the same as #7.

Sorry for the duplicate.. I didn't find those issues, but this problem seems to hit alot of people and it took an hour or so of searching to work out the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants