Add back test

This commit is contained in:
Fabio Berger 2019-02-20 17:59:53 -08:00
parent d892d16b51
commit 9d75a72a02

View File

@ -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', () => {