Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd to documentation for writing unit tests #856
Comments
|
There is no recommended way. You have a couple of options: Write your tests in TS with a TS/JS Test Framework (jest, mocha....) For Example if you use a lua game engine and want to write a dungeon generator. You can write your dungeon generator without using any lua functions declared by the game engine.
Use a Lua test framework Use a JS Lua vm |
|
To elaborate on the Lua test framework option: Using its definitions would mean the following workflow:
|
It would be great to see the documentation describe how to write unit tests when the code is written in TS but needing to run in Lua (due to for example dependencies).
I found the following TS definitions for busted (lua unit testing framework) but is this the recommended way to write unit tests?
https://github.com/hazzard993/busted-tstl