Closed marsrobertson closed 5 years ago
Redundancy and repeating in tests is fine. Tests should be the less abstact possible.
The code is repeated so many times.
Is each of the functions exactly the same?
It's more lines, more things to analyze.
Yeah, it makes it harder to miss something when writing it. You don't need to analyse tests, if you want more security you can make other ones as tests handles redundancy well.
https://github.com/kleros/kleros-interaction/blob/master/test/multiple-arbitrable-transaction.js
Repeated 26 times:
const lastTransaction = await getLastTransaction
This surely can be extracted as an individual function?
Or use
beforeEach
block?