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

Upgrade chai to 4.3.4 #146

Closed
Voileexperiments opened this issue Sep 15, 2021 · 2 comments
Closed

Upgrade chai to 4.3.4 #146

Voileexperiments opened this issue Sep 15, 2021 · 2 comments

Comments

@Voileexperiments
Copy link

Voileexperiments commented Sep 15, 2021

https://github.com/chaijs/chai/releases/tag/v4.3.4

4.3.4 finally fixed BigInt display in should assertions, which is currently a critical issue with every JS kata that use BigInts in test assertions because this would be displayed when tests with them fail:

const chai = require("chai");
const assert = chai.assert;
chai.config.truncateThreshold = 0;

describe("example tests", function() {
  it("returns correct values for example N", function() {
    assert.deepEqual([1n, 2n], [3n, 4n], "Failed when n = 3");
  }); 
});

image

@hobovsky
Copy link

There's a known workaround, and it was planned to be documented but I never got to this: codewars/docs#257

But now, since it got fixed in Chai itself, it's even better.

@kazk kazk added this to Next Up in CodeRunner Sep 15, 2021
@kazk kazk moved this from Next Up to In Progress in CodeRunner Sep 15, 2021
@kazk kazk moved this from In Progress to To Deploy in CodeRunner Sep 15, 2021
@kazk
Copy link
Member

kazk commented Sep 16, 2021

Updated in JavaScript Node 12 and TypeScript 4.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants