-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(TestRunner): Addresses issue that prevented node tests from corre…
…ctly running
- Loading branch information
1 parent
3a34516
commit c6aec59
Showing
2 changed files
with
41 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
namespace Rooibos | ||
' /** | ||
' * @memberof module:TestRunner | ||
' * @name Rooibos_RunNodeTests | ||
' * @function | ||
' * @instance | ||
' * @description interface hook for exeucting tests on nodes. This method is for internal use only. Only the Rooibos framework should invoke this method | ||
' * @param {Dynamic} args - associated array, containing all the information required to execute the tests. | ||
' * @returns {Object} test stats object, for merging into main test stats | ||
' */ | ||
function RunNodeTests(args) as object | ||
? " RUNNING NODE TESTS" | ||
totalStatObj = RBS_STATS.CreateTotalStatistic() | ||
|
||
Rooibos.TestRunner.RunItGroups(args.metaTestSuite, totalStatObj, args.testUtilsDecoratorMethodName, args.config, args.runtimeConfig, m) | ||
return totalStatObj | ||
end function | ||
|
||
' /** | ||
' * @memberof module:TestRunner | ||
' * @name CreateTestNode | ||
' * @function | ||
' * @instance | ||
' * @description interface hook for correctly creating nodes that get tested. This ensures they are in the correct scope. | ||
' * This method must be defined in your tests scene xml. | ||
' * @param {String} nodeType - name of node to create. The framework will pass this in as required | ||
' * @returns {Object} the required node, or invalid if it could not be invoked. | ||
' */ | ||
function CreateTestNode(nodeType) as object | ||
node = createObject("roSGNode", nodeType) | ||
|
||
if (type(node) = "roSGNode" and node.subType() = nodeType) | ||
m.top.AppendChild(node) | ||
return node | ||
else | ||
? " Error creating test node of type " ; nodeType | ||
return invalid | ||
end if | ||
end function | ||
|
||
end namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters