Open-source project
testem/testem avatar
testem/testem

Testem: a 4.0 beta line beside 3.21.x, and engines that skip two Node lines

Test'em 'Scripts! A test runner that makes Javascript unit testing fun.

2,914 stars416 forksJavaScriptMIT
1

At a glance

What is it?
Testem runs your tests in real desktop browsers and in Node, watching files with chokidar and driving everything from a keyboard interface. Its repository state is the interesting part: the manifest declares 4.0.0-beta.3 and releases run both v4.0.0-beta.3 and v3.21.5, and the supported Node range skips the 23 and 25 lines entirely.
Who is it for?
Testem earns its place when you want one command that runs the same specs in Chrome, Firefox, Safari and Edge, or in Node, without committing to a test framework's own browser story. Decide two things before you adopt it.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • testem/testem2,914 ★ · -4
Star history
Repository2026-09-252026-11-15
testem/testem2.9k2.9k

-4 Stars in the last 51 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The manifest is on 4.0 beta while the newest tag is 3.21.3

package.json declares version 4.0.0-beta.3, and the newest releases are v4.0.0-beta.3 and v4.0.0-beta.2 (both 2026-10-26) alongside v3.21.5 (2026-10-26), so a 4.0 beta line and the 3.21 line are both being published. Anyone reading the repository to answer a support question has to know which line they are looking at. The root also carries CHANGELOG.md and CONTRIBUTING.md, and the package is published under the name testem with the description Test'em 'scripts! JavaScript unit testing made easy., authored by Toby Ho, licensed MIT, with the repository field pointing at github.com/testem/testem.

The supported Node range skips the 23 and 25 lines

The engines field is the one to read before installing:

json
{
  "node": "^22.17.0 || ^24.0.0 || >= 26.0.0"
}

Three disjoint pieces rather than a single range, and the omissions are deliberate or at least visible: caret on 22 pins the 22 line from 22.17.0 upwards, caret on 24 covers the 24 line, and the last piece takes 26 and everything after it. That leaves Node 23 and Node 25 outside the declared support, on a cadence where those are real releases people run. The page states the same requirement in prose and points at package.json as the place the range lives, which is the right way round, and it frames a supported Node.js runtime as the only prerequisite for installation.

Install it twice and let the global command defer to the local copy

The recommended install is unusual and deliberate:

bash
npm install testem --save-dev
npm install testem -g

Both, with the stated reason that the local dependency pins a version for the project while the global install keeps the testem command on your PATH. The resolution rule is spelled out too: when the global binary runs inside a directory that has its own testem installed, the CLI automatically re-runs the local copy so the version matches package.json, and TESTEM_USE_GLOBAL=1 forces the global binary when you need it. That inverts the usual expectation that a global tool wins, and it is why the documentation can use the bare testem command in every example without pinning a version in the prose.

The page calls the package an ES module and then shows require

The programmatic section opens by stating that Testem's package is an ES module, and then shows both forms side by side. One example imports it and starts CI with a launcher name:

javascript
import Api from 'testem';

const api = new Api();
api.startCI({ launch: 'Headless Chrome' });

The other uses require, starts development mode instead, and the text adds that require('testem') stays synchronous. The README says both forms return the same `Api` class. The rest of the contract is clean: startDev, startCI and startServer correspond to the CLI modes, and deep paths such as testem/lib/config.js are explicitly not part of the package exports.

Watching covers the working directory and skips node_modules by default

File watching is implemented with chokidar (the README says v5, while package.json requires ^6.0.0) and is driven by four configuration keys. src_files holds the glob patterns whose changes trigger a run and defaults to *.js when unset, watch_files adds extra patterns, src_files_ignore excludes patterns such as dist/**, and disable_watching turns the watcher off entirely. The scope is the current working directory, with include and ignore patterns applied to the watcher's events, so you do not have to enumerate files. The default skip is the part with teeth: the watcher does not descend into node_modules or .git, and naming a folder in src_files or watch_files lifts that skip for that tree, while .git stays skipped:

json
{
  "src_files": ["lib/**/*.js", "tests/**/*.js"],
  "watch_files": ["node_modules/my-pkg/**/*.js"]
}

For a monorepo that means linked packages do not trigger reruns until you name them.

The keyboard interface is a documented list of single keys

Development mode is driven entirely from the keyboard, and the page enumerates the keys rather than leaving them to discovery. ENTER runs the tests, q quits, and p pauses or unpauses the file-watch reruns, which is the key that separates stopping a run from suspending the watch loop. The left and right arrows move between browser tabs, so a multi-browser run is navigable without a mouse. The rest act on the target text panel: TAB switches it between the top and bottom halves of a split panel, the up and down arrows scroll, SPACE pages down, b pages up, d moves half a page down and u half a page up.

