We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi I've got two files: test1.js 'use strict'; const chai = require('chai'); chai.use(require('chai-things'));
test2.js 'use strict';
const chai = require('chai'), expect = chai.expect; chai.use(require('chai-like')); chai.use(require('chai-things'));
describe('Test', function() { it('test', function() { expect([{test: 'test'}]).to.be.an('array') .that.contains.something.like({ test: 'test' }); }); });
Try to execute each file: mocha test1.js 0 passing (1ms)
mocha test1.js 0 passing (1ms)
mocha test2.js Test ✓ test 1 passing (7ms)
Everything is ok. Now let's try to run both files: mocha test1.js test2.js
mocha test1.js test2.js
Test 1) test
0 passing (8ms) 1 failing
If you add chai.use(require('chai-like')); to the test1.js the issue disappears: test1.js 'use strict';
const chai = require('chai');
chai.use(require('chai-like')); chai.use(require('chai-things'));
Run tests: mocha test1.js test2.js
Test ✓ test
1 passing (8ms)
chai 4.2.0 chai-things 0.2.0 chai-like 1.1.1
The text was updated successfully, but these errors were encountered:
Looks like I've found the root of the issue. Resolved
Sorry, something went wrong.
chai.use
.has.property
No branches or pull requests
Hi
I've got two files:
test1.js
'use strict';
const chai = require('chai');
chai.use(require('chai-things'));
test2.js
'use strict';
const chai = require('chai'),
expect = chai.expect;
chai.use(require('chai-like'));
chai.use(require('chai-things'));
describe('Test', function() {
it('test', function() {
expect([{test: 'test'}]).to.be.an('array')
.that.contains.something.like({ test: 'test' });
});
});
Try to execute each file:
mocha test1.js 0 passing (1ms)
mocha test2.js Test ✓ test 1 passing (7ms)
Everything is ok. Now let's try to run both files:
mocha test1.js test2.js
Test
1) test
0 passing (8ms)
1 failing
test:
AssertionError: expected { test: 'test' } to be like { test: 'test' }
If you add chai.use(require('chai-like')); to the test1.js the issue disappears:
test1.js
'use strict';
const chai = require('chai');
chai.use(require('chai-like'));
chai.use(require('chai-things'));
Run tests:
mocha test1.js test2.js
Test
✓ test
1 passing (8ms)
chai 4.2.0
chai-things 0.2.0
chai-like 1.1.1
The text was updated successfully, but these errors were encountered: