-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
I encountered a situation today where I want to group expectations for a range of inputs to a function. Some inputs should give a return value a
, other inputs should give return value b
. I thought I could group these assertions with an Invariant
but since I lack a Then
the tests are never executed.
Pseudo suite:
describe 'I want the same result for different inputs', ->
When -> @subject @input
Invariant -> expect(@result).toBe 'the same'
describe '- input foo', ->
Given -> @input = foo
describe '- input bar', ->
Given -> @input = bar
Would it be possible to make an Invariant
enough to run the code inside all affected describe
blocks?
Metadata
Metadata
Assignees
Labels
No labels