The test scripts name their own runners and open coverage with open

The scripts block is where the project's own dogfooding shows. The unit suite is mocha over two glob patterns, tests/*_tests.js and tests/**/*_tests.js, and test:verbose re-runs the same command with TESTEM_VERBOSE=1 set in the environment. Coverage wraps that command, generates an HTML report and then calls open on cover_html/index.html, which is the macOS launcher, so the last step of the coverage workflow is platform-specific even though the run itself is not. Integration tests have their own entry point at bin/run-integration.js, there is a Safari smoke script under scripts/, and two TUI scripts exist, one dogfooding the interface and one running it end to end through tests/tui-e2e/run.mjs with a beta devDependency on @microsoft/tui-test. The browser suite changes directory into an examples subdirectory and runs ../../testem.js ci -d.

Fourteen dependencies cover the server, the watcher and the terminal

The thirteen runtime dependencies explain the architecture more directly than the feature list does. On the server side there is express at 5, compression and socket.io, with httpxy for proxying. The process layer is execa, and the configuration layer is commander with js-yaml and picomatch for globs. Watching is chokidar (^6.0.0 in package.json). The output side brings in tap-parser and @xmldom/xmldom. The terminal interface comes from terminal-kit and desktop notifications from toasted-notifier.. The published files array is lib, public, README.md, testem.js, assets and package.json.

Editorial conclusion

Testem earns its place when you want one command that runs the same specs in Chrome, Firefox, Safari and Edge, or in Node, without committing to a test framework's own browser story. Decide two things before you adopt it. Which line you are pinning, because releases currently include both v4.0.0-beta.3 and v3.21.5, so check which major version your install resolves to. And which Node you run, since the declared range is three disjoint pieces and leaves 23 and 25 out, which matters on a release cadence that alternates them. The installation advice is sound even if unusual: install locally and globally, and let the global command defer to the local copy so the version in package.json wins.

Frequently asked questions

Which Node versions does testem support?

The engines field in package.json declares ^22.17.0 || ^24.0.0 || >= 26.0.0, so the 22 line from 22.17.0, the whole 24 line, and 26 or newer. Node 23 and Node 25 fall outside that range. The page repeats the same requirement and points at package.json as the source.

Should testem be installed globally or as a dev dependency?

The page recommends both, with npm install testem --save-dev and npm install testem -g, so the project pins a version and the command is always on your PATH. Running the global testem inside a project that has a local install automatically re-runs the local copy, and TESTEM_USE_GLOBAL=1 forces the global binary instead.

Which test frameworks work with testem?

It is framework agnostic: Jasmine, QUnit and Mocha are named, with others supported through custom test framework adapters. The default runner is modern Jasmine via jasmine-core, and you switch by setting framework in testem.json and installing the matching packages. Preprocessors listed include Babel, TypeScript, Browserify, ESLint, JSHint, JSLint and CoffeeScript.

How do I make testem rerun when a linked package changes?

The watcher does not descend into node_modules or .git by default, and it covers the current working directory. Name the folder in src_files or watch_files to lift that skip, using a pattern that contains node_modules, while .git stays skipped. src_files defaults to *.js when unset, src_files_ignore excludes patterns, and disable_watching turns the watcher off.

Can testem be used programmatically?

Yes. The page describes the package as an ES module and shows both an import and a require example returning the same Api class, with startDev, startCI and startServer matching the CLI modes and require('testem') staying synchronous. Deep paths such as testem/lib/config.js are not part of the package exports..

Official sources

  1. Issues
  2. License: MIT
  3. README
  4. Releases
  5. testem/testem on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/testem-testem.svg)](https://hysenlabs.com/projects/testem-testem)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/testem-testem.svg)](https://hysenlabs.com/projects/testem-testem)

Was this useful?

1
Community notes

Community notes

Gaurav Munjal

Hi, Daisy In a repository, main/master represents the latest approved and merged code, not even the latest beta. In testem, 3.21.3 is the latest stable version, 4.0beta1 is the beta of the next version, and the main/master branch is even later than that. That is typical for most projects on Github. npm install testem -> get testem 3.21.3 npm install testem@beta -> get testem 4.0.0-beta.1 Also, node 23 and node 25 are no longer supported by the makers of node.js, they are end of life. See https://nodejs.org/en/about/previous-releases They were never promoted to LTS (Long Term Stable) support, so they only got six months of support rather than 3 years that LTS releases do. It is unusual for applications to support dependencies that their makers no longer support. I appreciate the review, but find it strange that you've called these issues out in your headline as if they are unusual or unique to testem. Thanks, Gaurav Munjal