You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure why it takes long time.
Please take a look.
Steps to Reproduce
Run this test.
"use strict";
const expect = require("chai").expect;
// Make large string
// If loop count is 10000, the test never finish.
const largeString = (function() {
let result = "";
for (let i=0; i<3000; i++) {
result += "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
}
return result;
})();
describe("Very slow test", () => {
it("compare large string", () => {
expect("a").to.equal(largeString);
});
});
Versions
mocha = 5.2.0
node = v8.8.1
chai = v4.1.2
The text was updated successfully, but these errors were encountered:
We're aware of this issue. It's due to our inspection engine which has trouble trying to turn big values into strings. This will be fixed in Chai 5 which will include a rewrite of the inspection engine to deal with such large values, and the inspection engine will only be called when a test fails. We'll be releasing chai 5 soon, but for now I'll close this issue because it is tracked on our roadmap (https://github.com/chaijs/chai/projects/2).
I'm using mocha and chai.
When I run test with large string and it fails, mocha stops long time.
Initially I made an issue on mocha.
mochajs/mocha#3416
But mocha guys says it is an issue for chai.
I'm not sure why it takes long time.
Please take a look.
Steps to Reproduce
Run this test.
Versions
mocha = 5.2.0
node = v8.8.1
chai = v4.1.2
The text was updated successfully, but these errors were encountered: