The description of each tests (i.e. the text in the describe, context and it blocks) is a bit inconsistent, we should move towards a more standard structure.
I suggest:
contract()
describe(<feature/function>)
context(<context (!), e.g: once deployed, in refund period, when disabled, etc>)
it(<verb in present simple, e.g. 'accepts payments', 'allows owner to transfer ownership' // avoid using 'should do x', go for 'does x' instead>)
- Describe what you're testing, not what you're trying to prove: e.g. if testing a transaction fails from a non-owner account, write 'rejects non owners', instead of 'requires an owner account'.
- Use the terms 'null address' for address 0, 'zero-valued' for txs that don't transfer ether, and 'null [role]' for a role assigned to the null address (e.g. 'allows setting a null owner')
This will allow us to write test chains that read very naturally, e.g.
PausableToken transfer when paused reverts
The description of each tests (i.e. the text in the
describe,contextanditblocks) is a bit inconsistent, we should move towards a more standard structure.I suggest:
contract()describe(<feature/function>)context(<context (!), e.g: once deployed, in refund period, when disabled, etc>)it(<verb in present simple, e.g. 'accepts payments', 'allows owner to transfer ownership' // avoid using 'should do x', go for 'does x' instead>)This will allow us to write test chains that read very naturally, e.g.
PausableToken transfer when paused reverts