YolkLab
yolkbot uses tests to make sure the codebase works. These can help you!
Anytime we change something related to, say, movement, we run the move.test.js
file to make sure movement still works cleanly. If we change big things, we run all of the test files to make sure the code works cleanly. These test files document usage of the codebase, and are a great way to see examples of yolkbot
- it’s literally yolkbot
in action! By this point, there’s a test that contains nearly every dispatch, and other dispatches have examples of how to listen for things, or check attributes on the bot
.
Tests are named so that you can figure out what they do easily. You can find all of the tests in the labs/
folder on:
https://github.com/yolkorg/yolklab
Tests are SUPER great for beginners since they provide really nice examples that are broken down and easy to read/figure out. Try reading some, they make any Bot incredibly easy to understand.