rooibos-roku 5.1.1 → 5.2.2

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.
@@ -1121,23 +1121,26 @@ namespace rooibos
1121
1121
 
1122
1122
  end function
1123
1123
 
1124
- function assertClass(value, typeStr, msg = "") as dynamic
1124
+ function assertClass(value, func, msg = "") as dynamic
1125
1125
  if m.currentResult.isFail
1126
1126
  return false
1127
1127
  end if
1128
+ if rooibos.Common.isFunction(func)
1129
+ func = func.toStr().mid(10).replace("_", ".")
1130
+ end if
1128
1131
  try
1129
1132
  if not Rooibos.Common.isAssociativeArray(value)
1130
1133
  if msg = ""
1131
1134
  expr_as_string = Rooibos.Common.asString(value)
1132
- msg = expr_as_string + " was not an aa, so could not match Class " + typeStr
1135
+ msg = expr_as_string + " was not an aa, so could not match Class " + func
1133
1136
  end if
1134
1137
  m.currentResult.fail(msg, m.currentAssertLineNumber)
1135
1138
  return false
1136
1139
  end if
1137
- className = `${value.__classname}`
1138
- if className <> typeStr
1140
+ className = lCase(`${value.__classname}`)
1141
+ if className <> lCase(func)
1139
1142
  if msg = ""
1140
- msg = `Expected class: ${typeStr} got ${className}`
1143
+ msg = `Expected class: ${func} got ${className}`
1141
1144
  end if
1142
1145
  m.currentResult.fail(msg, m.currentAssertLineNumber)
1143
1146
  return false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rooibos-roku",
3
- "version": "5.1.1",
3
+ "version": "5.2.2",
4
4
  "description": "simple, flexible, fun brightscript test framework for roku scenegraph apps - roku brighterscript plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "@types/node": "^17.0.29",
27
27
  "@typescript-eslint/eslint-plugin": "^4.4.1",
28
28
  "@typescript-eslint/parser": "^4.4.1",
29
- "brighterscript": "^0.50.1",
29
+ "brighterscript": "^0.52.1",
30
30
  "chai": "^4.2.0",
31
31
  "chai-subset": "^1.6.0",
32
32
  "coveralls": "^3.0.0",
@@ -42,9 +42,6 @@
42
42
  "typescript": "^3.8.3",
43
43
  "undent": "^0.1.0"
44
44
  },
45
- "peerDependencies": {
46
- "brighterscript": "^0.50.1"
47
- },
48
45
  "scripts": {
49
46
  "preversion": "npm run build && npm run lint && npm run test",
50
47
  "clean": "rm -rf ./dist && mkdir dist",