@hyperlane-xyz/utils
Version:
General utilities and types for the Hyperlane network
11 lines • 450 B
JavaScript
import { expect } from 'chai';
import { assert } from './validation.js';
describe('assert', () => {
it('should not throw an error when the predicate is true', () => {
expect(() => assert(true, 'Error message')).to.not.throw();
});
it('should throw an error when the predicate is false', () => {
expect(() => assert(false, 'Error message')).to.throw('Error message');
});
});
//# sourceMappingURL=validation.test.js.map