1.0.2 • Published 3 years ago

chai-bn-equal v1.0.2

Weekly downloads
97
License
AGPL-3.0
Repository
-
Last release
3 years ago

chai-bn-equal

Adds a bnEqual method to chai that compares the string version of the BN to a string version of its input.

Pairs well with chai-as-promised!

Installation:

npm i --save-dev chai-bn-equal

Example:

const chai = require("chai");
const chaiAsPromised = require("chai-as-promised");
const chaiBnEqual = require("chai-bn-equal");
const BN = require("bn.js");
chai.use(chaiBnEqual);
chai.use(chaiAsPromised);
chai.should();

describe("chai-bn-equal", () => {
  it("should pass", () => {
    return Promise.resolve(new BN("2")).should.eventually.bnEqual(2);
  });
});
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago