Run before,afterAlls as 'eachs' when specifying runnablesToRun
- Fix bug where beforeAlls were being mutated in Suite#execute - When Env.execute() receives a list of runnables, beforeAlls and afterAlls are collected as beforeEachs and afterEachs. This allows runnables to be specified in any order, regardless of if any of them have before/afterAlls. - Spec constructor takes a single function that returns both before and afters, instead of two functions. This breaks the current interface for constructing a Spec. [#73742528]
This commit is contained in:
committed by
Greg Cobb and Tim Jarratt
parent
61bf9ac7d7
commit
b984ff2fa6
@@ -91,11 +91,8 @@ describe("Spec", function() {
|
||||
}) },
|
||||
spec = new j$.Spec({
|
||||
queueableFn: queueableFn,
|
||||
beforeFns: function() {
|
||||
return [before]
|
||||
},
|
||||
afterFns: function() {
|
||||
return [after]
|
||||
beforeAndAfterFns: function() {
|
||||
return {befores: [before], afters: [after]}
|
||||
},
|
||||
queueRunnerFactory: fakeQueueRunner
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user