Skip to content

Instantly share code, notes, and snippets.

@learner-long-life
Created December 22, 2019 21:20
Show Gist options
  • Save learner-long-life/285d2e55f3818fad54072ca9f9f18f9a to your computer and use it in GitHub Desktop.
Save learner-long-life/285d2e55f3818fad54072ca9f9f18f9a to your computer and use it in GitHub Desktop.
mocha/Javascript tests to answer this Stackoverflow question https://ethereum.stackexchange.com/q/78424/4670
const validatedResult = await cxResult.minedTx(
cxResult.ace.validateProof,
[ JOIN_SPLIT_PROOF, cxResult.unlabeled.transfererAddress, cxResult.unlabeled.jsProofData ]
)
await( validatedResult['0'], 'ace.validateProof succeeds for second time with sender address' )
expect (
cxResult.minedTx(
cxResult.ace.validateProof,
[ JOIN_SPLIT_PROOF, cxResult.unlabeled.senderAddress, cxResult.unlabeled.jsProofData ]
)
).to.be.rejectedWith(Error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment