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

TypeError: Cannot set property '__set__' of undefined #55

Open
jludev1 opened this issue Aug 9, 2015 · 0 comments
Open

TypeError: Cannot set property '__set__' of undefined #55

jludev1 opened this issue Aug 9, 2015 · 0 comments

Comments

@jludev1
Copy link

jludev1 commented Aug 9, 2015

Got the following error when mock-fs is loaded in a QUnit test on mac.

npm test

> test@ test /Users/jlu/projects/test
> qunit-cli tests/*.js

/Users/jlu/projects/test/node_modules/mock-fs/node/fs-0.12.0.js:1887
module.exports.__set__ = function __set__() {
                       ^
TypeError: Cannot set property '__set__' of undefined
    at Object.<anonymous> (/Users/jlu/projects/test/node_modules/mock-fs/node/fs-0.12.0.js:1887:24)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Object.load (/Users/jlu/projects/test/node_modules/mock-fs/node_modules/rewire/lib/moduleEnv.js:19:18)
    at internalRewire (/Users/jlu/projects/test/node_modules/mock-fs/node_modules/rewire/lib/rewire.js:56:15)
    at rewire (/Users/jlu/projects/test/node_modules/mock-fs/node_modules/rewire/lib/index.js:11:12)
    at Object.<anonymous> (/Users/jlu/projects/test/node_modules/mock-fs/lib/index.js:42:14)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
npm ERR! Test failed.  See above for more details.

Test:

var QUnit = require('qunit-cli');
var mock = require('mock-fs');

QUit.module('test');

test('test', function (assert){
  assert(strictEqual(1, 2));
})

Package.json

{
  "name": "test",
  "scripts": {
    "test": "node_modules/.bin/qunit-cli tests/*.js"
  },
  "devDependencies": {
    "mock-fs": "^3.0.0",
    "qunit-cli": "^0.2.0"
  }
}
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

1 participant