locklift
Version:
Node JS framework for working with Ever contracts. Inspired by Truffle and Hardhat. Helps you to build, test, run and maintain your smart contracts.
11 lines (8 loc) • 374 B
text/typescript
import { ViewTrace } from "src/internal/tracing/types";
export function supportWithCount(Assertion: Chai.AssertionStatic, utils: Chai.ChaiUtils) {
Assertion.addMethod("count", function (this: any, count: number) {
const events = utils.flag(this, "messages") as ViewTrace<string, unknown>[];
new Assertion(events.length).to.be.eq(count);
return this;
});
}