rooibos-roku 4.5.2 → 4.5.3

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.
package/CHANGELOG.md CHANGED
@@ -4,9 +4,23 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
- #### [v4.5.1](https://github.com/georgejecook/rooibos/compare/4.5.0...v4.5.1)
7
+ #### [v4.5.3](https://github.com/georgejecook/rooibos/compare/4.5.2...v4.5.3)
8
+
9
+ - fix: fixes equals failures [`#144`](https://github.com/georgejecook/rooibos/pull/144)
10
+ - bump [`2864c66`](https://github.com/georgejecook/rooibos/commit/2864c66adac94e3c2fa7fa1d565493617dcac08d)
11
+
12
+ #### [4.5.2](https://github.com/georgejecook/rooibos/compare/4.5.1...4.5.2)
13
+
14
+ > 6 January 2022
15
+
16
+ - improves stringand float comparisons and assert not invalid message [`#142`](https://github.com/georgejecook/rooibos/pull/142)
17
+
18
+ #### [4.5.1](https://github.com/georgejecook/rooibos/compare/4.5.0...4.5.1)
19
+
20
+ > 5 January 2022
8
21
 
9
22
  - Feat/add home press flag [`#140`](https://github.com/georgejecook/rooibos/pull/140)
23
+ - bump [`ef9d022`](https://github.com/georgejecook/rooibos/commit/ef9d022bb628217275486a08de170b609b2374c1)
10
24
 
11
25
  #### [4.5.0](https://github.com/georgejecook/rooibos/compare/4.4.2...4.5.0)
12
26
 
@@ -576,6 +576,33 @@ namespace rooibos.Common
576
576
  end function
577
577
 
578
578
 
579
+ function getSafeType(v)
580
+ t = type(v)
581
+ if t = "<uninitialized>" or t = ""
582
+ return invalid
583
+ else if t = "roString"
584
+ return "String"
585
+ else if t = "roInteger"
586
+ return "Integer"
587
+ else if t = "roBoolean"
588
+ return "Boolean"
589
+ else if t = "roBool"
590
+ return "Boolean"
591
+ else if t = "roInt"
592
+ return "Integer"
593
+ else if t = "roList"
594
+ return "List"
595
+ else if t = "roFloat"
596
+ return "Float"
597
+ else if t = "roDouble"
598
+ return "Double"
599
+ else if t = "roInvalid"
600
+ return "Invalid"
601
+ else
602
+ return t
603
+ end if
604
+ end function
605
+
579
606
  ' /**
580
607
  ' * @memberof module:CommonUtils
581
608
  ' * @name EqValues
@@ -48,10 +48,10 @@ class TestGroup extends TestSuite_1.TestBlock {
48
48
  let dge = ce.callee;
49
49
  let assertRegex = /(?:fail|assert(?:[a-z0-9]*)|expect(?:[a-z0-9]*))/i;
50
50
  if (dge && assertRegex.test(dge.name.text)) {
51
- return new RawCodeStatement_1.RawCodeStatement(`
52
- m.currentAssertLineNumber = ${ce.range.start.line}
53
- ${ce.transpile(transpileState).join('')}
54
- ${noEarlyExit ? '' : 'if m.currentResult.isFail then return invalid'}
51
+ return new RawCodeStatement_1.RawCodeStatement(`
52
+ m.currentAssertLineNumber = ${ce.range.start.line}
53
+ ${ce.transpile(transpileState).join('')}
54
+ ${noEarlyExit ? '' : 'if m.currentResult.isFail then return invalid'}
55
55
  `, this.file, ce.range);
56
56
  }
57
57
  }
@@ -67,18 +67,18 @@ class TestGroup extends TestSuite_1.TestBlock {
67
67
  }
68
68
  asText() {
69
69
  let testCaseText = [...this.testCases.values()].filter((tc) => tc.isIncluded).map((tc) => tc.asText());
70
- return `
71
- {
72
- name: ${Utils_1.sanitizeBsJsonString(this.name)}
73
- isSolo: ${this.isSolo}
74
- isIgnored: ${this.isIgnored}
75
- filename: "${this.pkgPath}"
76
- lineNumber: "${this.annotation.annotation.range.start.line}"
77
- setupFunctionName: "${this.setupFunctionName || ''}"
78
- tearDownFunctionName: "${this.tearDownFunctionName || ''}"
79
- beforeEachFunctionName: "${this.beforeEachFunctionName || ''}"
80
- afterEachFunctionName: "${this.afterEachFunctionName || ''}"
81
- testCases: [${testCaseText.join(',\n')}]
70
+ return `
71
+ {
72
+ name: ${Utils_1.sanitizeBsJsonString(this.name)}
73
+ isSolo: ${this.isSolo}
74
+ isIgnored: ${this.isIgnored}
75
+ filename: "${this.pkgPath}"
76
+ lineNumber: "${this.annotation.annotation.range.start.line}"
77
+ setupFunctionName: "${this.setupFunctionName || ''}"
78
+ tearDownFunctionName: "${this.tearDownFunctionName || ''}"
79
+ beforeEachFunctionName: "${this.beforeEachFunctionName || ''}"
80
+ afterEachFunctionName: "${this.afterEachFunctionName || ''}"
81
+ testCases: [${testCaseText.join(',\n')}]
82
82
  }`;
83
83
  }
84
84
  }
@@ -78,10 +78,10 @@ function changeFunctionBody(statement, source) {
78
78
  }
79
79
  exports.changeFunctionBody = changeFunctionBody;
80
80
  function addOverriddenMethod(file, annotation, target, name, source) {
81
- let funcSource = `
82
- function ${name}()
83
- ${source}
84
- end function
81
+ let funcSource = `
82
+ function ${name}()
83
+ ${source}
84
+ end function
85
85
  `;
86
86
  let tokens = brighterscript_1.Lexer.scan(funcSource).tokens;
87
87
  let { statements, diagnostics } = brighterscript_1.Parser.parse(tokens, { mode: brighterscript_1.ParseMode.BrighterScript });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rooibos-roku",
3
- "version": "4.5.2",
3
+ "version": "4.5.3",
4
4
  "description": "simple, flexible, fun brightscript test framework for roku scenegraph apps - roku brighterscript plugin",
5
5
  "repository": {
6
6
  "type": "git",