diff --git a/.vscode/brighterscript.code-snippets b/.vscode/brighterscript.code-snippets new file mode 100644 index 00000000..73e48a95 --- /dev/null +++ b/.vscode/brighterscript.code-snippets @@ -0,0 +1,622 @@ +{ + //rooibos + "rooibos beforeEach": { + "prefix": "beforeEach", + "body": [ + "@beforeEach", + "function ${2:namespace}_${3:itGroup}_beforeEach()", + "\t$0", + "end function" + ] + }, + "rooibos afterEach": { + "prefix": "afterEach", + "body": [ + "@afterEach", + "function ${2:namespace}_${3:itGroup}_afterEach()", + "\t$0", + "end function" + ] + }, + "rooibos setup": { + "prefix": "setup", + "body": [ + "@setup", + "function ${2:namespace}_setup()", + "\t$0", + "end function" + ] + }, + "rooibos tearDown": { + "prefix": "tearDown", + "body": [ + "@tearDown", + "function ${2:namespace}_tearDown()", + "\t$0", + "end function" + ] + }, + "rooibos ignore": { + "prefix": "ignore", + "body": ["@ignore ${1:reason}", "$0"] + }, + "rooibos only": { + "prefix": "only", + "body": ["@only", "$0"] + }, + "rooibos testSuite": { + "prefix": "suite", + "body": ["@suite(\"$1\")", "$0"] + }, + "rooibos testcase": { + "prefix": "it", + "body": ["@it(\"$1\")", "function _()", "\t$0", "end function"] + }, + "rooibos params": { + "prefix": "params", + "body": ["@params(${1:values})$0"] + }, + "rooibos it": { + "prefix": "describe", + "body": [ + "'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", + "@describe(\"${1:groupName}\")", + "'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", + "", + "$0" + ] + }, + "rooibos stub": { + "prefix": "stub", + "body": [ + "m.stub(${1:target}, \"${2:methodName}\", [${3:methodArgs}], ${4:result})", + "$0" + ] + }, + "rooibos mock": { + "prefix": "expect", + "body": [ + "${1:mockName} = m.mock(${2:target}, \"${3:methodName}\", ${4:expectedNumberOfcalls}, [${5:methodArgs}], ${6:result})", + "$0" + ] + }, + "rooibos expect": { + "prefix": "expect", + "body": [ + "m.expectOnce(${1:target}, \"${2:methodName}\", ${3:expectedNumberOfcalls}, [${4:methodArgs}], ${5:result})", + "$0" + ] + }, + "rooibos expectOnce": { + "prefix": "expectOnce", + "body": [ + "m.expectOnce(${1:target}, \"${2:methodName}\", [${3:methodArgs}], ${4:result})", + "$0" + ] + }, + "rooibos expectCallfunc": { + "prefix": "expectCallfunc", + "body": [ + "m.expectOnce(${1:target}, \"callFunc\", [\"${2:methodName}\", ${3:methodArgs}], ${4:result})", + "$0" + ] + }, + "rooibos expectObserveNodeField": { + "prefix": "eonf", + "body": [ + "m.expectOnce(${1:target}, \"observeNodeField\", [${2:node},\"${3:fieldName}\", m.${4:callback}])", + "$0" + ] + }, + "rooibos expectUnObserveNodeField": { + "prefix": "eunf", + "body": [ + "m.expectOnce(${1:target}, \"unobserveNodeField\", [${2:node},\"${:fieldName}\", m.${4:callback}])", + "$0" + ] + }, + "rooibos expectObjectOnce": { + "prefix": "expectObjectOnce", + "body": [ + "${1:name} = { \"id\" : \"${1:name}\" }", + "m.expectOnce(${2:target}, \"${3:methodName}\", [${4:methodArgs}], ${1:name})", + "$0" + ] + }, + "rooibos expectGetInstance": { + "prefix": "expectGetInstance", + "body": [ + "${1:name} = { \"id\" : \"${1:name}\" }", + "m.expectOnce(${2:target}, \"getInstance\", [\"${3:instanceName}\"], ${1:name})", + "$0" + ] + }, + "rooibos expectGetClassInstance": { + "prefix": "expectGetClassInstance", + "body": [ + "${1:name} = { \"id\" : \"${1:name}\" }", + "m.expectOnce(${2:target}, \"getClassInstance\", [\"${3:instanceName}\"], ${1:name})", + "$0" + ] + }, + "rooibos expectExpectOnce": { + "prefix": "expectExpect", + "body": [ + "${1:name} = { \"id\" : \"${1:name}\" }", + "m.expectOnce(${2:target}, \"${3:methodName}\", [${4:methodArgs}], ${1:name})", + "m.expectOnce(${1:name}, \"${5:methodName}\", [${6:methodArgs}], ${7:name})", + "$0" + ] + }, + "rooibos expectNone": { + "prefix": "expectNone", + "body": ["m.expectNone(${1:target}, \"${2:methodName}\")", "$0"] + }, + "rooibos assertFalse": { + "prefix": "assertFalse", + "body": ["m.assertFalse(${1:value})", "$0"] + }, + "rooibos assertAsync": { + "prefix": "assertAsync", + "body": ["m.AssertAsyncField(${1:value}, $2{:fieldName})", "$0"] + }, + "rooibos assertTrue": { + "prefix": "assertTrue", + "body": ["m.assertTrue(${1:value})", "$0"] + }, + "rooibos assertEqual": { + "prefix": "assertEqual", + "body": ["m.assertEqual(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertLike": { + "prefix": "assertLike", + "body": ["m.assertLike(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertNotEqual": { + "prefix": "assertNotEqual", + "body": ["m.assertNotEqual(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertInvalid": { + "prefix": "assertInvalid", + "body": ["m.assertInvalid(${1:value})", "$0"] + }, + "rooibos assertNotInvalid": { + "prefix": "assertNotInvalid", + "body": ["m.assertNotInvalid(${1:value})", "$0"] + }, + "rooibos assertAAHasKey": { + "prefix": "assertAAHasKey", + "body": ["m.assertAAHasKey(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertAANotHasKey": { + "prefix": "assertAANotHasKey", + "body": ["m.assertAANotHasKey(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertAAHasKeys": { + "prefix": "assertAAHasKeys", + "body": ["m.assertAAHasKeys(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertAANotHasKeys": { + "prefix": "assertAANotHasKeys", + "body": ["m.assertAANotHasKeys(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertArrayContains": { + "prefix": "assertArrayContains", + "body": ["m.assertArrayContains(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertArrayNotContains": { + "prefix": "assertArrayNotContains", + "body": ["m.assertArrayNotContains(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertArrayContainsSubset": { + "prefix": "assertArrayContainsSubset", + "body": ["m.assertArrayContainsSubset(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertArrayContainsAAs": { + "prefix": "assertArrayContainsAAs", + "body": ["m.assertArrayContainsAAs(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertArrayNotContainsSubset": { + "prefix": "assertArrayNotContainsSubset", + "body": ["m.assertArrayNotContainsSubset(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertArrayCount": { + "prefix": "assertArrayCount", + "body": ["m.assertArrayCount(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertArrayNotCount": { + "prefix": "assertArrayNotCount", + "body": ["m.assertArrayNotCount(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertEmpty": { + "prefix": "assertEmpty", + "body": ["m.assertEmpty(${1:value})", "$0"] + }, + "rooibos assertNotEmpty": { + "prefix": "assertNotEmpty", + "body": ["m.assertNotEmpty(${1:value})", "$0"] + }, + "rooibos assertArrayContainsOnlyValuesOfType": { + "prefix": "assertArrayContainsOnlyValuesOfType", + "body": [ + "m.assertArrayContainsOnlyValuesOfType(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertType": { + "prefix": "assertType", + "body": ["m.assertType(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertSubType": { + "prefix": "assertSubType", + "body": ["m.assertSubType(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertNodeCount": { + "prefix": "assertNodeCount", + "body": ["m.assertNodeCount(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertNodeNotCount": { + "prefix": "assertNodeNotCount", + "body": ["m.assertNodeNotCount(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertNodeEmpty": { + "prefix": "assertNodeEmpty", + "body": ["m.assertNodeEmpty(${1:value})", "$0"] + }, + "rooibos assertNodeNotEmpty": { + "prefix": "assertNodeNotEmpty", + "body": ["m.assertNodeNotEmpty(${1:value})", "$0"] + }, + "rooibos assertNodeContains": { + "prefix": "assertNodeContains", + "body": ["m.assertNodeContains(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertNodeNotContains": { + "prefix": "assertNodeNotContains", + "body": ["m.assertNodeNotContains(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertNodeContainsFields": { + "prefix": "assertNodeContainsFields", + "body": ["m.assertNodeContainsFields(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertNodeNotContainsFields": { + "prefix": "assertNodeNotContainsFields", + "body": ["m.assertNodeNotContainsFields(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertAAContainsSubset": { + "prefix": "assertAAContainsSubset", + "body": ["m.assertAAContainsSubset(${1:value}, ${2:expected})", "$0"] + }, + "rooibos assertMocks": { + "prefix": "assertMocks", + "body": ["m.assertMocks(${1:value}, ${2:expected})", "$0"] + }, + + //stub objexts + "stubobject": { + "prefix": "so", + "body": ["${1:name} = { \"id\" : \"${1:name}\" }", "$0"] + }, + "stubaaobject": { + "prefix": "aso", + "body": ["${1:name}: { \"id\" : \"${1:name}\" }", "$0"] + }, + "stubiocobject": { + "prefix": "sioc", + "body": [ + "m.${1:name} = { \"id\" : \"${1:name}\" }", + "mioc.setInstance(\"${1:name}\", m.${1:name})", + "$0" + ] + }, + "mstubobject": { + "prefix": "mso", + "body": ["m.${1:name} = { \"id\" : \"${1:name}\" }", "$0"] + }, + + //keys + "isCapturingAnyKeyPress": { + "prefix": "isCapturingAnyKeyPress", + "body": [ + "private function isCapturingAnyKeyPress(key as string, press as boolean) as boolean", + "\treturn false", + "end function" + ] + }, + "onKeyPressDown": { + "prefix": "onKeyPressDown", + "body": [ + "private function onKeyPressDown() as boolean", + "\treturn false", + "end function" + ] + }, + "onKeyPressUp": { + "prefix": "onKeyPressUp", + "body": [ + "private function onKeyPressUp() as boolean", + "\treturn false", + "end function" + ] + }, + "onKeyPressLeft": { + "prefix": "onKeyPressLeft", + "body": [ + "private function onKeyPressLeft() as boolean", + "\treturn false", + "end function" + ] + }, + "onKeyPressRight": { + "prefix": "onKeyPressRight", + "body": [ + "private function onKeyPressRight() as boolean", + "\treturn false", + "end function" + ] + }, + "onKeyPressReplay": { + "prefix": "onKeyPressReplay", + "body": [ + "private function onKeyPressReplay() as boolean", + "\treturn false", + "end function" + ] + }, + "onKeyPressRewind": { + "prefix": "onKeyPressRewind", + "body": [ + "private function onKeyPressRewind() as boolean", + "\treturn false", + "end function" + ] + }, + "onKeyPressFastForward": { + "prefix": "onKeyPressFastForward", + "body": [ + "private function onKeyPressFastForward() as boolean", + "\treturn false", + "end function" + ] + }, + "onKeyPressBack": { + "prefix": "onKeyPressBack", + "body": [ + "private function onKeyPressBack() as boolean", + "\treturn false", + "end function" + ] + }, + "onKeyPressOptions": { + "prefix": "onKeyPressOptions", + "body": [ + "private function onKeyPressOptions() as boolean", + "\treturn false", + "end function" + ] + }, + "onKeyPressOK": { + "prefix": "onKeyPressOK", + "body": [ + "private function onKeyPressOK() as boolean", + "\treturn false", + "end function" + ] + }, + "onKeyPressPlay": { + "prefix": "onKeyPressPlay", + "body": [ + "private function onKeyPressPlay() as boolean", + "\treturn false", + "end function" + ] + }, + + //lifecycle + "onGainedFocus": { + "prefix": "onGainedFocus", + "body": [ + "private function onGainedFocus(isSelfFocused as boolean)", + "\tsuper.onGainedFocus(isSelfFocused)", + "\tif isSelfFocused", + "\t\t$0", + "\tend if", + "end function" + ] + }, + "onLostFocus": { + "prefix": "onLostFocus", + "body": [ + "private function onLostFocus()", + "\tsuper.onLostFocus()", + "\t$0", + "end function" + ] + }, + "onshow": { + "prefix": "onshow", + "description": "", + "body": [ + "protected override private function onShow()", + "\tsuper.onShow()", + " $0", + "end function" + ] + }, + "onfirstshow": { + "prefix": "onfirstshow", + "description": "", + "body": [ + "protected override private function onFirstShow()", + "\tsuper.onFirstShow()", + " $0", + "end function" + ] + }, + "onhide": { + "prefix": "onhide", + "description": "", + "body": [ + "protected override private function onHide()", + "\tsuper.onHide()", + " $0", + "end function" + ] + }, + + //diagnostics hints + "bsdl": { + "prefix": "bsdl", + "description": "brighterscript disbale next line", + "body": ["'bs:disable-next-line"] + }, + "cspell-disable-line": { + "prefix": "csdl", + "description": "cspell disbale next line", + "body": ["'// cspell:disable-next-line"] + }, + "cspell-disable": { + "prefix": "csd", + "description": "cspell disbale", + "body": ["'/* cspell:disable *\\"] + }, + "cspell-enable": { + "prefix": "cse", + "description": "cspell enable", + "body": ["'/* cspell:enable *\\"] + }, + + //type definitions + "asinteger": { + "prefix": "ai", + "description": "as integer", + "body": ["as integer"] + }, + "asnode": { + "prefix": "an", + "description": "as node", + "body": ["as mc.types.node"] + }, + "asarray": { + "prefix": "aa", + "description": "as array", + "body": ["as mc.types.array"] + }, + "asassocarray": { + "prefix": "aaa", + "description": "as assocarray", + "body": ["as mc.types.assocarray"] + }, + "asfloat": { + "prefix": "af", + "description": "as float", + "body": ["as float"] + }, + "asobject": { + "prefix": "ao", + "description": "as object", + "body": ["as object"] + }, + "asboolean": { + "prefix": "ab", + "description": "as boolean", + "body": ["as boolean"] + }, + "asdynamic": { + "prefix": "ad", + "description": "as dynamic", + "body": ["as dynamic"] + }, + "asstring": { + "prefix": "as", + "description": "as string", + "body": ["as string"] + }, + + //general + "createsgnode": { + "prefix": "createsgnode", + "description": "", + "body": [ + "m.$1 = m.createSGNode(\"$2\", ${3:m.top}, \"$1\", {", + "\t$0", + "})" + ] + }, + "cycleFocus": { + "prefix": "cyclefocus", + "description": "", + "body": [ + "m.setFocus(m[mc.collections.getItemAtOffset(m.focusIds, m.${1:focusedControl.id}, ${2:-1})])", + "\t$0" + ] + }, + "function": { + "prefix": "function", + "body": ["function ${1:name}(${2:args}) ${3:as}", "\t${0}", "end function"] + }, + "observe node field": { + "prefix": "observenodefield", + "body": [ + "${2:m}.observeNodeField(${3:object}, \"${4:name}\", ${6:m.}${7| ,\\, \"value\",\\, \"both\",\\, \"node\"|})", + "$0" + ] + }, + "unobserve node field": { + "prefix": "unobservenodefield", + "body": [ + "${2:m}.unobserveNodeField(${3:object}, \"${4:name}\", ${6:m.})", + "$0" + ] + }, + "createTask": { + "prefix": "createtask", + "body": [ + "${2:m.thing} = m.createTask(\"${4:name}\", ${5:args}, ${6:m.}${7| ,\\, true,\\, false|}${8| ,\\, \"value\",\\, \"both\",\\, \"node\"|})", + "$0" + ] + }, + "getChildren": { + "prefix": "getChildren", + "body": [ + "$1.getChildren(-1, 0)$0" + ] + }, + "logInfo": { + "prefix": "loginfo", + "body": [ + "m.log.info(\"$1\"$2)", + "$0" + ] + }, + "logWarn": { + "prefix": "logwarn", + "body": [ + "m.log.warn(\"$1\"$2)", + "$0" + ] + }, + "logError": { + "prefix": "logerror", + "body": [ + "m.log.error(\"$1\"$2)", + "$0" + ] + }, + "logVerbose": { + "prefix": "logverbose", + "body": [ + "m.log.verbose(\"$1\"$2)", + "$0" + ] + }, + "header": { + "prefix": "header", + "body": [ + "'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", + "'++ ${1:comment}", + "'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", + "${0}" + ] + }, +} diff --git a/.vscode/json.code-snippets b/.vscode/json.code-snippets new file mode 100644 index 00000000..9a93a887 --- /dev/null +++ b/.vscode/json.code-snippets @@ -0,0 +1,112 @@ +{ + "loading indicator": { + "prefix": "loadingindicator", + "description": "", + "body": [ + "{", + " \"id\": \"$1\",", + " \"_type\": \"LoadingIndicator\",", + " \"width\": ${2:1920},", + " \"height\": ${3:1080},", + " \"backgroundVisible\": ${4|false,true|},", + " \"text\": \"$5\",", + " \"translation\": [${6:0}, ${7:0}]", + "}$0" + ] + }, + "maestro label": { + "prefix": "mlabel", + "description": "", + "body": [ + "{", + " \"id\": \"${1}\",", + " \"_type\": \"m_Label\",", + " \"translation\": [${2}, ${3}],", + " \"size\": [${4:0}, ${5:0}],", + " \"fontKey\": \"${6:~fonts.}\",", + " \"color\": \"${7:~colors.dark}\",", + " \"horizAlign\": \"${8|left,center,right|}\",", + " \"vertlign\": \"${9|top,center,bottom|}\",", + " \"wrap\": ${10|true,false|},", + " \"maxLines\": ${11},", + " \"lineSpacing\": ${12},", + " \"text\": \"$13\"", + "}$0" + ] + }, + "maestro poster": { + "prefix": "mposter", + "description": "", + "body": [ + "{", + " \"id\": \"$1\",", + " \"_type\": \"mv_Poster\",", + " \"size\": [$2, $3],", + " \"translation\": [$4, $5],", + " \"loadSync\": ${6|true,false|},", + " \"loadDisplayMode\": \"${7|limitSize,noScale,scaleToFit,scaleToFill,scaleToZoom|}\",", + " \"loadWidth\": $8,", + " \"loadHeight\": $9,", + " \"blendColor\": \"${10:~colors.}\",", + " \"uri\": \"$11\"", + "}$0" + ] + }, + "maestro rectangle": { + "prefix": "mrectangle", + "description": "", + "body": [ + "{", + " \"id\": \"$1\"", + " \"_type\": \"mv_Rectangle\",", + " \"size\": [${2:1920}, ${3:1080}],", + " \"color\": \"~colors.$4\"", + "}$0," + ] + }, + "maestro layoutGroup": { + "prefix": "layoutgroup", + "description": "", + "body": [ + "{", + " \"id\": \"$1\",", + " \"_type\": \"mv_LayoutGroup\",", + " \"translation\":[$2, $3],", + " \"layoutDirection\": \"${4|vert,horiz|}\",", + " \"vertAlignment\": \"${5|top,center,bottom|}\",", + " \"horizAlignment\": \"${6|left,center,right|}\",", + " \"itemSpacings\": [$7]", + "}$0," + ] + }, + "maestro controlGroup": { + "prefix": "controlgroup", + "description": "", + "body": [ + "{", + " \"id\": \"$1\",", + " \"_type\": \"mv_ControlsGroup\",", + " \"translation\":[$2, $3],", + " \"layoutMode\": \"${4|none,vert,horiz|}\",", + " \"keyDirection\": \"${4|vert,horiz|}\",", + " \"vertAlignment\": \"${5|top,center,bottom|}\",", + " \"horizAlignment\": \"${6|left,center,right|}\",", + " \"useFootPrint\": \"${7|true,false|}\",", + " \"selectOnFocus\": \"${8|true,false|}\",", + " \"useSizeForlayout\": \"${9|true,false|}\",", + " \"itemSpacings\": [$10]", + "}$0," + ] + }, + "SG group": { + "prefix": "group", + "description": "", + "body": [ + "{", + " \"id\": \"$1\",", + " \"_type\": \"Group\",", + " \"translation\": [$2, $3]", + "}$0," + ] + } +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 81d31881..f4ad72ce 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,160 @@ -{ - "jira-plugin.workingProject": "", - "workbench.colorCustomizations": { - "statusBar.background": "#551A8B", - "statusBar.debuggingBackground": "#551A8B", - "panelTitle.activeBorder": "#ff0000", - "activityBar.background": "#143141", - "titleBar.activeBackground": "#1D445B", - "titleBar.activeForeground": "#F7FBFD" - } -} \ No newline at end of file +{ + "cSpell.ignorePaths": [ + "**/package-lock.json", + "**/node_modules/**", + "**/vscode-extension/**", + "**/.git/objects/**", + ".vscode", + "dist", + "build" + ], + "files.exclude": { + "build": true, + ".history": true, + "node_modules": true, + "out": true, + "**/.classpath": true, + "**/.project": true, + "**/.settings": true, + "**/.factorypath": true, + "/tmp/**": true, + "**/dist": true, + "**/build": true, + "**/out": true + }, + "search.exclude": { + "**/.git/objects/**": true, + "**/.git/subtree-cache/**": true, + "**/node_modules/**": true, + "**/.meteor/local": true, + "**/build/**": true, + "build/**": true, + "**/.history/**": true, + ".history/**": true, + ".history/**/*": true, + "out/**": true, + "**/out/**": true, + "/tmp/**": true, + "**/dist": true, + "**/build": true, + "**/out": true + }, + "files.useExperimentalFileWatcher": true, + "files.watcherExclude": { + "**/.git/objects/**": true, + "**/.git/subtree-cache/**": true, + "**/node_modules/**": true, + "**/.meteor/local": true, + "**/build/**": true, + "**/.history/**": true, + ".history/**": true, + "**/out/**": true, + "**/dist": true, + "**/build": true, + "**/out": true + }, + "cSpell.enableFiletypes": ["markdown"], + + "xml.fileAssociations": [ + { + "systemId": ".vscode/project.xsd", + "pattern": "**/*.xml" + } + ], + "xml.format.splitAttributes": true, + "xml.validation.enabled": false, + "xml.format.preserveEmptyContent": true, + "xml.preferences.quoteStyle": "single", + "xml.format.enforceQuoteStyle": "preferred", + "editor.tabSize": 4, + "[brightscript]": { + "editor.tabSize": 2 + }, + "[brighterscript]": { + "editor.tabSize": 2 + }, + "[xml]": { + "editor.tabSize": 2 + }, + "editor.insertSpaces": true, + "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, + "files.trimTrailingWhitespace": true, + "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true, + "[typescript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "[javascript]": { + "editor.defaultFormatter": "vscode.typescript-language-features" + }, + "[json]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[jsonc]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "workbench.colorCustomizations": { + "statusBar.background": "#FF4658", + "statusBar.debuggingBackground": "#932b35", + "panelTitle.activeBorder": "#ff0000", + "activityBar.background": "#304f7d", + "titleBar.activeBackground": "#6A9CE6", + "titleBar.activeForeground": "#FAFBFE" + }, + "launches": { + "Run": "Run" + }, + "eslint.validate": ["javascript", "typescript"], + "eslint.format.enable": true, + // "eslint.format.enable": true + "gotoNextPreviousMember.symbolKinds": [ + "constructor", + "function", + "method", + "module", + "namespace", + "class", + "struct", + "interface" + ], + "cSpell.enabledLanguageIds": [ + "brightscript", + "javascript", + "markdown", + "plaintext", + "text", + "typescript", + "yml", + "brighterscript" + ], + "brightscript.output.clearOnLaunch": true, + "brightscript.output.focusOnLaunch": true, + "brightscript.format.removeTrailingWhiteSpace": false, + "brightscript.output.includeStackTraces": true, + "brightscript.debug.enableDebugProtocol": false, + "brightscript.outputPanelStartupBehavior": "focus", + "brightscript.format.keywordCase": "lower", + "brightscript.enableLanguageServer": true, + "brightscript.deviceDiscovery.enabled": false, + "editor.tokenColorCustomizations": { + "textMateRules": [ + { + "scope": "meta.function-call.brs,punctuation.decorator.brs", + "settings": { + "foreground": "#34BEB0", + "fontStyle": "" + } + } + ] + }, + "brightscript.bsdk": "node_modules/brighterscript", + "brightscript.output.hyperlinkFormat": "FilenameAndFunction", + "cx.server": { + "url": "https://checkmarx.nba-hq.com/", + "alias": "nba", + "username": "", + "password": "", + "project_id": 0, + "team_id": 0, + "project_name": "" + } +} diff --git a/bsc-plugin/.eslintrc.js b/bsc-plugin/.eslintrc.js index 7b2ff567..8c1684aa 100644 --- a/bsc-plugin/.eslintrc.js +++ b/bsc-plugin/.eslintrc.js @@ -52,6 +52,7 @@ module.exports = { '@typescript-eslint/no-unnecessary-condition': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/no-unused-vars': 'off', diff --git a/bsc-plugin/package.json b/bsc-plugin/package.json index d7368f5b..58f5b85f 100644 --- a/bsc-plugin/package.json +++ b/bsc-plugin/package.json @@ -28,7 +28,7 @@ "@types/sinon": "^9.0.4", "@typescript-eslint/eslint-plugin": "^4.4.1", "@typescript-eslint/parser": "^4.4.1", - "brighterscript": "^0.39.0", + "brighterscript": "0.45.3", "chai": "^4.2.0", "chai-files": "^1.4.0", "chai-subset": "^1.6.0", @@ -41,10 +41,14 @@ "roku-deploy": "^3.2.4", "sinon": "^9.0.2", "source-map-support": "^0.5.13", + "trim-whitespace": "^1.3.3", "ts-node": "^9.0.0", "typescript": "^3.8.3", "typescript-formatter": "^7.2.2" }, + "peerDependencies": { + "brighterscript": "^0.45.3" + }, "scripts": { "clean": "rm -rf ./dist && mkdir dist", "compile": "npm run clean && tsc -p .", diff --git a/bsc-plugin/src/lib/rooibos/Annotation.ts b/bsc-plugin/src/lib/rooibos/Annotation.ts index e2d248fa..7bb4c347 100644 --- a/bsc-plugin/src/lib/rooibos/Annotation.ts +++ b/bsc-plugin/src/lib/rooibos/Annotation.ts @@ -94,7 +94,7 @@ export class RooibosAnnotation { let noCatch = false; let noEarlyExit = false; let nodeName = null; - let tags = []; + let tags = [] as string[]; if (statement.annotations?.length) { let describeAnnotations = statement.annotations.filter((a) => getAnnotationType(a.name) === AnnotationType.Describe); if (describeAnnotations.length > 1) { diff --git a/bsc-plugin/src/lib/rooibos/FileFactory.ts b/bsc-plugin/src/lib/rooibos/FileFactory.ts index 9e1d28f7..13080eca 100644 --- a/bsc-plugin/src/lib/rooibos/FileFactory.ts +++ b/bsc-plugin/src/lib/rooibos/FileFactory.ts @@ -32,6 +32,7 @@ export class FileFactory { public sourcePath = path.join(__dirname, '../framework'); private targetPath = 'source/rooibos/'; private targetCompsPath = 'components/rooibos/'; + public addedFrameworkFiles = []; public getFrameworkFiles(): FileObj[] { let files: FileObj[] = []; @@ -44,19 +45,20 @@ export class FileFactory { } public addFrameworkFiles(program: Program) { + this.addedFrameworkFiles = []; for (let fileName of this.frameworkFileNames) { let sourcePath = path.resolve(path.join(this.sourcePath, `${fileName}.bs`)); let fileContents = fs.readFileSync(sourcePath, 'utf8'); let destPath = path.join(this.targetPath, `${fileName}.bs`); let entry = { src: sourcePath, dest: destPath }; - program.addOrReplaceFile(entry, fileContents); + this.addedFrameworkFiles.push(program.setFile(entry, fileContents)); } let sourcePath = path.resolve(path.join(this.sourcePath, `RooibosScene.xml`)); let destPath = path.join(this.targetCompsPath, `RooibosScene.xml`); let entry = { src: sourcePath, dest: destPath }; - program.addOrReplaceFile(entry, this.createTestXML('TestsScene', 'Scene')); + this.addedFrameworkFiles.push(program.setFile(entry, this.createTestXML('TestsScene', 'Scene'))); } public createTestXML(name: string, baseName: string, useBs = true): string { @@ -99,7 +101,9 @@ ${scriptImports.join('\n')} public addFile(program, projectPath: string, contents: string) { try { - return program.addOrReplaceFile({ src: path.resolve(projectPath), dest: projectPath }, contents); + const file = program.setFile({ src: path.resolve(projectPath), dest: projectPath }, contents); + this.addedFrameworkFiles.push(file); + return file; } catch (error) { console.error(`Error adding framework file: ${projectPath} : ${error.message}`); } diff --git a/bsc-plugin/src/lib/rooibos/Utils.ts b/bsc-plugin/src/lib/rooibos/Utils.ts index 4dd24e77..f0070e2e 100644 --- a/bsc-plugin/src/lib/rooibos/Utils.ts +++ b/bsc-plugin/src/lib/rooibos/Utils.ts @@ -1,5 +1,6 @@ import type { BrsFile, ClassStatement, Expression, FunctionStatement, Statement, AnnotationExpression } from 'brighterscript'; -import { BinaryExpression, Block, createIdentifier, createStringLiteral, createToken, isClassMethodStatement, Lexer, ParseMode, Parser, TokenKind, Range, IfStatement, ClassMethodStatement } from 'brighterscript'; +import { createVariableExpression } from 'brighterscript'; +import * as brighterscript from 'brighterscript'; import * as rokuDeploy from 'roku-deploy'; import { diagnosticCorruptTestProduced } from '../utils/Diagnostics'; @@ -54,8 +55,8 @@ export function pad(pad: string, str: string, padLeft: number): string { } export function makeASTFunction(source: string): FunctionStatement | undefined { - let tokens = Lexer.scan(source).tokens; - let { statements } = Parser.parse(tokens, { mode: ParseMode.BrighterScript }); + let tokens = brighterscript.Lexer.scan(source).tokens; + let { statements } = brighterscript.Parser.parse(tokens, { mode: brighterscript.ParseMode.BrighterScript }); if (statements && statements.length > 0) { return statements[0] as FunctionStatement; } @@ -67,7 +68,7 @@ export function getFunctionBody(source: string): Statement[] { return funcStatement ? funcStatement.func.body.statements : []; } -export function changeFunctionBody(statement: ClassMethodStatement | FunctionStatement, source: Statement[] | string) { +export function changeFunctionBody(statement: brighterscript.ClassMethodStatement | FunctionStatement, source: Statement[] | string) { let statements = statement.func.body.statements; statements.splice(0, statements.length); let newStatements = (typeof source === 'string') ? getFunctionBody(source) : source; @@ -83,16 +84,16 @@ export function addOverriddenMethod(file: BrsFile, annotation: AnnotationExpress end function `; - let tokens = Lexer.scan(funcSource).tokens; - let { statements, diagnostics } = Parser.parse(tokens, { mode: ParseMode.BrighterScript }); + let tokens = brighterscript.Lexer.scan(funcSource).tokens; + let { statements, diagnostics } = brighterscript.Parser.parse(tokens, { mode: brighterscript.ParseMode.BrighterScript }); let error = ''; if (statements && statements.length > 0) { let statement = statements[0] as FunctionStatement; if (statement.func.body.statements.length > 0) { - let p = createToken(TokenKind.Public, 'public', target.range); - let o = createToken(TokenKind.Override, 'override', target.range); - let n = createIdentifier(name, target.range).name; - let cms = new ClassMethodStatement(p, n, statement.func, o); + let p = brighterscript.createToken(brighterscript.TokenKind.Public, 'public', target.range); + let o = brighterscript.createToken(brighterscript.TokenKind.Override, 'override', target.range); + let n = brighterscript.createIdentifier(name, target.range); + let cms = new brighterscript.ClassMethodStatement(p, n, statement.func, o); target.body.push(cms); return true; } @@ -105,7 +106,7 @@ export function addOverriddenMethod(file: BrsFile, annotation: AnnotationExpress export function changeClassMethodBody(target: ClassStatement, name: string, source: Statement[] | string): boolean { let method = target.methods.find((m) => m.name.text === name); - if (isClassMethodStatement(method)) { + if (brighterscript.isClassMethodStatement(method)) { changeFunctionBody(method, source); return true; } @@ -116,31 +117,31 @@ export function sanitizeBsJsonString(text: string) { return `"${text ? text.replace(/"/g, '\'') : ''}"`; } -export function createIfStatement(condition: Expression, statements: Statement[]): IfStatement { - let ifToken = createToken(TokenKind.If, 'if', Range.create(1, 1, 1, 999999)); - let thenBranch = new Block(statements, Range.create(1, 1, 1, 1)); - return new IfStatement({ if: ifToken, then: createToken(TokenKind.Then, '', Range.create(1, 1, 1, 999999)) }, condition, thenBranch); +export function createIfStatement(condition: Expression, statements: Statement[]): brighterscript.IfStatement { + let ifToken = brighterscript.createToken(brighterscript.TokenKind.If, 'if', brighterscript.Range.create(1, 1, 1, 999999)); + let thenBranch = new brighterscript.Block(statements, brighterscript.Range.create(1, 1, 1, 1)); + return new brighterscript.IfStatement({ if: ifToken, then: brighterscript.createToken(brighterscript.TokenKind.Then, '', brighterscript.Range.create(1, 1, 1, 999999)) }, condition, thenBranch); } -export function createVarExpression(varName: string, operator: TokenKind, value: string): BinaryExpression { - let variable = createIdentifier(varName, Range.create(1, 1, 1, 999999)); - let v = createStringLiteral(value, Range.create(1, 1, 1, 999999)); +export function createVarExpression(varName: string, operator: brighterscript.TokenKind, value: string): brighterscript.BinaryExpression { + let variable = createVariableExpression(varName, brighterscript.Range.create(1, 1, 1, 999999)); + let v = brighterscript.createStringLiteral(value, brighterscript.Range.create(1, 1, 1, 999999)); - let t = createToken(operator, getTokenText(operator), Range.create(1, 1, 1, 999999)); - return new BinaryExpression(variable, t, v); + let t = brighterscript.createToken(operator, getTokenText(operator), brighterscript.Range.create(1, 1, 1, 999999)); + return new brighterscript.BinaryExpression(variable, t, v); } -export function getTokenText(operator: TokenKind): string { +export function getTokenText(operator: brighterscript.TokenKind): string { switch (operator) { - case TokenKind.Equal: + case brighterscript.TokenKind.Equal: return '='; - case TokenKind.Plus: + case brighterscript.TokenKind.Plus: return '+'; - case TokenKind.Minus: + case brighterscript.TokenKind.Minus: return '-'; - case TokenKind.Less: + case brighterscript.TokenKind.Less: return '<'; - case TokenKind.Greater: + case brighterscript.TokenKind.Greater: return '>'; default: return ''; diff --git a/bsc-plugin/src/lib/utils/testHelpers.spec.ts b/bsc-plugin/src/lib/utils/testHelpers.spec.ts deleted file mode 100644 index 09571af8..00000000 --- a/bsc-plugin/src/lib/utils/testHelpers.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ - -/** - * Trim leading whitespace for every line (to make test writing cleaner - */ -export function trimLeading(text: string) { - if (!text) { - return text; - } - const lines = text.split(/\r?\n/); - - //skip leading empty lines - while (lines[0]?.trim().length === 0) { - lines.splice(0, 1); - } - - for (let i = 0; i < lines.length; i++) { - lines[i] = lines[i].trimLeft(); - } - - //apply the trim to each line - return lines.join('\n'); -} diff --git a/bsc-plugin/src/plugin.spec.ts b/bsc-plugin/src/plugin.spec.ts index fb4f341b..6604e50e 100644 --- a/bsc-plugin/src/plugin.spec.ts +++ b/bsc-plugin/src/plugin.spec.ts @@ -10,7 +10,7 @@ let tmpPath = s`${process.cwd()}/tmp`; let _rootDir = s`${tmpPath}/rootDir`; let _stagingFolderPath = s`${tmpPath}/staging`; -import { trimLeading } from './lib/utils/testHelpers.spec'; +import * as trim from 'trim-whitespace'; describe('RooibosPlugin', () => { let program: Program; @@ -318,11 +318,11 @@ describe('RooibosPlugin', () => { expect(plugin.session.sessionInfo.groupsCount).to.equal(1); expect(plugin.session.sessionInfo.testsCount).to.equal(1); - expect(getContents('rooibosMain.brs')).to.eql(trimLeading(`function main() + expect(trim(getContents('rooibosMain.brs'))).to.eql(trim(`function main() Rooibos_init() -end function`).trim()); - let a = getContents('test.spec.brs'); - let b = trimLeading(`function __ATest_builder() +end function`)); + let a = trim(getContents('test.spec.brs')); + let b = trim(`function __ATest_builder() instance = __rooibos_BaseTestSuite_builder() instance.super0_new = instance.new instance.new = sub() @@ -417,9 +417,9 @@ end function`).trim()); expect(plugin.session.sessionInfo.groupsCount).to.equal(1); expect(plugin.session.sessionInfo.testsCount).to.equal(1); - expect(getContents('rooibosMain.brs')).to.eql(trimLeading(`function main() + expect(trim(getContents('rooibosMain.brs'))).to.eql(trim(`function main() Rooibos_init() -end function`).trim()); +end function`)); }); }); @@ -601,5 +601,5 @@ describe.only('run a local project', () => { }); function getContents(filename: string) { - return trimLeading(fsExtra.readFileSync(s`${_stagingFolderPath}/source/${filename}`).toString()); + return trim(fsExtra.readFileSync(s`${_stagingFolderPath}/source/${filename}`).toString()); } diff --git a/bsc-plugin/src/plugin.ts b/bsc-plugin/src/plugin.ts index dff61ecb..7fa79187 100644 --- a/bsc-plugin/src/plugin.ts +++ b/bsc-plugin/src/plugin.ts @@ -1,13 +1,13 @@ -import type { - BrsFile, - BscFile, +import type { BscFile, + CompilerPlugin, Program, - ProgramBuilder, + ProgramBuilder } from 'brighterscript'; +import { + BrsFile, + isBrsFile, XmlFile } from 'brighterscript'; -import { isBrsFile } from 'brighterscript/dist/astUtils'; - import { RooibosSession } from './lib/rooibos/RooibosSession'; import { CodeCoverageProcessor } from './lib/rooibos/CodeCoverageProcessor'; @@ -17,7 +17,7 @@ import type { RooibosConfig } from './lib/rooibos/RooibosConfig'; import * as minimatch from 'minimatch'; -export class RooibosPlugin { +export class RooibosPlugin implements CompilerPlugin { name: 'rooibosPlugin'; public session: RooibosSession; @@ -75,8 +75,13 @@ export class RooibosPlugin { } } - afterFileParse(file: (BrsFile | XmlFile)): void { + afterFileParse(file: BscFile): void { // console.log('afp', file.pkgPath); + if (file.pathAbsolute.includes('/rooibos/bsc-plugin/dist/framework')) { + // eslint-disable-next-line @typescript-eslint/dot-notation + file['diagnostics'] = []; + return; + } if (this.fileFactory.isIgnoredFile(file) || !this.shouldSearchInFileForTests(file)) { return; } @@ -116,12 +121,16 @@ export class RooibosPlugin { this.session.createNodeFiles(this._builder.program); } - beforeProgramValidate() { + afterProgramValidate() { // console.log('bpv'); this.session.updateSessionStats(); for (let testSuite of [...this.session.sessionInfo.testSuites.values()]) { testSuite.validate(); } + for (let file of this.fileFactory.addedFrameworkFiles) { + // eslint-disable-next-line @typescript-eslint/dot-notation + file['diagnostics'] = []; + } } shouldSearchInFileForTests(file: BscFile) { diff --git a/bsconfig.json b/bsconfig.json index 5ba0a1fd..fba6c42a 100644 --- a/bsconfig.json +++ b/bsconfig.json @@ -16,5 +16,8 @@ 1009 ] } + ], + "plugins": [ + "@rokucommunity/bslint" ] } \ No newline at end of file diff --git a/bslint.json b/bslint.json new file mode 100644 index 00000000..50edf22b --- /dev/null +++ b/bslint.json @@ -0,0 +1,17 @@ +{ + "rules": { + "inline-if-style": "no-then", + "block-if-style": "no-then", + "condition-style": "no-group", + "named-function-style": "no-sub", + "anon-function-style": "no-sub", + "type-annotations": "off", + "assign-all-paths": "off", + "unsafe-path-loop": "error", + "unsafe-iterators": "error", + "unreachable-code": "warn", + "case-sensitivity": "warn", + "unused-variable": "warn", + "consistent-return": "error" + } +} diff --git a/framework/src/source/BaseTestReporter.bs b/framework/src/source/BaseTestReporter.bs index 49461f75..fdc42f9d 100644 --- a/framework/src/source/BaseTestReporter.bs +++ b/framework/src/source/BaseTestReporter.bs @@ -5,21 +5,21 @@ namespace rooibos public config = invalid public allStats = invalid - function new(testRunner) + function new(testRunner as dynamic) m.testRunner = testRunner m.config = testRunner.config m.allStats = testRunner.stats end function - function reportResults(allStats) + function reportResults(allStats as dynamic) 'override me end function - function testLogInfo(text) + function testLogInfo(text as string) 'override me end function - function testLogError(text) + function testLogError(text as string) 'override me end function diff --git a/framework/src/source/BaseTestSuite.bs b/framework/src/source/BaseTestSuite.bs index f710e8d8..3cc4319a 100644 --- a/framework/src/source/BaseTestSuite.bs +++ b/framework/src/source/BaseTestSuite.bs @@ -77,7 +77,7 @@ namespace rooibos m.nodeName = data.nodeName m.generatedNodeName = data.generatedNodeName m.isFailingFast = false - m.stats = new Stats() + m.stats = new rooibos.Stats() end if end function @@ -131,7 +131,7 @@ namespace rooibos end for end function - function runTest(test) + function runTest(test as rooibos.Test) ? "" ? rooibos.common.fillText(">>>>>> It: " + test.name, ">", 80) ? ` Location: file://${test.testSuite.filePath.trim()}:${test.lineNumber}` @@ -147,6 +147,7 @@ namespace rooibos m.CleanStubs() end if catch error + 'bs:disable-next-line m.currentResult.crash("test crashed!", error) end try else @@ -175,8 +176,10 @@ namespace rooibos ' * @param {Dynamic} [msg=""] - message to display in the test report ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ - function fail(msg = "Error") as dynamic - if m.currentResult.isFail then return false + function fail(msg = "Error" as string) as dynamic + if m.currentResult.isFail + return false + end if m.currentResult.fail(msg, m.currentAssertLineNumber) return false end function @@ -191,8 +194,10 @@ namespace rooibos ' * @param {Dynamic} [msg=""] - alternate error message ' Default value: "Expression evaluates to true"' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ - function assertFalse(expr, msg = "Expression evaluates to true") as dynamic - if m.currentResult.isFail then return false + function assertFalse(expr as dynamic, msg = "Expression evaluates to true") as dynamic + if m.currentResult.isFail + return false + end if try if Rooibos.Common.isBoolean(expr) if expr @@ -203,8 +208,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function ' /** @@ -218,7 +225,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertTrue(expr, msg = "Expression evaluates to false") - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if Rooibos.Common.isBoolean(expr) if not expr @@ -230,8 +239,10 @@ namespace rooibos return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function ' /** @@ -246,7 +257,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertEqual(first, second, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if not Rooibos.Common.eqValues(first, second) if msg = "" @@ -259,8 +272,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -276,7 +291,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertLike(first, second, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if first <> second if msg = "" @@ -289,8 +306,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -306,7 +325,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertNotEqual(first, second, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if Rooibos.Common.eqValues(first, second) if msg = "" @@ -319,8 +340,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -335,7 +358,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertInvalid(value, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if value <> invalid @@ -348,8 +373,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -364,11 +391,12 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertNotInvalid(value, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if value = invalid if msg = "" - expr_as_string = Rooibos.Common.asString(value) msg = "Expected value, got invalid" end if m.currentResult.fail(msg, m.currentAssertLineNumber) @@ -376,8 +404,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -393,7 +423,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertAAHasKey(array, key, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if Rooibos.Common.isAssociativeArray(array) if not array.DoesExist(key) @@ -410,8 +442,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -427,7 +461,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertAANotHasKey(array, key, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if Rooibos.Common.isAssociativeArray(array) @@ -445,8 +481,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -462,7 +500,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertAAHasKeys(array, keys, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if Rooibos.Common.isAssociativeArray(array) and Rooibos.Common.isArray(keys) @@ -482,8 +522,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -499,7 +541,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertAANotHasKeys(array, keys, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if Rooibos.Common.isAssociativeArray(array) and Rooibos.Common.isArray(keys) for each key in keys @@ -518,8 +562,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -538,7 +584,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertArrayContains(array, value, key = invalid, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if Rooibos.Common.isAssociativeArray(array) or Rooibos.Common.isArray(array) if not Rooibos.Common.arrayContains(array, value, key) @@ -553,8 +601,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -570,7 +620,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertArrayContainsAAs(array, values, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if not Rooibos.Common.isArray(values) msg = "values to search for are not an Array." @@ -618,8 +670,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -637,7 +691,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertArrayNotContains(array, value, key = invalid, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if Rooibos.Common.isAssociativeArray(array) or Rooibos.Common.isArray(array) if Rooibos.Common.arrayContains(array, value, key) @@ -652,8 +708,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -669,7 +727,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertArrayContainsSubset(array, subset, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if (Rooibos.Common.isAssociativeArray(array) and Rooibos.Common.isAssociativeArray(subset)) or (Rooibos.Common.isArray(array) and Rooibos.Common.isArray(subset)) isAA = Rooibos.Common.isAssociativeArray(subset) @@ -693,8 +753,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -710,7 +772,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertArrayNotContainsSubset(array, subset, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if (Rooibos.Common.isAssociativeArray(array) and Rooibos.Common.isAssociativeArray(subset)) or (Rooibos.Common.isArray(array) and Rooibos.Common.isArray(subset)) isAA = Rooibos.Common.isAssociativeArray(subset) @@ -734,8 +798,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -751,7 +817,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertArrayCount(array, count, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if Rooibos.Common.isAssociativeArray(array) or Rooibos.Common.isArray(array) if array.Count() <> count @@ -766,8 +834,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -783,7 +853,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertArrayNotCount(array, count, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if Rooibos.Common.isAssociativeArray(array) or Rooibos.Common.isArray(array) if array.Count() = count @@ -798,8 +870,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -814,7 +888,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertEmpty(item, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if Rooibos.Common.isAssociativeArray(item) or Rooibos.Common.isArray(item) if item.count() > 0 @@ -835,8 +911,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -851,7 +929,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertNotEmpty(item, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if Rooibos.Common.isAssociativeArray(item) or Rooibos.Common.isArray(item) if item.count() = 0 @@ -872,8 +952,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -889,7 +971,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertArrayContainsOnlyValuesOfType(array, typeStr, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if typeStr <> "String" and typeStr <> "Integer" and typeStr <> "Boolean" and typeStr <> "Array" and typeStr <> "AssociativeArray" @@ -921,8 +1005,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -974,7 +1060,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertType(value, typeStr, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if type(value) <> typeStr if msg = "" @@ -986,8 +1074,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -1003,7 +1093,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertSubType(value, typeStr, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if type(value) <> "roSGNode" if msg = "" @@ -1022,13 +1114,17 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function function assertClass(value, typeStr, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if not Rooibos.Common.isAssociativeArray(value) if msg = "" @@ -1041,15 +1137,17 @@ namespace rooibos className = Rooibos.Common.asString(value.__classname) if className <> typeStr if msg = "" - msg = "Expected class: " + typeStr + ", got " + classNAme + msg = "Expected class: " + typeStr + ", got " + className end if m.currentResult.fail(msg, m.currentAssertLineNumber) return false end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -1070,7 +1168,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert w, false otherwise ' */ function assertNodeCount(node, count, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if type(node) = "roSGNode" if node.getChildCount() <> count @@ -1085,8 +1185,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -1102,7 +1204,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertNodeNotCount(node, count, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if type(node) = "roSGNode" if node.getChildCount() = count @@ -1117,8 +1221,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -1133,7 +1239,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertNodeEmpty(node, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if type(node) = "roSGNode" if node.getChildCount() > 0 @@ -1144,8 +1252,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -1160,7 +1270,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertNodeNotEmpty(node, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if type(node) = "roSGNode" if node.Count() = 0 @@ -1171,8 +1283,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -1188,7 +1302,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertNodeContains(node, value, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if type(node) = "roSGNode" if not Rooibos.Common.nodeContains(node, value) @@ -1203,8 +1319,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -1220,7 +1338,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertNodeContainsOnly(node, value, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if type(node) = "roSGNode" if not Rooibos.Common.nodeContains(node, value) @@ -1239,8 +1359,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -1257,7 +1379,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertNodeNotContains(node, value, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if type(node) = "roSGNode" if Rooibos.Common.nodeContains(node, value) @@ -1272,8 +1396,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -1289,10 +1415,11 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertNodeContainsFields(node, subset, ignoredFields = invalid, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if (type(node) = "roSGNode" and Rooibos.Common.isAssociativeArray(subset)) or (type(node) = "roSGNode" and Rooibos.Common.isArray(subset)) - isAA = Rooibos.Common.isAssociativeArray(subset) isIgnoredFields = Rooibos.Common.isArray(ignoredFields) for each key in subset if key <> "" @@ -1316,8 +1443,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -1333,7 +1462,9 @@ namespace rooibos ' * @returns {boolean} - true if the assert w, false otherwise ' */ function assertNodeNotContainsFields(node, subset, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if (type(node) = "roSGNode" and Rooibos.Common.isAssociativeArray(subset)) or (type(node) = "roSGNode" and Rooibos.Common.isArray(subset)) isAA = Rooibos.Common.isAssociativeArray(subset) @@ -1357,8 +1488,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -1379,10 +1512,11 @@ namespace rooibos ' * @returns {boolean} - true if the assert was satisfied, false otherwise ' */ function assertAAContainsSubset(array, subset, ignoredFields = invalid, msg = "") as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if try if Rooibos.Common.isAssociativeArray(array) and Rooibos.Common.isAssociativeArray(subset) - isAA = Rooibos.Common.isAssociativeArray(subset) isIgnoredFields = Rooibos.Common.isArray(ignoredFields) for each key in subset if key <> "" @@ -1406,8 +1540,10 @@ namespace rooibos end if return true catch error + 'bs:disable-next-line m.currentResult.fail("Assert failed: " + error.message, m.currentAssertLineNumber) end try + return false end function @@ -1482,9 +1618,11 @@ namespace rooibos try return m.mock(target, methodName, 1, expectedArgs, returnValue, allowNonExistingMethods) catch error + 'bs:disable-next-line m.currentResult.fail("Setting up mock failed: " + error.message, m.currentAssertLineNumber) - return invalid + return false end try + return false end function ' /** @@ -1509,9 +1647,10 @@ namespace rooibos return m.expectNone(target, methodName, allowNonExistingMethods) end if catch error + 'bs:disable-next-line m.currentResult.fail("Setting up mock failed: " + error.message, m.currentAssertLineNumber) - return invalid end try + return false end function ' /** @@ -1529,10 +1668,10 @@ namespace rooibos try return m.mock(target, methodName, 0, invalid, invalid, allowNonExistingMethods) catch error + 'bs:disable-next-line m.currentResult.fail("Setting up mock failed: " + error.message, m.currentAssertLineNumber) - return invalid end try - + return false end function ' /** @@ -1553,9 +1692,10 @@ namespace rooibos try return m.mock(target, methodName, expectedInvocations, expectedArgs, returnValue, allowNonExistingMethods) catch error + 'bs:disable-next-line m.currentResult.fail("Setting up mock failed: " + error.message, m.currentAssertLineNumber) - return invalid end try + return false end function ' /** @@ -1704,7 +1844,7 @@ namespace rooibos invokedArgs: [invalid, invalid, invalid, invalid, invalid, invalid, invalid, invalid, invalid], expectedArgs: expectedArgsValues, expectedInvocations: expectedInvocations, - callback: function(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + callback: function(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic ' ? "FAKE CALLBACK CALLED FOR " ; m.methodName 'bs:disable-next-line if m.allInvokedArgs = invalid @@ -1782,7 +1922,6 @@ namespace rooibos return end if - lastId = int(m.__mockId) for each id in m.mocks mock = m.mocks[id] methodName = mock.methodName @@ -1842,7 +1981,9 @@ namespace rooibos ' * @description Cleans up all tracking data associated with mocks ' */ function cleanMocks() as void - if m.mocks = invalid then return + if m.mocks = invalid + return + end if for each id in m.mocks mock = m.mocks[id] mock.target.__mocks = invalid @@ -1858,7 +1999,9 @@ namespace rooibos ' * @description Cleans up all tracking data associated with stubs ' */ function cleanStubs() as void - if m.stubs = invalid then return + if m.stubs = invalid + return + end if for each id in m.stubs stub = m.stubs[id] stub.target.__stubs = invalid @@ -1868,7 +2011,9 @@ namespace rooibos function mockFail(lineNumber, methodName, message) as dynamic - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if m.currentResult.fail("mock failure on '" + methodName + "' : " + message, lineNumber) return false end function @@ -1878,40 +2023,40 @@ namespace rooibos '++ Fake Stub callback functions - this is required to get scope '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - function stubCallback0(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function stubCallback0(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__Stubs["0"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function stubCallback1(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function stubCallback1(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__Stubs["1"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function stubCallback2(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function stubCallback2(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__Stubs["2"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function stubCallback3(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function stubCallback3(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__Stubs["3"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function stubCallback4(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function stubCallback4(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__Stubs["4"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function stubCallback5(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function stubCallback5(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__Stubs["5"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) @@ -1921,151 +2066,151 @@ namespace rooibos '++ Fake Mock callback functions - this is required to get scope '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - function mockCallback0(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback0(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["0"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback1(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback1(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["1"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback2(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback2(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["2"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback3(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback3(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["3"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback4(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback4(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["4"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback5(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback5(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["5"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback6(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback6(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["6"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback7(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback7(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["7"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback8(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback8(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["8"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback9(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback9(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["9"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback10(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback10(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["10"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback11(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback11(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["11"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback12(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback12(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["12"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback13(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback13(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["13"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback14(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback14(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["14"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback15(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback15(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["15"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback16(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback16(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["16"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback17(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback17(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["17"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback18(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback18(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["18"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback19(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback19(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["19"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback20(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback20(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["20"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback21(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback21(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["21"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback22(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback22(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["22"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback23(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback23(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["23"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) end function - function mockCallback24(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid)as dynamic + function mockCallback24(arg1 = invalid, arg2 = invalid, arg3 = invalid, arg4 = invalid, arg5 = invalid, arg6 = invalid, arg7 = invalid, arg8 = invalid, arg9 = invalid, arg10 = invalid, arg11 = invalid, arg12 = invalid, arg13 = invalid, arg14 = invalid, arg15 = invalid) as dynamic 'bs:disable-next-line fake = m.__mocks["24"] return fake.callback(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) @@ -2113,7 +2258,9 @@ namespace rooibos function assertAsyncField(target, fieldName, delay = 500, maxAttempts = 10) try - if m.currentResult.isFail then return false + if m.currentResult.isFail + return false + end if if target = invalid m.fail("Target was invalid") end if @@ -2125,9 +2272,33 @@ namespace rooibos return true catch error + 'bs:disable-next-line m.currentResult.fail("Error while waiting: " + error.message, m.currentAssertLineNumber) end try + return false + + end function + protected function createNodeClass(clazz, useClassAsTop = true, nodeTop = new rooibos.utils.MockNode("top"), nodeGlobal = new rooibos.utils.MockNode("top")) + 'bs:disable-next-line + instance = tests_maestro_nodeClassUtils_createNodeClass(clazz, nodeTop, nodeGlobal) + if instance <> invalid and useClassAsTop + 'note - we use the clazz itself as TOP, so that we don't have to write tests that do + 'thing.top.value, thing.top.value2, etc all over the place + instance.append(nodeTop) + instance.top = instance + instance.__rooibosSkipFields = { "top": true } + end if + return instance + end function + + protected function createMockViews(instance as dynamic, bundlePath as string, viewsPath = "views" as string) + bundle = m.global.testStyleManager@.loadBundle(bundlePath) + 'bs:disable-next-line + ids = mv_getIdsFromStyleJson(mc_getArray(bundle, viewsPath)) + for each id in ids + instance[id] = { id: id } + end for end function end class diff --git a/framework/src/source/CommonUtils.bs b/framework/src/source/CommonUtils.bs index 67376cbc..de7f61ef 100755 --- a/framework/src/source/CommonUtils.bs +++ b/framework/src/source/CommonUtils.bs @@ -41,8 +41,12 @@ namespace rooibos.Common ' * @returns {Function} - function pointer or invalid ' */ function getFunction(filename, functionName) as object - if not Rooibos.Common.isNotEmptyString(functionName) then return invalid - if not Rooibos.Common.isNotEmptyString(filename) then return invalid + if not Rooibos.Common.isNotEmptyString(functionName) + return invalid + end if + if not Rooibos.Common.isNotEmptyString(filename) + return invalid + end if 'bs:disable-next-line mapFunction = RBSFM_getFunctionsForFile(filename) 'bs:disable-next-line @@ -74,7 +78,9 @@ namespace rooibos.Common ' * @returns {Function} - function pointer or invalid ' */ function getFunctionBruteForce(functionName) as object - if not Rooibos.Common.isNotEmptyString(functionName) then return invalid + if not Rooibos.Common.isNotEmptyString(functionName) + return invalid + end if 'bs:disable-next-line filenames = RBSFM_getFilenames() for i = 0 to filenames.count() - 1 @@ -313,6 +319,7 @@ namespace rooibos.Common text = "{" if not isFirst text = text + "," + 'bs:disable-next-line isFirst = false end if for each key in input @@ -516,8 +523,6 @@ namespace rooibos.Common if Rooibos.Common.eqValues(compareValue, value) return i end if - - item = array[i] next end if return -1 @@ -709,7 +714,9 @@ namespace rooibos.Common ' * @returns {boolean} - True if arrays are equal or False in other case. ' */ function eqArray(Value1, Value2) as dynamic - if not (Rooibos.Common.isArray(Value1)) or not Rooibos.Common.isArray(Value2) then return false + if not (Rooibos.Common.isArray(Value1)) or not Rooibos.Common.isArray(Value2) + return false + end if l1 = Value1.Count() l2 = Value2.Count() @@ -720,7 +727,7 @@ namespace rooibos.Common for i = 0 to l1 - 1 v1 = Value1[i] v2 = Value2[i] - if not Rooibos.Common.eqValues(v1, v2) then + if not Rooibos.Common.eqValues(v1, v2) return false end if end for diff --git a/framework/src/source/ConsoleTestReporter.bs b/framework/src/source/ConsoleTestReporter.bs index ebc108a1..5f85bcdf 100644 --- a/framework/src/source/ConsoleTestReporter.bs +++ b/framework/src/source/ConsoleTestReporter.bs @@ -105,14 +105,14 @@ namespace rooibos if test.isParamTest <> true messageLine = Rooibos.Common.fillText(" " + testChar + " |--" + test.name + " : ", ".", m.lineWidth) m.printLine(0, messageLine + test.result.getStatusText() + timeText) - m.printLine(0, " | " + insettext + " |--Test : " + testLocationText) + m.printLine(0, " | " + insetText + " |--Test : " + testLocationText) else if test.paramTestIndex = 0 name = test.name if len(name) > 1 and right(name, 1) = "0" name = left(name, len(name) - 1) end if m.printLine(0, " " + testChar + " |--" + name + " : ") - m.printLine(0, " | " + insettext + " |--Test : " + testLocationText) + m.printLine(0, " | " + insetText + " |--Test : " + testLocationText) end if locationText = "file://" + test.testSuite.filePath.trim() + ":" + locationLine @@ -134,28 +134,28 @@ namespace rooibos end if if test.result.isCrash - m.printLine(0, " | " + insettext + " |--Crashed at: " + locationText) - m.printStackTrace(insettext, test.result.error) + m.printLine(0, " | " + insetText + " |--Crashed at: " + locationText) + m.printStackTrace(insetText, test.result.error) m.printLine(0, " | ") else if test.result.isFail - m.printLine(0, " | " + insettext + " |--Failed at: " + locationText) + m.printLine(0, " | " + insetText + " |--Failed at: " + locationText) if test.isParamTest = true - m.printLine(0, " | " + insettext + " |--Param Line: " + StrI(test.paramLineNumber - 1).trim()) + m.printLine(0, " | " + insetText + " |--Param Line: " + StrI(test.paramLineNumber - 1).trim()) end if - m.printLine(0, " | " + insettext + " |--Error Message: " + test.result.message) + m.printLine(0, " | " + insetText + " |--Error Message: " + test.result.message) m.printLine(0, " | ") end if end function - function printStackTrace(insettext, error) - m.printLine(0, " | " + insettext + " |") - m.printLine(0, " | " + insettext + " |--Message: " + error.message) - m.printLine(0, " | " + insettext + " |--Stack trace: ") + function printStackTrace(insetText, error) + m.printLine(0, " | " + insetText + " |") + m.printLine(0, " | " + insetText + " |--Message: " + error.message) + m.printLine(0, " | " + insetText + " |--Stack trace: ") for i = error.backTrace.count() - 1 to 0 step -1 e = error.backTrace[i] if e.filename.instr("pkg:/source/rooibos") = -1 - m.printLine(0, " | " + insettext + " " + e.filename + "(" + stri(e.line_number).trim() + ")") + m.printLine(0, " | " + insetText + " " + e.filename + "(" + stri(e.line_number).trim() + ")") end if end for end function diff --git a/framework/src/source/Rooibos.bs b/framework/src/source/Rooibos.bs index aa3c1c44..d8b0b067 100644 --- a/framework/src/source/Rooibos.bs +++ b/framework/src/source/Rooibos.bs @@ -1,7 +1,6 @@ namespace rooibos function init() as void - args = {} - if createObject("roAPPInfo").IsDev() <> true then + if createObject("roAPPInfo").IsDev() <> true ? " not running in dev mode! - rooibos tests only support sideloaded builds - aborting" return end if @@ -25,11 +24,11 @@ namespace rooibos else ? "scene is ready; running tests now" - runner = new TestRunner(scene, m) + runner = new rooibos.TestRunner(scene, m) runner.Run() end if - while(true) + while true msg = wait(0, m.port) msgType = type(msg) if msgType = "roSGScreenEvent" @@ -40,7 +39,7 @@ namespace rooibos if msg.getField() = "isReadyToStartTests" and msg.getData() = true ? "scene is ready; running tests now" - runner = new TestRunner(scene, m) + runner = new rooibos.TestRunner(scene, m) runner.Run() end if end if diff --git a/framework/src/source/Test.bs b/framework/src/source/Test.bs index 549542da..c969438d 100644 --- a/framework/src/source/Test.bs +++ b/framework/src/source/Test.bs @@ -38,8 +38,7 @@ namespace rooibos m.name = m.name + stri(m.paramTestIndex) end if - m.result = new TestResult(m) - return this + m.result = new rooibos.TestResult(m) end function function run() diff --git a/framework/src/source/TestGroup.bs b/framework/src/source/TestGroup.bs index c86f396f..323871b6 100644 --- a/framework/src/source/TestGroup.bs +++ b/framework/src/source/TestGroup.bs @@ -47,7 +47,7 @@ namespace rooibos m.global = testSuite.global m.top = testSuite.top m.scene = testSuite.scene - m.stats = new Stats() + m.stats = new rooibos.Stats() end function '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -59,7 +59,7 @@ namespace rooibos if isOk for each testData in m.testsData - test = new Test(m, testData) + test = new rooibos.Test(m, testData) m.tests.push(test) isOk = m.runSuiteFunction(m.beforeEachFunctionName, "beforeEach", test) @@ -94,6 +94,7 @@ namespace rooibos return true catch error if test <> invalid + 'bs:disable-next-line test.result.crash("function " + methodName + "crashed!", error) end if end try @@ -102,6 +103,7 @@ namespace rooibos return true end if + 'bs:disable-next-line return false end function diff --git a/framework/src/source/TestRunner.bs b/framework/src/source/TestRunner.bs index ffb71195..5212b014 100644 --- a/framework/src/source/TestRunner.bs +++ b/framework/src/source/TestRunner.bs @@ -28,8 +28,8 @@ namespace rooibos m.nodeContext = nodeContext - m.stats = new Stats() - m.runtimeConfig = new RuntimeConfig() + m.stats = new rooibos.Stats() + m.runtimeConfig = new rooibos.RuntimeConfig() m.config = m.runtimeConfig.getRuntimeConfig() 'TODO - allow providing different reporters via config m.testReporter = new Rooibos.ConsoleTestReporter(m) @@ -47,7 +47,6 @@ namespace rooibos timer = createObject("roTimespan") timer.mark() suiteNames = m.runtimeConfig.getAllTestSuitesNames() - includedSuites = [] isFailed = false failedText = "" i = 0 @@ -87,7 +86,7 @@ namespace rooibos end if end for - if not isFailed + if not isFailed and testSuite <> invalid testSuite.scene.statusColor = "#238636" end if @@ -128,7 +127,7 @@ namespace rooibos ? "[ERROR] could not create test suite " ; nodeTestName end if - ? "ERROR! executing node test " + nodeTestName + " was unsuccesful." + ? "ERROR! executing node test " + nodeTestName + " was unsuccessful." return invalid end function diff --git a/framework/src/source/unused/CodeCoverageSupport.brs b/framework/src/source/unused/CodeCoverageSupport.brs index 58bb656b..e96096e5 100644 --- a/framework/src/source/unused/CodeCoverageSupport.brs +++ b/framework/src/source/unused/CodeCoverageSupport.brs @@ -24,8 +24,6 @@ function RBS_ReportCodeCoverage() as void resolvedPercent = (resolvedCount / expectedCount) * 100 hitFiles.push({percent:resolvedPercent, text:filename + ": " +str(resolvedPercent).trim() + "% (" + stri(resolvedCount).trim() + "/" + stri(expectedCount).trim() + ")"}) else - resolvedCount = 0 - resolvedPercent = 0 missFiles.push(filename + ": MISS!") end if end if diff --git a/package-lock.json b/package-lock.json index 06271c4d..134b2108 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,10 +5,10 @@ "requires": true, "packages": { "": { - "version": "4.4.0", "license": "MIT", "devDependencies": { - "brighterscript": "^0.39.0", + "@rokucommunity/bslint": "^0.5.0", + "brighterscript": "^0.45.2", "ropm": "^0.5.0" } }, @@ -53,6 +53,208 @@ "integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA==", "dev": true }, + "node_modules/@rokucommunity/bslint": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.5.0.tgz", + "integrity": "sha512-pJ/GU9eg7n0Vudnlk/IQCKhTJn4wKM8heynWvNjlFDdVJkjkIisaItA11kfz0tKyIO27AIjbJ6cz6Q2wbPAN9Q==", + "dev": true, + "dependencies": { + "brighterscript": "^0.39.1", + "fs-extra": "^10.0.0", + "jsonc-parser": "^2.3.0", + "minimatch": "^3.0.4", + "yargs": "^15.4.1" + }, + "bin": { + "bslint": "dist/cli.js" + } + }, + "node_modules/@rokucommunity/bslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@rokucommunity/bslint/node_modules/brighterscript": { + "version": "0.39.4", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.39.4.tgz", + "integrity": "sha512-VJR+6A+bMyRu4Fd+5xlSFAVSv4NtqNpkROZuS9x7pBGRqAjy6BBPjmSPOeRjK4TGv9CvaH3OD5ZYtsi2kaY1IA==", + "dev": true, + "dependencies": { + "@rokucommunity/bslib": "^0.1.1", + "@xml-tools/parser": "^1.0.7", + "array-flat-polyfill": "^1.0.1", + "chalk": "^2.4.2", + "chevrotain": "^7.0.1", + "chokidar": "^3.5.1", + "clear": "^0.1.0", + "cross-platform-clear-console": "^2.3.0", + "debounce-promise": "^3.1.0", + "eventemitter3": "^4.0.0", + "file-url": "^3.0.0", + "fs-extra": "^7.0.1", + "glob": "^7.1.6", + "jsonc-parser": "^2.3.0", + "long": "^3.2.0", + "luxon": "^1.8.3", + "minimatch": "^3.0.4", + "moment": "^2.23.0", + "p-settle": "^2.1.0", + "parse-ms": "^2.1.0", + "roku-deploy": "^3.4.1", + "serialize-error": "^7.0.1", + "source-map": "^0.7.3", + "vscode-languageserver": "7.0.0", + "vscode-languageserver-protocol": "3.16.0", + "vscode-languageserver-textdocument": "^1.0.1", + "vscode-uri": "^2.1.1", + "xml2js": "^0.4.19", + "yargs": "^16.2.0" + }, + "bin": { + "bsc": "dist/cli.js" + } + }, + "node_modules/@rokucommunity/bslint/node_modules/brighterscript/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@rokucommunity/bslint/node_modules/brighterscript/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@rokucommunity/bslint/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/@rokucommunity/bslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@rokucommunity/bslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@rokucommunity/bslint/node_modules/fs-extra": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@rokucommunity/bslint/node_modules/fs-extra/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@rokucommunity/bslint/node_modules/fs-extra/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@rokucommunity/bslint/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@rokucommunity/bslint/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@rokucommunity/bslint/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/@types/glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.4.tgz", @@ -286,9 +488,9 @@ } }, "node_modules/brighterscript": { - "version": "0.39.4", - "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.39.4.tgz", - "integrity": "sha512-VJR+6A+bMyRu4Fd+5xlSFAVSv4NtqNpkROZuS9x7pBGRqAjy6BBPjmSPOeRjK4TGv9CvaH3OD5ZYtsi2kaY1IA==", + "version": "0.45.2", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.45.2.tgz", + "integrity": "sha512-NGDpp2EKpzljSpXWNq2xELFspUos88bKNGC2jCEaybxwUdHgQi3A37dNqiPm08WIilJOb2JQZic4nx4dSp2sag==", "dev": true, "dependencies": { "@rokucommunity/bslib": "^0.1.1", @@ -311,7 +513,7 @@ "moment": "^2.23.0", "p-settle": "^2.1.0", "parse-ms": "^2.1.0", - "roku-deploy": "^3.4.1", + "roku-deploy": "^3.5.3", "serialize-error": "^7.0.1", "source-map": "^0.7.3", "vscode-languageserver": "7.0.0", @@ -1664,14 +1866,13 @@ } }, "node_modules/roku-deploy": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.4.1.tgz", - "integrity": "sha512-KomV/FvWv84f2Lh9V5c9stXCkGbM/L7B5cCLpNddBTlgh3zxyCAjEj2oFPYnzjbG+aNMvOpKatQ7Xx8bMJM03g==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.5.3.tgz", + "integrity": "sha512-a9J6aI2ASCYkDS7FrKSRre532nIXTdhJIOAxHqlWUC692OHlUpMDmQXBPujWX7geNQSG9Y/uJkHNbE+dJVAqgw==", "dev": true, "dependencies": { "chalk": "^2.4.2", "dateformat": "^3.0.3", - "eventemitter3": "^4.0.7", "fs-extra": "^7.0.1", "glob": "^7.1.6", "jsonc-parser": "^2.3.0", @@ -2253,6 +2454,173 @@ "integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA==", "dev": true }, + "@rokucommunity/bslint": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.5.0.tgz", + "integrity": "sha512-pJ/GU9eg7n0Vudnlk/IQCKhTJn4wKM8heynWvNjlFDdVJkjkIisaItA11kfz0tKyIO27AIjbJ6cz6Q2wbPAN9Q==", + "dev": true, + "requires": { + "brighterscript": "^0.39.1", + "fs-extra": "^10.0.0", + "jsonc-parser": "^2.3.0", + "minimatch": "^3.0.4", + "yargs": "^15.4.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "brighterscript": { + "version": "0.39.4", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.39.4.tgz", + "integrity": "sha512-VJR+6A+bMyRu4Fd+5xlSFAVSv4NtqNpkROZuS9x7pBGRqAjy6BBPjmSPOeRjK4TGv9CvaH3OD5ZYtsi2kaY1IA==", + "dev": true, + "requires": { + "@rokucommunity/bslib": "^0.1.1", + "@xml-tools/parser": "^1.0.7", + "array-flat-polyfill": "^1.0.1", + "chalk": "^2.4.2", + "chevrotain": "^7.0.1", + "chokidar": "^3.5.1", + "clear": "^0.1.0", + "cross-platform-clear-console": "^2.3.0", + "debounce-promise": "^3.1.0", + "eventemitter3": "^4.0.0", + "file-url": "^3.0.0", + "fs-extra": "^7.0.1", + "glob": "^7.1.6", + "jsonc-parser": "^2.3.0", + "long": "^3.2.0", + "luxon": "^1.8.3", + "minimatch": "^3.0.4", + "moment": "^2.23.0", + "p-settle": "^2.1.0", + "parse-ms": "^2.1.0", + "roku-deploy": "^3.4.1", + "serialize-error": "^7.0.1", + "source-map": "^0.7.3", + "vscode-languageserver": "7.0.0", + "vscode-languageserver-protocol": "3.16.0", + "vscode-languageserver-textdocument": "^1.0.1", + "vscode-uri": "^2.1.1", + "xml2js": "^0.4.19", + "yargs": "^16.2.0" + }, + "dependencies": { + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + } + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "fs-extra": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "dependencies": { + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + } + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true + } + } + }, "@types/glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.4.tgz", @@ -2449,9 +2817,9 @@ } }, "brighterscript": { - "version": "0.39.4", - "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.39.4.tgz", - "integrity": "sha512-VJR+6A+bMyRu4Fd+5xlSFAVSv4NtqNpkROZuS9x7pBGRqAjy6BBPjmSPOeRjK4TGv9CvaH3OD5ZYtsi2kaY1IA==", + "version": "0.45.2", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.45.2.tgz", + "integrity": "sha512-NGDpp2EKpzljSpXWNq2xELFspUos88bKNGC2jCEaybxwUdHgQi3A37dNqiPm08WIilJOb2JQZic4nx4dSp2sag==", "dev": true, "requires": { "@rokucommunity/bslib": "^0.1.1", @@ -2474,7 +2842,7 @@ "moment": "^2.23.0", "p-settle": "^2.1.0", "parse-ms": "^2.1.0", - "roku-deploy": "^3.4.1", + "roku-deploy": "^3.5.3", "serialize-error": "^7.0.1", "source-map": "^0.7.3", "vscode-languageserver": "7.0.0", @@ -3537,14 +3905,13 @@ } }, "roku-deploy": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.4.1.tgz", - "integrity": "sha512-KomV/FvWv84f2Lh9V5c9stXCkGbM/L7B5cCLpNddBTlgh3zxyCAjEj2oFPYnzjbG+aNMvOpKatQ7Xx8bMJM03g==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.5.3.tgz", + "integrity": "sha512-a9J6aI2ASCYkDS7FrKSRre532nIXTdhJIOAxHqlWUC692OHlUpMDmQXBPujWX7geNQSG9Y/uJkHNbE+dJVAqgw==", "dev": true, "requires": { "chalk": "^2.4.2", "dateformat": "^3.0.3", - "eventemitter3": "^4.0.7", "fs-extra": "^7.0.1", "glob": "^7.1.6", "jsonc-parser": "^2.3.0", diff --git a/package.json b/package.json index edacbdd0..960aade5 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "dist/**/!(manifest)*" ], "devDependencies": { - "brighterscript": "^0.39.0", + "@rokucommunity/bslint": "^0.5.0", + "brighterscript": "^0.45.2", "ropm": "^0.5.0" }, "repository": {