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

node-qunit throw error #83

Closed
qiongtubao opened this issue Nov 27, 2013 · 3 comments
Closed

node-qunit throw error #83

qiongtubao opened this issue Nov 27, 2013 · 3 comments

Comments

@qiongtubao
Copy link

when run
module.exports.String = function() {

}
then child.js throw error?why?
in windows7 and node -v 0.10.21

@kof
Copy link
Contributor

kof commented Nov 27, 2013

because exports per default merged with global object, like its done in browser if youjust assign variables without local scope, to let scripts work in node same way like in browser, but you can specify namespace for your module, so its then assigned to thhis namespace.

@kof
Copy link
Contributor

kof commented Nov 27, 2013

instead of merging ..

@qiongtubao
Copy link
Author

Thank you

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