Skip to content

Support for BigInt #1321

@fubar

Description

@fubar

Chai still doesn't support BigInts.

expect(BigInt(1)).to.equal(BigInt(2));

Results in TypeError: Do not know how to serialize a BigInt (triggered by JSON.stringify).

BigInt is now a standard primitive and it would be great if Chai supported it out of the box.

Stale/closed issue: #1195. The roadmap has that issue in todo but it has not been updated since Apr 2019: https://github.com/chaijs/chai/projects/2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions