diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 0b6964b7..d180c032 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -2208,6 +2208,7 @@ getJasmineRequireObj().TreeProcessor = function() { queueRunnerFactory({ queueableFns: childFns, + userContext: tree.sharedUserContext(), onException: function() { tree.onException.apply(tree, arguments); }, diff --git a/spec/core/TreeProcessorSpec.js b/spec/core/TreeProcessorSpec.js index 28c4dde7..b6c790ae 100644 --- a/spec/core/TreeProcessorSpec.js +++ b/spec/core/TreeProcessorSpec.js @@ -202,7 +202,7 @@ describe("TreeProcessor", function() { it("runs a single leaf", function() { var leaf = new Leaf(), - node = new Node({ children: [leaf] }), + node = new Node({ children: [leaf], userContext: { root: 'context' } }), queueRunner = jasmine.createSpy('queueRunner'), processor = new j$.TreeProcessor({ tree: node, runnableIds: [leaf.id], queueRunnerFactory: queueRunner }), treeComplete = jasmine.createSpy('treeComplete'); @@ -212,6 +212,7 @@ describe("TreeProcessor", function() { expect(queueRunner).toHaveBeenCalledWith({ onComplete: treeComplete, onException: jasmine.any(Function), + userContext: { root: 'context' }, queueableFns: [{ fn: jasmine.any(Function) }] }); @@ -222,7 +223,7 @@ describe("TreeProcessor", function() { it("runs a node with no children", function() { var node = new Node({ userContext: { node: 'context' } }), - root = new Node({ children: [node] }), + root = new Node({ children: [node], userContext: { root: 'context' } }), nodeStart = jasmine.createSpy('nodeStart'), nodeComplete = jasmine.createSpy('nodeComplete'), queueRunner = jasmine.createSpy('queueRunner'), @@ -241,6 +242,7 @@ describe("TreeProcessor", function() { expect(queueRunner).toHaveBeenCalledWith({ onComplete: treeComplete, onException: jasmine.any(Function), + userContext: { root: 'context' }, queueableFns: [{ fn: jasmine.any(Function) }] }); diff --git a/src/core/TreeProcessor.js b/src/core/TreeProcessor.js index 275cb6aa..654c47a0 100644 --- a/src/core/TreeProcessor.js +++ b/src/core/TreeProcessor.js @@ -29,6 +29,7 @@ getJasmineRequireObj().TreeProcessor = function() { queueRunnerFactory({ queueableFns: childFns, + userContext: tree.sharedUserContext(), onException: function() { tree.onException.apply(tree, arguments); },