Closed 7yl4r closed 8 years ago
Hi, @7yl4r
I made some corrections to the test drive robotics example in the docs site here: https://github.com/hybridgroup/cylon-site/commit/3f6dc7f16c7b6d28378710ffbb8dad3796fa6327
Thanks for pointing out that the example was not correct! It needed to be updated for a while.
Test Driven Robotics (TDR) is a subject that probably deserves an entire blog post/book on its own. However, please let me know if the above is sufficient to unblock you and close this particular issue.
Hello, one error happened when I update from 1.0.0 to 1.2.0 I am sure it is well when i use 1.0.0
Following is the error
> TypeError: Cannot read property 'IOT' of undefined
Following is my source code
Cylon.robot({
name: 'IOT',
description: 'Description is optional...'
.......
});
the error happened when i call that
Cylon.robots['IOT']
SORRY FOR MY POOR ENGLISH,TANKS
Hi, @llwoll the correct syntax is now:
Cylon.MCP.robots["IOT"];
The documentation was updated as part of https://github.com/hybridgroup/cylon-site/commit/3f6dc7f16c7b6d28378710ffbb8dad3796fa6327
Hope that helps!
Since this issue appears to be resolved, I am going to close it. Please reopen if needed.
Hi
I am still seeing this same issue. I copied the example exactly as it appears on the website but am getting the same error that @7yl4r described. Any chance you could help me?
Thanks
I've been trying to set up a basic robot along with a test, but am having some trouble. A few more examples which use testing would definitely help.
Here's a gist with my minimal robot.js and robot_test.js which is a stripped-down hello-world example. When I run the tests I get
I haven't quite been able to make sense of this, but I'm guessing I need to mock the connection?
I've also tried removing the
loopback
connection andping
device since they aren't really used and are just remnants from the hello world example. While the robot runs fine in this case, when running the test the robot seems to go uninstantiated:Some examples to clarify these issues would greatly help me (and possibly others) get started using cylon in a test-driven context.