ESM Unit
ESM Unit is a free, Apache-2.0 open-source tool for unit testing native ECMAScript modules in web browsers.
What ESM Unit is
ESM Unit is a free, Apache-2.0 open-source tool for unit testing native ECMAScript modules in web browsers. It runs tests in real browsers without bundling or transpilation, so test code must work as native browser modules. Each test file executes in an isolated iframe with its own window and DOM document. Failed tests can be rerun individually through the browser’s “Isolate” control. The tool provides built-in assertions, supports other assertion libraries that load as browser ECMAScript modules, and recommends Sinon for stubs and mocks. Per-file coverage reports and configurable thresholds are available. The --watch option reruns tests when files change, but cannot be combined with --debug. The README shows Chrome, Firefox, and Safari execution; headless mode works in Chrome and Firefox. Parallel execution is supported. ESM Unit requires Node 18 LTS or later and is installed as an npm development dependency. JSX and non-native local relative imports need conversion. Issues, pull requests, and contributions are welcomed.
Good
- Runs tests in real browsers without a build step
- Isolates each test file in its own iframe
- Provides per-file coverage and thresholds
- Supports parallel execution
- Open source under Apache-2.0
Watch out
- Requires Node 18 LTS or later
- JSX requires conversion before running
- Non-native local imports need conversion
- Headless mode is limited to Chrome and Firefox
Who it suits
ESM Unit suits developers who need browser-based unit tests for native ECMAScript modules. It is intended for projects that can run without transpilation or bundling.
Verdict
ESM Unit focuses on native browser-module testing with isolated execution, coverage, and familiar debugging controls. Its no-transpilation requirement suits browser-native code but adds preparation for JSX or incompatible imports.
The facts
Each one read from ESM Unit's own pages, with the date it was checked.
What it does
- Assertions and mocks
- It includes built-in assertions, supports other assertion libraries loadable as browser ECMAScript modules, and recommends Sinon for stubs and mocks.checked 8 Oct 2026
- Coverage
- It supports per-file code coverage reports and configurable coverage thresholds.checked 8 Oct 2026
- Debugging
- A failed test can be rerun on its own by clicking “Isolate” in the browser window.checked 8 Oct 2026
- Distribution
- The README instructs users to install ESM Unit with npm as a development dependency.checked 8 Oct 2026
- Integrations
- The README recommends Sinon for stubbing, mocking, and assertions against mocks.checked 8 Oct 2026
- Intended users
- The stated use case is developers who need to unit test native ECMAScript modules in web browsers.checked 8 Oct 2026
- License
- The repository license identifies the software as Apache License 2.0 and states that it is provided without warranties or conditions.checked 8 Oct 2026
- No build step
- It runs tests in browsers without bundling or transpilation.checked 8 Oct 2026
- Notable limitation
- Code using JSX or imports that are not native ES modules from local relative paths must be converted before running.checked 8 Oct 2026
- Purpose
- ESM Unit is a unit testing tool for native ECMAScript modules in web browsers.checked 8 Oct 2026
- Requirements
- ESM Unit requires Node 18 LTS or later and test code that runs in current browsers as native ECMAScript modules without transpilation.checked 8 Oct 2026
- Support
- The project README invites users to open an issue or pull request and says it welcomes contributions.checked 8 Oct 2026
- Test isolation
- Each test file runs in an isolated iframe with its own window and DOM document.checked 8 Oct 2026
- Watch mode
- The --watch option reruns tests when files change, and cannot be used at the same time as --debug.checked 8 Oct 2026
Where it runs
- Browser execution
- It runs tests in real browsers without bundling or transpilation.checked 8 Oct 2026
- Browser support
- The README shows running tests in Chrome, Firefox, and Safari; headless mode is supported only in Chrome and Firefox.checked 8 Oct 2026
The company
- Founded
- 1983checked 28 Sep 2026
- Headquarters
- Mountain View, California, United Stateschecked 28 Sep 2026
- Maker
- Intuit’s GitHub organization lists Mountain View, CA as its location.checked 8 Oct 2026
Alternatives to ESM Unit
- 1

QUnit
Free planAndroidiOSWebAPI7.4Free plan - 2

Web Test Runner
Free planWebLinuxmacOSSelf-hosted6.9Free plan - 3

Cucumber.js
Free planLinuxmacOSSelf-hostedWindows6.8Free plan - 4
Karma
Free planAndroidiOSWebLinux6.7Free plan - 5

Vitest
Free planWebLinuxmacOSWindows6.6Free plan - 6
Jasmine
Free planWebLinuxmacOSWindows6.5Free plan
