# @quenty/jestutils

> Jest testing utilities for Nevermore packages

Latest version **1.1.0** (published 2026-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @quenty/jestutils
pnpm add @quenty/jestutils
yarn add @quenty/jestutils
bun add @quenty/jestutils
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2026-08-28 |
| First published | 2026-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 11.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 611 |
| Maintainers | quenty |
| Keywords | Roblox, Nevermore, Lua, jestutils |

## Links

- npm: https://www.npmjs.com/package/@quenty/jestutils
- Repository: https://github.com/Quenty/NevermoreEngine
- Homepage: https://github.com/Quenty/NevermoreEngine#readme
- Issues: https://github.com/Quenty/NevermoreEngine/issues
- Funding: https://www.patreon.com/quenty
- npm.io page: https://npm.io/package/@quenty/jestutils

## Dependencies (4)

- [@quenty/maid](https://npm.io/package/@quenty/maid.md) 3.12.0
- [@quenty/loader](https://npm.io/package/@quenty/loader.md) 10.11.1
- [@quentystudios/jest-lua](https://npm.io/package/@quentystudios/jest-lua.md) 3.10.0-quenty.2
- [@quenty/nevermore-test-runner](https://npm.io/package/@quenty/nevermore-test-runner.md) 1.6.0

## Recent versions

- 1.1.0 (latest) — 2026-08-28

## README

## JestUtils

<div align="center">
  <a href="http://quenty.github.io/NevermoreEngine/">
    <img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/docs.yml/badge.svg" alt="Documentation status" />
  </a>
  <a href="https://discord.gg/mhtGUS8">
    <img src="https://img.shields.io/discord/385151591524597761?color=5865F2&label=discord&logo=discord&logoColor=white" alt="Discord" />
  </a>
  <a href="https://github.com/Quenty/NevermoreEngine/actions">
    <img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/build.yml/badge.svg" alt="Build and release status" />
  </a>
</div>

Jest testing utilities for Nevermore packages

<div align="center"><a href="https://quenty.github.io/NevermoreEngine/api/JestUtils">View docs →</a></div>

## Installation

```
npm install @quenty/jestutils --save
```

## Usage

`JestUtils.afterThis` queues a maid task next to the code that needs undoing. The queue unwinds in
reverse once the current test finishes, pass or fail, so teardown mirrors setup.

```lua
local Jest = require("Jest")
local JestUtils = require("JestUtils")

local expect = Jest.Globals.expect
local it = Jest.Globals.it

it("reads back what it wrote", function()
	local store = DataStore.new()
	JestUtils.afterThis(store)

	local handle = store:GetHandle()
	JestUtils.afterThis(handle)

	expect(handle:Read()).toEqual(nil)
end)
```

Anything a [Maid](https://quenty.github.io/NevermoreEngine/api/Maid) accepts works: a function, an
`Instance`, an `RBXScriptConnection`, a thread, or a table with a `Destroy` method.

It returns a function that unqueues the task again, which is itself a maid task. An object that
cleans up on its own can hand that back to its own maid so it is never destroyed twice:

```lua
local maid = Maid.new()
maid:GiveTask(JestUtils.afterThis(maid))
```

---
_Source: https://npm.io/package/@quenty/jestutils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
