qunitjs/node-qunit

node-qunit throw error

Closed this issue · 3 comments

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

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

kof commented

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 commented

instead of merging ..

Thank you