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

chai-iterator breaks chai.assert functions #14

Open
andyfusniak opened this issue Nov 18, 2017 · 1 comment
Open

chai-iterator breaks chai.assert functions #14

andyfusniak opened this issue Nov 18, 2017 · 1 comment

Comments

@andyfusniak
Copy link

andyfusniak commented Nov 18, 2017

I'm using chai version 4.1.2. With node version 8.9.1 LTS.

The following program runs just fine:

const chai = require('chai');
chai.assert.isObject({});

but once the chai-iterator library is in use

const chai = require('chai');
const chaiIterator = require('chai-iterator');
chai.use(chaiIterator);
chai.assert.isObject({});

the following error appears:

/Users/mr6502/projects/project/node_modules/chai/lib/chai/assertion.js:141
      throw new AssertionError(msg, {
      ^
AssertionError: expected undefined to be an object
    at Function.assert.isObject (/Users/mr6502/projects/project/node_modules/chai/lib/chai/interface/assert.js:602:58)
    at Object.<anonymous> (/Users/mr6502/projects/project/a.txt:4:13)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
@harrysarson
Copy link

I think this is the same bug as #12. I am hoping that my pull request #17 would also solve this issue.

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