Unit testing with ComputerCraft, McFly, and CraftOS-PC

Unit testing is awesome . It helps you catch bugs early by ensuring all of the components of your program work as expected. Note: This guide is targeted towards experts who have advanced knowledge of ComputerCraft and know a few things about unit tests. Experience with unit tests in another language is helpful too, but isn’t required. CC: Tweaked contains a little-known unit testing framework called McFly, which describes itself as “a very basic test framework for ComputerCraft” drawing inspiration from the Busted framework for Lua. This post will function as an introduction to McFly, in the process providing instructions for running the tests inside of the CraftOS-PC emulator, suitable for running in a continuous integration pipeline.

Tomodachi94's Musings