Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

ESM Unit

github.com

  • Web
6.4 Club score Visit github.com

What ESM Unit is

ESM Unit is a free, open-source tool for unit testing native ECMAScript modules in web browsers. It runs tests without bundling or transpilation, so test code must work as native browser modules. Each test file runs in an isolated iframe with its own window and DOM document; a failed test can be rerun separately using the browser’s Isolate control. The tool includes built-in assertions and can load other assertion libraries that work as browser ECMAScript modules. It reports coverage per file and allows configurable coverage thresholds. Its --watch option reruns tests when files change, but cannot be used with --debug. The project README shows tests running in Chrome, Firefox, and Safari; headless mode is supported in Chrome and Firefox. Parallel execution is supported, and the README recommends Sinon for stubs and mocks. ESM Unit requires Node 18 LTS or later and is installed as an npm development dependency. JSX and local relative imports that are not native ES modules need conversion before running. The project is Apache-2.0 licensed.

Who it suits

ESM Unit suits developers testing native ECMAScript modules in browsers without a build step. It is a fit when test code already runs as native browser modules or can be converted to do so.

Good to know, and what to watch

  • Runs browser tests without bundling or transpilation
  • Isolates each test file in an iframe
  • Includes per-file coverage and configurable thresholds
  • Supports parallel execution
  • Apache-2.0 licensed
  • Requires Node 18 LTS or later
  • JSX must be converted before running
  • Watch mode cannot be combined with debug mode
  • Headless mode is limited to Chrome and Firefox

The verdict

ESM Unit is aimed at browser-based tests for native ECMAScript modules, with isolation, coverage, and parallel execution. Code that depends on JSX or non-native local imports needs conversion first.

What the maker publishes

Assertions and mocks
It includes built-in assertions, supports other assertion libraries loadable as browser ECMAScript modules, and recommends Sinon for stubs and mocks. source
Browser execution
It runs tests in real browsers without bundling or transpilation. source
Browser support
The README shows running tests in Chrome, Firefox, and Safari; headless mode is supported only in Chrome and Firefox. source
Coverage
It supports per-file code coverage reports and configurable coverage thresholds. source
Debugging
A failed test can be rerun on its own by clicking “Isolate” in the browser window. source
Distribution
The README instructs users to install ESM Unit with npm as a development dependency. source
Founded
1983 source
Headquarters
Mountain View, California, United States source
Integrations
The README recommends Sinon for stubbing, mocking, and assertions against mocks. source
Intended users
The stated use case is developers who need to unit test native ECMAScript modules in web browsers. source
License
The repository identifies the project as Apache-2.0 licensed. source
License
The repository license identifies the software as Apache License 2.0 and states that it is provided without warranties or conditions. source
Maker
Intuit’s GitHub organization lists Mountain View, CA as its location. source
No build step
It runs tests in browsers without bundling or transpilation. source
Notable limitation
Code using JSX or imports that are not native ES modules from local relative paths must be converted before running. source
Purpose
ESM Unit is a unit testing tool for native ECMAScript modules in web browsers. source
Requirements
ESM Unit requires Node 18 LTS or later and test code that runs in current browsers as native ECMAScript modules without transpilation. source
Support
The project README invites users to open an issue or pull request and says it welcomes contributions. source
Test isolation
Each test file runs in an isolated iframe with its own window and DOM document. source
Watch mode
The --watch option reruns tests when files change, and cannot be used at the same time as --debug. source

Checked against the maker's pages on 8 Oct 2026.