function init()
print "init() called"
end function
tests/MyComponent.test.brs:
function main(args as object) as object
return roca(args).describe("A sample test suite", sub()
m.it("has a task", sub()
test = CreateObject("roSGNode", "MyComponent")
m.assert.isValid(test, "Should be valid")
end sub)
end sub)
end function
Running the test always fails with the following output:
m.assert.isValid: Should be valid
+ expected - actual
-null
+non-invalid
at m.assert.isValid (src/tests/MyComponent.test.brs:5:12)
Whenever I try creating another type of object, for instance CreateObject("roDeviceInfo"), then the test succeeds.
I'm trying to test a custom component, using the following code:
components/MyComponent.xml
:components/MyComponent.brs
:tests/MyComponent.test.brs
:Running the test always fails with the following output:
Whenever I try creating another type of object, for instance
CreateObject("roDeviceInfo")
, then the test succeeds.