Skip to content

Instantly share code, notes, and snippets.

@dekokun
Created March 27, 2012 13:02
Show Gist options
  • Save dekokun/2215597 to your computer and use it in GitHub Desktop.
Save dekokun/2215597 to your computer and use it in GitHub Desktop.
おかしい→おかしくなさそう
% mocha *.js [~/work/test]
..
✖ 1 of 2 tests failed:
1) hoge fuga:
AssertionError: expected 1 to equal 2
以下エラーメッセージ
(function() {
var should;
should = require("should");
should.test = 2;
describe('hoge', function() {
return it('fuga', function() {
return should.test.should.be.equal(2);
});
});
}).call(this);
(function() {
var should;
should = require("should");
should.test = 1;
describe('hoge', function() {
return it('fuga', function() {
return should.test.should.be.equal(1);
});
});
}).call(this);
@dekokun
Copy link
Author

dekokun commented Mar 27, 2012

名前空間は同じじゃないな。module.exportsによってshouldが共有されていたんだ。
片方をgero = require("should")とかに変えてもどうようの事象が発生したため。

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