rooibos-roku 5.3.5 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -42,8 +42,8 @@ namespace rooibos
|
|
|
42
42
|
end function
|
|
43
43
|
|
|
44
44
|
function run()
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
rooibosTimer = createObject("roTimespan")
|
|
46
|
+
rooibosTimer.mark()
|
|
47
47
|
|
|
48
48
|
if m.isParamTest
|
|
49
49
|
m.runParamsTest()
|
|
@@ -51,7 +51,7 @@ namespace rooibos
|
|
|
51
51
|
m.testSuite[m.funcName]()
|
|
52
52
|
end if
|
|
53
53
|
|
|
54
|
-
m.result.time =
|
|
54
|
+
m.result.time = rooibosTimer.totalMilliseconds()
|
|
55
55
|
|
|
56
56
|
end function
|
|
57
57
|
|
|
@@ -44,8 +44,8 @@ namespace rooibos
|
|
|
44
44
|
' */
|
|
45
45
|
public function run()
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
rooibosTimer = createObject("roTimespan")
|
|
48
|
+
rooibosTimer.mark()
|
|
49
49
|
suiteNames = m.runtimeConfig.getAllTestSuitesNames()
|
|
50
50
|
isFailed = false
|
|
51
51
|
failedText = ""
|
|
@@ -95,7 +95,7 @@ namespace rooibos
|
|
|
95
95
|
m.nodeContext.global.testsScene.failedText = "No tests were found"
|
|
96
96
|
end if
|
|
97
97
|
|
|
98
|
-
m.stats.time =
|
|
98
|
+
m.stats.time = rooibosTimer.totalMilliseconds()
|
|
99
99
|
|
|
100
100
|
m.testReporter.reportResults(m.stats)
|
|
101
101
|
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
namespace rooibos.utils
|
|
2
|
-
class MockNode
|
|
3
|
-
public id
|
|
4
|
-
public name
|
|
5
|
-
|
|
6
|
-
public createdNodes = []
|
|
7
|
-
public createdChildren = []
|
|
8
|
-
public children = []
|
|
9
|
-
public _subType = "Node"
|
|
10
|
-
public _parent
|
|
11
|
-
|
|
12
|
-
function new(id = "", subType = "Node")
|
|
13
|
-
m.id = id
|
|
14
|
-
m._subType = subType
|
|
15
|
-
end function
|
|
16
|
-
|
|
17
|
-
function subType()
|
|
18
|
-
return m._subType
|
|
19
|
-
end function
|
|
20
|
-
|
|
21
|
-
function createObject(nodeType)
|
|
22
|
-
node = new rooibos.utils.MockNode("", nodeType)
|
|
23
|
-
m.createdNodes.push(node)
|
|
24
|
-
return node
|
|
25
|
-
end function
|
|
26
|
-
|
|
27
|
-
function createChild(nodeType)
|
|
28
|
-
node = new rooibos.utils.MockNode("", nodeType)
|
|
29
|
-
m.createdChildren.push(node)
|
|
30
|
-
return node
|
|
31
|
-
end function
|
|
32
|
-
|
|
33
|
-
function appendChild(child)
|
|
34
|
-
m.children.push(child)
|
|
35
|
-
end function
|
|
36
|
-
function getParent()
|
|
37
|
-
if m._parent = invalid
|
|
38
|
-
m._parent = new rooibos.utils.MockNode("_generated_parent")
|
|
39
|
-
end if
|
|
40
|
-
return m._parent
|
|
41
|
-
end function
|
|
42
|
-
|
|
43
|
-
function addFields(fields)
|
|
44
|
-
m.append(fields)
|
|
45
|
-
end function
|
|
46
|
-
function setField(field, value)
|
|
47
|
-
m[field] = value
|
|
48
|
-
end function
|
|
49
|
-
function setFields(fields)
|
|
50
|
-
m.append(fields)
|
|
51
|
-
end function
|
|
52
|
-
function observeField(field, callback)
|
|
53
|
-
end function
|
|
54
|
-
function getChildren(offset, count)
|
|
55
|
-
return m.children
|
|
56
|
-
end function
|
|
57
|
-
function removeChildren(children)
|
|
58
|
-
|
|
59
|
-
end function
|
|
60
|
-
function observeFieldScoped(field, callback)
|
|
61
|
-
end function
|
|
62
|
-
end class
|
|
1
|
+
namespace rooibos.utils
|
|
2
|
+
class MockNode
|
|
3
|
+
public id
|
|
4
|
+
public name
|
|
5
|
+
|
|
6
|
+
public createdNodes = []
|
|
7
|
+
public createdChildren = []
|
|
8
|
+
public children = []
|
|
9
|
+
public _subType = "Node"
|
|
10
|
+
public _parent
|
|
11
|
+
|
|
12
|
+
function new(id = "", subType = "Node")
|
|
13
|
+
m.id = id
|
|
14
|
+
m._subType = subType
|
|
15
|
+
end function
|
|
16
|
+
|
|
17
|
+
function subType()
|
|
18
|
+
return m._subType
|
|
19
|
+
end function
|
|
20
|
+
|
|
21
|
+
function createObject(nodeType)
|
|
22
|
+
node = new rooibos.utils.MockNode("", nodeType)
|
|
23
|
+
m.createdNodes.push(node)
|
|
24
|
+
return node
|
|
25
|
+
end function
|
|
26
|
+
|
|
27
|
+
function createChild(nodeType)
|
|
28
|
+
node = new rooibos.utils.MockNode("", nodeType)
|
|
29
|
+
m.createdChildren.push(node)
|
|
30
|
+
return node
|
|
31
|
+
end function
|
|
32
|
+
|
|
33
|
+
function appendChild(child)
|
|
34
|
+
m.children.push(child)
|
|
35
|
+
end function
|
|
36
|
+
function getParent()
|
|
37
|
+
if m._parent = invalid
|
|
38
|
+
m._parent = new rooibos.utils.MockNode("_generated_parent")
|
|
39
|
+
end if
|
|
40
|
+
return m._parent
|
|
41
|
+
end function
|
|
42
|
+
|
|
43
|
+
function addFields(fields)
|
|
44
|
+
m.append(fields)
|
|
45
|
+
end function
|
|
46
|
+
function setField(field, value)
|
|
47
|
+
m[field] = value
|
|
48
|
+
end function
|
|
49
|
+
function setFields(fields)
|
|
50
|
+
m.append(fields)
|
|
51
|
+
end function
|
|
52
|
+
function observeField(field, callback)
|
|
53
|
+
end function
|
|
54
|
+
function getChildren(offset, count)
|
|
55
|
+
return m.children
|
|
56
|
+
end function
|
|
57
|
+
function removeChildren(children)
|
|
58
|
+
|
|
59
|
+
end function
|
|
60
|
+
function observeFieldScoped(field, callback)
|
|
61
|
+
end function
|
|
62
|
+
end class
|
|
63
63
|
end namespace
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rooibos-roku",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "simple, flexible, fun brightscript test framework for roku scenegraph apps - roku brighterscript plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@types/node": "^17.0.29",
|
|
28
28
|
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
29
29
|
"@typescript-eslint/parser": "^5.27.0",
|
|
30
|
-
"brighterscript": "0.61.
|
|
30
|
+
"brighterscript": "^0.61.3",
|
|
31
31
|
"chai": "^4.2.0",
|
|
32
32
|
"chai-subset": "^1.6.0",
|
|
33
33
|
"coveralls": "^3.0.0",
|