Jest Lua can currently only run inside of Roblox. Help is wanted to get it running in other Lua environments, such as Lune or Luvit. See issue #2.
Roblox uses Jest Lua internally for testing their apps, in-game core scripts, built-in Roblox Studio plugins, as well as libraries like Roact Navigation. This library should be considered battle-tested and ready for production use.
Add this package to your dev-dependencies
in your wally.toml
, for example:
JestGlobals = "jsdotlua/[email protected]"
Then, require anything you need from JestGlobals
:
local JestGlobals = require("@Packages/JestGlobals")
local expect = JestGlobals.expect
Jest Lua is a Lua port of the open source JavaScript testing framework Jest. Modules in the modules
directory are aligned to v27.4.7 of Jest.
Contributions are welcome! See CONTRIBUTING.md for information.
Jest Lua is available under the MIT license. See LICENSE for details.