@rbxts/rbxts-jest
v0.0.2
Published
rbxts-jest is a testing library for Roblox-TS
Downloads
213
Readme
rbxts-jest
rbxts-jest is a testing library made for Roblox-TS
Examples
import { test, expect, runTests } from "@rbxts/rbxts-jest";
test("add", () => {
const result = 2 + 2;
expect(result).toBe(4);
});
runTests();Additionally
If you want to write your tests in another folder (not in src/server, src/client or src/shared), for example in src/tests/server, src/tests/client, src/tests/shared, then you'll have to add this into your default.project.json
ServerScriptService:
"Tests": {
"$path": "out/tests/server"
}StarterPlayerScripts:
"Tests": {
"$path": "out/tests/client"
}ReplicatedStorage:
"Tests": {
"$path": "out/tests/shared"
}Note
You'll have to run the tests in Roblox-Studio / Start the game. Unfortunately you currently can't run the tests in VSCode by running npm run test or something like this.
