crypto
crypto copied to clipboard
Environment for mocked component is wrong
Example:
In testcase.test.brs:
_brs_.mockComponent("DependencyComponent", {
helloWorld: function()
return m.top.subtype()
end function
})
In MyComponent.brs:
dep = createObject("roSGNode", "dependencyComponent")
print dep.helloWorld() ' => "MyComponent"
It seems like the environment isn't getting seeded correctly for a member method.
just want to add a note that brs has the same behavior if use dep.callFunc("helloWorld").