Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should validate the body (success case)', () => {
const m = H.decodeBody(t.number.decode)
const c = new MockConnection(new MockRequest({}, undefined, 1))
return assertSuccess(m, c, 1, [])
})
it('should validate the body (failure case)', () => {
const m = H.decodeBody(t.number.decode)
const c = new MockConnection(new MockRequest({}, undefined, 'a'))
return assertFailure(m, c, errors => {
assert.deepStrictEqual(failure(errors), ['Invalid value "a" supplied to : number'])
})
})
})