Add back test
This commit is contained in:
parent
d892d16b51
commit
9d75a72a02
@ -154,6 +154,18 @@ describe('Assertions', () => {
|
|||||||
invalidInputs.forEach(input => expect(assert.isBoolean.bind(assert, variableName, input)).to.throw());
|
invalidInputs.forEach(input => expect(assert.isBoolean.bind(assert, variableName, input)).to.throw());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
describe('#isWeb3Provider', () => {
|
||||||
|
it('should not throw for valid input', () => {
|
||||||
|
const validInputs = [{ send: () => 45 }, { sendAsync: () => 45 }];
|
||||||
|
validInputs.forEach(input =>
|
||||||
|
expect(assert.isWeb3Provider.bind(assert, variableName, input)).to.not.throw(),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('should throw for invalid input', () => {
|
||||||
|
const invalidInputs = [42, { random: 'test' }, undefined, new BigNumber(45)];
|
||||||
|
invalidInputs.forEach(input => expect(assert.isWeb3Provider.bind(assert, variableName, input)).to.throw());
|
||||||
|
});
|
||||||
|
});
|
||||||
describe('#doesConformToSchema', () => {
|
describe('#doesConformToSchema', () => {
|
||||||
const schema = schemas.addressSchema;
|
const schema = schemas.addressSchema;
|
||||||
it('should not throw for valid input', () => {
|
it('should not throw for valid input', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user