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

loglevel cannot be used with qunit #46

Closed
maihde opened this issue Jun 2, 2014 · 3 comments
Closed

loglevel cannot be used with qunit #46

maihde opened this issue Jun 2, 2014 · 3 comments

Comments

@maihde
Copy link
Contributor

maihde commented Jun 2, 2014

I have a JavaScript project where I wish to use loglevel without AMD or RequireJS. It works fine until I attempt to run my QUnit tests. The first problem is that QUnit declares it's own global log() method, the second is that QUnit also declares a global module object so loglevel goes into the RequireJS initialization path, finally when Qunit is loading <script> elements the window element is still undefined.

I've worked around both by modifying loglevel to explicitly rename the log and bind it to window...but this is definitely not a general solution that will work for others. Thoughts?

@pimterry
Copy link
Owner

pimterry commented Jun 2, 2014

Interesting, thanks! I'll get that fixed asap.

Do you have some code illustrating these issues that I could take a look at?

@maihde
Copy link
Contributor Author

maihde commented Jun 4, 2014

I've created a fork with three commits https://github.com/maihde/loglevel/commits/qunit and submitted a pull request.

@pimterry
Copy link
Owner

pimterry commented Aug 3, 2014

I think with that PR this is now sorted, so I'm closing it. Shout if that's not correct!

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

No branches or pull requests

2 participants