Allow use without creating globals

* Fixes #1235
This commit is contained in:
Steve Gravrock
2021-11-29 18:49:05 -08:00
parent 5942654856
commit 42e6c45efa
15 changed files with 88 additions and 37 deletions

View File

@@ -513,20 +513,20 @@ describe('TreeProcessor', function() {
it('runs afterAlls for a node with children', function() {
var leaf = new Leaf(),
afterAllFns = [{ fn: 'afterAll1' }, { fn: 'afterAll2' }];
(node = new Node({
children: [leaf],
afterAllFns
})),
(root = new Node({ children: [node] })),
(queueRunner = jasmine.createSpy('queueRunner')),
(processor = new jasmineUnderTest.TreeProcessor({
afterAllFns = [{ fn: 'afterAll1' }, { fn: 'afterAll2' }],
node = new Node({
children: [leaf],
afterAllFns
}),
root = new Node({ children: [node] }),
queueRunner = jasmine.createSpy('queueRunner'),
processor = new jasmineUnderTest.TreeProcessor({
tree: root,
runnableIds: [node.id],
queueRunnerFactory: queueRunner
})),
(treeComplete = jasmine.createSpy('treeComplete')),
(nodeDone = jasmine.createSpy('nodeDone'));
}),
treeComplete = jasmine.createSpy('treeComplete'),
nodeDone = jasmine.createSpy('nodeDone');
processor.execute(treeComplete);
var queueableFns = queueRunner.calls.mostRecent().args[0].queueableFns;