rooibos-roku 5.2.2 → 5.3.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.
|
@@ -1874,10 +1874,10 @@ namespace rooibos
|
|
|
1874
1874
|
expectedArgsValues = []
|
|
1875
1875
|
lineNumber = m.currentAssertLineNumber
|
|
1876
1876
|
hasArgs = Rooibos.Common.isArray(expectedArgs)
|
|
1877
|
+
defaultValue = m.ignoreValue
|
|
1877
1878
|
if hasArgs
|
|
1878
1879
|
defaultValue = m.invalidValue
|
|
1879
1880
|
else
|
|
1880
|
-
defaultValue = m.ignoreValue
|
|
1881
1881
|
expectedArgs = []
|
|
1882
1882
|
end if
|
|
1883
1883
|
lineNumbers = [lineNumber]
|
|
@@ -803,26 +803,26 @@ namespace rooibos.Common
|
|
|
803
803
|
contentName = parts[i]
|
|
804
804
|
i++
|
|
805
805
|
if type(content) <> "roAssociativeArray"
|
|
806
|
-
content = {id: contentName}
|
|
806
|
+
content = { id: contentName }
|
|
807
807
|
end if
|
|
808
808
|
part = content
|
|
809
809
|
while i < numParts and part <> invalid
|
|
810
810
|
isIndexNumber = parts[i] = "0" or (parts[i].toInt() <> 0 and parts[i].toInt().toStr() = parts[i])
|
|
811
|
+
index = invalid
|
|
811
812
|
if isIndexNumber
|
|
812
813
|
index = parts[i].toInt()
|
|
813
814
|
else
|
|
814
815
|
index = parts[i]
|
|
815
816
|
end if
|
|
816
817
|
|
|
818
|
+
nextPart = invalid
|
|
817
819
|
if rooibos.Common.isArray(part) and isIndexNumber
|
|
818
820
|
nextPart = part[index]
|
|
819
821
|
else if type(part) = "roAssociativeArray" and not isIndexNumber
|
|
820
822
|
nextPart = part[index]
|
|
821
|
-
else
|
|
822
|
-
nextPart = invalid
|
|
823
823
|
end if
|
|
824
824
|
|
|
825
|
-
if nextPart = invalid or type(nextPart) <>
|
|
825
|
+
if nextPart = invalid or type(nextPart) <> "roAssociativeArray"
|
|
826
826
|
if (not isIndexNumber and type(part) = "roAssociativeArray") or (isIndexNumber and (rooibos.Common.isArray(part)))
|
|
827
827
|
nextPart = { id: index }
|
|
828
828
|
part[index] = nextPart
|
|
@@ -4,6 +4,7 @@ namespace rooibos
|
|
|
4
4
|
private lineWidth = 60
|
|
5
5
|
|
|
6
6
|
function new(testRunner)
|
|
7
|
+
'bs:disable-next-line
|
|
7
8
|
super(testRunner)
|
|
8
9
|
if m.config.lineWidth <> invalid
|
|
9
10
|
m.lineWidth = m.config.lineWidth
|
|
@@ -48,7 +49,7 @@ namespace rooibos
|
|
|
48
49
|
m.printLine()
|
|
49
50
|
m.printLine()
|
|
50
51
|
end if
|
|
51
|
-
|
|
52
|
+
overrallResult = ""
|
|
52
53
|
if m.allStats.hasFailures
|
|
53
54
|
overrallResult = "Fail"
|
|
54
55
|
else
|
|
@@ -82,6 +83,7 @@ namespace rooibos
|
|
|
82
83
|
testLocationLine = StrI(test.lineNumber).trim()
|
|
83
84
|
|
|
84
85
|
locationLine = invalid
|
|
86
|
+
testChar = ""
|
|
85
87
|
if test.result.isCrash
|
|
86
88
|
testChar = "|"
|
|
87
89
|
locationLine = StrI(test.lineNumber).trim()
|
|
@@ -95,10 +97,9 @@ namespace rooibos
|
|
|
95
97
|
|
|
96
98
|
testLocationText = "file://" + test.testSuite.filePath.trim() + ":" + testLocationLine
|
|
97
99
|
|
|
100
|
+
timeText = ""
|
|
98
101
|
if m.config.printTestTimes = true
|
|
99
102
|
timeText = " (" + stri(test.result.time).trim() + "ms)"
|
|
100
|
-
else
|
|
101
|
-
timeText = ""
|
|
102
103
|
end if
|
|
103
104
|
|
|
104
105
|
insetText = ""
|
|
@@ -119,6 +120,7 @@ namespace rooibos
|
|
|
119
120
|
if test.isParamTest = true
|
|
120
121
|
insetText = " "
|
|
121
122
|
|
|
123
|
+
rawParams = invalid
|
|
122
124
|
if type(test.rawParams) = "roAssociativeArray"
|
|
123
125
|
rawParams = {}
|
|
124
126
|
for each key in test.rawParams
|
package/dist/plugin.js
CHANGED
|
@@ -72,7 +72,6 @@ class RooibosPlugin {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
beforePublish() { }
|
|
76
75
|
beforeProgramTranspile(program, entries, editor) {
|
|
77
76
|
this.session.addTestRunnerMetadata(editor);
|
|
78
77
|
this.session.addLaunchHook(editor);
|
|
@@ -99,7 +98,7 @@ class RooibosPlugin {
|
|
|
99
98
|
afterProgramTranspile(program, entries, editor) {
|
|
100
99
|
this.session.removeRooibosMain();
|
|
101
100
|
}
|
|
102
|
-
afterProgramValidate() {
|
|
101
|
+
afterProgramValidate(program) {
|
|
103
102
|
// console.log('bpv');
|
|
104
103
|
this.session.updateSessionStats();
|
|
105
104
|
for (let testSuite of [...this.session.sessionInfo.testSuites.values()]) {
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":";;;AAUA,mDAEwB;AACxB,iEAA8D;AAC9D,+EAA4E;AAC5E,2DAAwD;AAExD,uCAAuC;AAEvC,MAAa,aAAa;IAA1B;QAEW,SAAI,GAAG,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":";;;AAUA,mDAEwB;AACxB,iEAA8D;AAC9D,+EAA4E;AAC5E,2DAAwD;AAExD,uCAAuC;AAEvC,MAAa,aAAa;IAA1B;QAEW,SAAI,GAAG,eAAe,CAAC;IAkIlC,CAAC;IA3HG,mBAAmB,CAAC,OAAuB;QACvC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QAExB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAE,OAAO,CAAC,OAAe,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;QAErE,IAAI,CAAC,WAAW,GAAG,IAAI,yBAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,CA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IAAI,CAAC;SACf;aAAM;YACH,KAAK,IAAI,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE;gBAC3C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE;oBACvC,OAAO,KAAK,CAAC;iBAChB;aACJ;SACJ;QACD,2CAA2C;QAC3C,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AApID,sCAoIC;AAED,kBAAe,GAAG,EAAE;IAChB,OAAO,IAAI,aAAa,EAAE,CAAC;AAC/B,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rooibos-roku",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "simple, flexible, fun brightscript test framework for roku scenegraph apps - roku brighterscript plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"source-map": "^0.7.3",
|
|
18
|
+
"undent": "^0.1.0",
|
|
18
19
|
"vscode-languageserver": "~6.1.1",
|
|
19
20
|
"vscode-languageserver-protocol": "~3.15.3"
|
|
20
21
|
},
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
"@types/node": "^17.0.29",
|
|
27
28
|
"@typescript-eslint/eslint-plugin": "^4.4.1",
|
|
28
29
|
"@typescript-eslint/parser": "^4.4.1",
|
|
29
|
-
"brighterscript": "^0.
|
|
30
|
+
"brighterscript": "^0.59.0",
|
|
30
31
|
"chai": "^4.2.0",
|
|
31
32
|
"chai-subset": "^1.6.0",
|
|
32
33
|
"coveralls": "^3.0.0",
|
|
@@ -39,8 +40,7 @@
|
|
|
39
40
|
"source-map-support": "^0.5.13",
|
|
40
41
|
"trim-whitespace": "^1.3.3",
|
|
41
42
|
"ts-node": "^9.0.0",
|
|
42
|
-
"typescript": "^3.8.3"
|
|
43
|
-
"undent": "^0.1.0"
|
|
43
|
+
"typescript": "^3.8.3"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"preversion": "npm run build && npm run lint && npm run test",
|
|
@@ -110,4 +110,4 @@
|
|
|
110
110
|
"ts"
|
|
111
111
|
]
|
|
112
112
|
}
|
|
113
|
-
}
|
|
113
|
+
}
|