mirror of
https://github.com/tornadocash/tornado-relayer.git
synced 2025-07-23 06:51:17 -04:00
add test for isKnownContract validation
This commit is contained in:
parent
b29f266b8c
commit
2ba1f53b4f
2 changed files with 13 additions and 9 deletions
|
@ -19,7 +19,13 @@ describe('Validator', () => {
|
|||
'.proof should match pattern "^0x[a-fA-F0-9]{512}$"',
|
||||
)
|
||||
})
|
||||
|
||||
it('should throw if unknown contract', () => {
|
||||
const malformedData = { ...withdrawData }
|
||||
malformedData.contract = '0xf17f52151ebef6c7334fad080c5704d77216b732'
|
||||
getTornadoWithdrawInputError(malformedData).should.be.equal(
|
||||
'.contract should pass "isKnownContract" keyword validation',
|
||||
)
|
||||
})
|
||||
it('should throw something is missing', () => {
|
||||
const malformedData = { ...withdrawData }
|
||||
delete malformedData.proof
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue