agentsclimarketplace

Jest

Skill christopher-buss/skills/skills/jest

Write tests, mock functions, assert values, and configure test suites for Roblox/Luau code using Jest Roblox — a Luau port whose API diverges from JS Jest in subtle, non-obvious ways that LLM training data does not cover. Use whenever encountering Jest in Roblox/Luau code: editing .spec test files, calling jest.fn/jest.mock/spyOn, using describe/it/expect, or debugging Jest tests.From its SKILL.md

Install
npx -y skills add christopher-buss/skills --skill jest

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 8 stars8 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.0 KB, as published. Nobody here has run it

Based on Jest Roblox v3.x, generated 2026-02-07.

Jest Roblox is a Luau port of Jest for the Roblox platform. It closely follows the upstream Jest API but has critical deviations due to Luau language constraints.

Critical deviations from JS Jest:

  • .never instead of .not (reserved keyword)
  • jest.fn() returns two values: mock object + forwarding function
  • 0, "", {} are truthy in Luau (only false and nil are falsy)
  • All globals (describe, expect, jest, etc.) must be explicitly imported
  • .each uses table syntax, not tagged template literals
  • Custom matchers take self as first parameter

Read core-deviations first when working with this codebase.

Core References

TopicDescriptionReference
DeviationsAll Luau/Roblox differences from JS Jestcore-deviations
Test Structuredescribe, test/it, hooks, .each, .only/.skipcore-test-structure
MatcherstoBe, toEqual, toContain, toThrow, mock matcherscore-matchers
Asymmetric Matchersexpect.anything/any/nothing/callable, .resolves/.rejectscore-asymmetric-matchers
Mockingjest.fn(), spyOn, mock.calls, return valuescore-mocking
Configurationjest.config.lua, runCLI, reporters, optionscore-configuration

Features

Testing Patterns

TopicDescriptionReference
Async TestingPromises, done callbacks, .resolves/.rejectsfeature-async-testing
Custom Matchersexpect.extend(), self parameter, isNeverfeature-custom-matchers
Snapshot TestingtoMatchSnapshot, property matchers, serializersfeature-snapshot-testing
Test FilteringtestMatch, testPathPattern, testNamePatternfeature-test-filtering

Mocking

TopicDescriptionReference
Timer MocksuseFakeTimers, Roblox timers, engineFrameTimefeature-timer-mocks
Global Mocksjest.globalEnv, spyOn globals, library mocksfeature-global-mocks
Module Mockingjest.mock(), isolateModules, resetModulesfeature-module-mocking

Extended Matchers

TopicDescriptionReference
Jest ExtendedWhen core matchers aren't expressive enough: exact booleans, ranges, membership, entries, call order, side effectsfeature-jest-extended

Advanced

TopicDescriptionReference
Benchmarkingbenchmark(), Reporter, Profiler, CustomReportersadvanced-benchmarking

Keep looking

Skills are one crate of 610,677. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.