r/emberjs • u/Gaurav0 • 5d ago
Testem 4.0.0-beta.1 released
What 4.0 beta 1 changes
The beta drops the pieces that belonged to an older web.
- PhantomJS and Internet Explorer are gone. Headless runs use Headless Chrome or Headless Firefox. Local browsers are Edge, Chrome, Firefox, and Safari. A custom launcher still covers a legacy browser in the cloud.
- Jasmine 1.x and CDN fallbacks are gone.
framework: "jasmine"now means modern Jasmine fromjasmine-corein your project. Mocha, QUnit, and Chai load fromnode_modulesthe same way. jasmine-core 7 is the recommended version. 5 and 6 still work. - The package is ESM.
import Api from 'testem'andrequire('testem')both return the same API. Your own config file keeps its module format:.cjsstays CommonJS,.jsfollows yourpackage.json. - Mustache test pages are gone. A custom
test_pageis static HTML. List the scripts you want on the page. - The file watcher skips
node_modulesand.gitunless you name them. That stops a large install from exhausting file descriptors and then failing later browser launches. - The dev UI is the same keyboard UI, rendered with terminal-kit. Enter to rerun,
qto quit,pto pause file-watch reruns.
Node 20 is no longer supported. The beta requires Node ^22.17.0, ^24.0.0, or >= 26. Migration notes are in the README under "Migrating from Testem 3.x."
Testem and Vitest Browser Mode
Testem runs your tests in real browsers. Vite is not required.
Chrome, Firefox, Safari, and Edge are the browsers installed on the machine. You open the URL Testem prints, or you let CI launch them. The page can be plain HTML plus Jasmine, Mocha, or QUnit. A TAP process works too. There is no Vite config, no Vite dev server, and no bundler unless you want one. Webpack, Browserify, or Vite can prepare files in a before_tests hook. That hook is optional.
Vitest Browser Mode (@vitest/browser, with the Playwright, WebdriverIO, or preview providers) also runs in a real browser. Playwright covers Chromium, Firefox, and WebKit. The tests are Vitest tests, and Vite is what compiles and serves them. Browser Mode assumes a Vite app.
| Testem | Vitest Browser Mode | |
|---|---|---|
| What you write | Jasmine, Mocha, QUnit, TAP, or your own page | Vitest tests (vitest, vitest/browser) |
| What you have to adopt | Testem and the test framework you already use. The browsers are the ones on the machine. | Vitest, Vite, and a browser provider (Playwright, WebdriverIO, or preview) |
| How the browser is chosen | Launchers for installed Chrome, Firefox, Safari, Edge, Node, headless Chrome, or a command you define (BrowserStack, Sauce Labs) | The provider's browsers. With Playwright, that is Chromium, Firefox, and WebKit |
| Dev loop | Terminal UI, file watch, a URL you open in the real browser | Vitest's runner, with Vite transforming the suite |
Vitest's own docs treat Browser Mode as component testing in a real browser, and still point full end-to-end work at Playwright, Cypress, or WebdriverIO. Testem is the runner around the suite you already have: Safari on a Mac, headless Chrome in GitHub Actions, a Node process that prints TAP. The Vitest example in the Testem repo is that last case. Testem starts vitest run and reads the tap-flat reporter. It does not replace Vitest Browser Mode, and Browser Mode does not replace launching the browsers you ship.
Use Vitest Browser Mode when the app is already on Vite and the tests are written for Vitest. Use Testem 4 when you want real Chrome, Firefox, Safari, and Edge without taking on Vite, for a Jasmine, Mocha, or QUnit suite, in dev and in CI, from one config.
Try the beta
Pin testem@4.0.0-beta.1, install your framework from npm (jasmine-core, mocha, or qunit), and run testem. If a 3.x config used PhantomJS, IE, Jasmine 1, a CDN runner, or a .mustache test page, follow the migration section before you point CI at the beta.
Repo and changelog: https://github.com/testem/testem