You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `specWith()` and `taskWith()` helpers inadvertently mutate
`defaultChangesetSpec` and `defaultTask` fields, rather than isolating
their changes to just the returned spec and task, respectively.
Practically speaking, this means that all tests have the same spec and
task based on the last element in the `tests` slice, which means that
all the test cases end up testing the same, identical thing.
Instead, we must deep copy the spec and task before invoking the mutator
function. I've chosen to pull in a third party package (specifically,
copystructure) for this: naïvely using JSON to marshal and unmarshal
doesn't work because most of the interesting task fields are excluded
when marshalled to JSON.
0 commit comments