All notable changes to this project will be documented in this auto-generated file. The format is based on Conventional Commits; this project adheres to Semantic Versioning.
babel-plugin-tester@12.0.0 (2025-06-14)
-
Minimum supported Node.js version is now 20.18.0
-
Default exports are no longer available. See usage instructions for details on proper import syntax.
-
ResultFormatteris no longer synchronous and can now return aPromise. -
Adoption of prettier@3 requires some versions of Node to be executed with the
--experimental-vm-modulesoption. E.g.NODE_OPTIONS="--no-warnings --experimental-vm-modules" npx jest. -
Attempting to install babel-plugin-tester alongside jest@<30 will cause NPM to fail with
ERESOLVE. This is because only jest@>=30 (jest-snapshot) supports the prettier@3 asynchronous interface.
- Allow testing entire babel transform result via
outputRaw(e9d5aa1) see #186 - Support collapsing/overwriting technically-illegal duplicate plugin/preset
PluginItems (bf0a088) - Upgrade to prettier@3 (3334248)
- readme: use proper codecov coverage badge (1047e5c)
- Adopt @-xun/symbiote (89ec951)
- deps: bump core-js from 3.40.0 to 3.42.0 (879dd6b)
- deps: bump core-js from 3.42.0 to 3.43.0 (7590b87)
- deps: bump debug from 4.4.0 to 4.4.1 (3c2538c)
- deps: bump prettier from 3.4.2 to 3.5.3 (e0a29da)
- deps: bump pretty-format from 29.7.0 to 30.0.0 (7ea13c3)
- deps: bump rejoinder from 1.2.5 to 2.0.1 (76dcccd)
- deps: bump type-fest from 4.32.0 to 4.41.0 (bcbb568)
- package: be more selective about which files are included during docs generation (cbb4215)
- package: bump minimum supported node versions to maintained (ee6f7da)
- release: add "master" branch to release branches (03734ea)
- Upgrade typescript-babel toolchain to nodenext (d0b722f)
- src: deprecated default exports are no longer available (b02d4f0)
babel-plugin-tester@11.0.0 (2023-01-18)
-
errorno longer accepts arbitrary class constructorserror(akathrows) no longer accepts arbitrary class constructors. Any provided class constructor must extendError, e.g. built-ins likeSyntaxErroror custom error classes likeclass MyError extends Error. Thanks to the nature of JavaScript, **providing a class constructor that does not extendErrorwill lead to undefined behavior**. -
erroronly captures exceptions from Babelerror(akathrows) no longer potentially captures exceptions thrown by theformatResultfunction. If theformatResultfunction throws, the entire test will fail immediately. -
TypeErrorfor config error;AssertionErrorfor test errorAll configuration-related issues now throw
TypeErrorinstead ofAssertionError.AssertionErroris now exclusively used for failing tests. Additionally, the text of some error messages has been updated. -
All test titles are now numbered
All test titles are now numbered (e.g.
"1. ...","2. ...", etc), including fixtures tests and tests with custom titles. -
Built-in TypeScript support
TypeScript types are now included within the package itself, obviating the need to install a separate types package. Installing the old types package alongside this version of babel-plugin-tester will cause conflicts.
-
Fixture configuration schema is standardized
In previous versions of babel-plugin-tester, you could provide any key to
options.jsonand it would be passed as-is to the plugin under test. This made it impossible to allow fixtures to be configured with the same flexibility as test objects. In this version of babel-plugin-tester, fixtureoptions.json(andoptions.js) files must return a standard set of options. Non-standard properties are silently ignored. For instance: to pass options to the plugin under test, they must be provided viapluginOptions. -
Global
describeanditfunctions must be definedBabel-plugin-tester will refuse to run if
describe,it,it.only, orit.skipare not globally available. -
Global
setup/teardownno longer overwrites local versionsIn previous versions of babel-plugin-tester, test-level
setupandteardownfunctions overrode globalsetupandteardownfunctions. In this version of babel-plugin-tester, the globalsetupandteardownfunctions will be called alongside their test-level counterparts for each test and in a well-defined order (see documentation). -
Implicit "global" options merging is no longer supported
In previous versions of babel-plugin-tester, any test object and fixture configuration option could be passed directly to babel-plugin-tester and apply "globally" across all test objects and fixtures. This was even the case for options that made no sense in a "global" context, such as
only,skip, andcode. In this version of babel-plugin-tester, only options explicitly listed in the documentation can be passed directly and applied globally. Unrecognized "rest" options are silently ignored. -
Test/fixture configuration is resolved early and consistently
In previous versions of babel-plugin-tester, test object and fixture configuration options were resolved in various places, with some options getting finalized before
it(...)anddescribe(...)were called and others being determined as Jest was executing the test. In this version, all configuration options are resolved and finalized beforeit(...)anddescribe(...)are called. This also means configurations are finalized _before_ hooks likebeforeAllget called by the testing framework. -
babelOptions.filenameis now set tofilepathby default rather thanundefined. -
In previous versions, the lodash.mergeWith customizer skipped source properties that resolved to
undefined. With this version, the customizer now unsets these properties (sets them toundefined), allowing the end user to easily unset defaults (e.g.filename). -
Minimum recommended node version bumped from 10.13.0 to 14.20.0
-
Plugin names are once again automatically determined by analyzing the return value of the plugin function. Though this is implemented in a backwards-compatible way, there is a [small caveat](https://github.com/babel-utils/babel-plugin-tester#pluginname-inference-caveat).
- Add support for testing presets (73b90b3)
- Implement default filepath inference using Error stack trace (9d1b321)
- src: add
exec/execFixturesupport via Node's VM module (4754f42) - src: add support for "only", "skip", and "title" test options in fixtures (#90) (89b58b5)
- src: add support for arbitrary run order of plugin under test (#91) (8c8b858)
- src: add support for loading prettier configuration files in fixtures (f54deda)
- src: add TEST_SKIP/TEST_NUM_SKIP/TEST_ONLY/TEST_NUM_ONLY env variable support (13626d1)
- src: bring back (lightweight) plugin name inference (#92) (f9ad903)
- src: implement
titleNumberingandrestartTitleNumberingoptions (09e792d) - src: implement standard
setup/teardownrun order (4ea283f) - src: provide debug output support via debug package (4c7c6e7)
- Windows support (f214995)
- src: ensure test function errors are not swallowed by teardown function errors (2acfe37)
- src: fix fixtureOutputExt being ignored in root options.json (#89) (481be19)
- src: fix plugin run order for fixtures to match tests (#88) (fbb6c19)
- deps: bump prettier from 2.8.0 to 2.8.1 (#98) (0bdb351)
- package: restore @babel/core@7.11.6 as minimum supported version (00712c0)
- Transmute codebase to TypeScript (#96) (5f588e9)
- Update tooling (d5b4d9c)
- Lodash.mergeWith customizer now allows unsetting options by setting them to
undefined(74af680) - Reorganize source into unified extensible tester pipeline w/ first-class fixtures support (0c44392)
🏗️ Patch babel-plugin-tester@11.0.4 (2023-01-25)
- Ensure exec realm has access to context-sensitive versions of __filename and __dirname globals (0306698)
🏗️ Patch babel-plugin-tester@11.0.3 (2023-01-24)
- Pass full file path to prettier::resolveConfig, not just the dirname (e9ebcdd)
🏗️ Patch babel-plugin-tester@11.0.2 (2023-01-23)
- babel: explicitly include polyfills for shipped proposals (850d58c)
🏗️ Patch babel-plugin-tester@11.0.1 (2023-01-18)
babel-plugin-tester@10.1.0 (2021-05-29)
babel-plugin-tester@10.0.0 (2020-10-02)
- Plugin name inference is no longer supported
babel-plugin-tester@9.2.0 (2020-05-27)
babel-plugin-tester@9.1.0 (2020-05-20)
babel-plugin-tester@9.0.0 (2020-03-23)
- Requires Node >= 10.13.0
🏗️ Patch babel-plugin-tester@9.0.1 (2020-04-10)
babel-plugin-tester@8.0.0 (2019-11-15)
- Your snapshots will probably need to be updated with these changes. If you don't like the changes, then take a look at the README about overriding the formatResult and disabling the un-string snapshot serializer
🏗️ Patch babel-plugin-tester@8.0.1 (2019-12-01)
babel-plugin-tester@7.0.0 (2019-08-19)
- Require Node 8
- Update all the things (7c8296b)
🏗️ Patch babel-plugin-tester@7.0.4 (2019-11-14)
- Set configFile to false by default (7b97a6f)
🏗️ Patch babel-plugin-tester@7.0.3 (2019-11-11)
🏗️ Patch babel-plugin-tester@7.0.2 (2019-11-09)
🏗️ Patch babel-plugin-tester@7.0.1 (2019-08-19)
- Remove try/catch. (523fc9a)
babel-plugin-tester@6.5.0 (2019-08-18)
babel-plugin-tester@6.4.0 (2019-06-12)
babel-plugin-tester@6.3.0 (2019-06-12)
🏗️ Patch babel-plugin-tester@6.3.1 (2019-06-12)
babel-plugin-tester@6.2.0 (2019-05-12)
🏗️ Patch babel-plugin-tester@6.2.1 (2019-05-12)
babel-plugin-tester@6.1.0 (2019-05-04)
babel-plugin-tester@6.0.0 (2019-02-14)
- This upgrades to babel 7. You'll need to use babel 7 as well.
🏗️ Patch babel-plugin-tester@6.0.1 (2019-03-14)
babel-plugin-tester@5.5.0 (2018-08-05)
🏗️ Patch babel-plugin-tester@5.5.2 (2018-11-17)
🏗️ Patch babel-plugin-tester@5.5.1 (2018-08-17)
babel-plugin-tester@5.4.0 (2018-06-10)
babel-plugin-tester@5.3.0 (2018-06-04)
babel-plugin-tester@5.2.0 (2018-06-04)
babel-plugin-tester@5.1.0 (2018-06-02)
babel-plugin-tester@5.0.0 (2017-11-25)
- You'll have to install
babel-coreyourself now.
babel-plugin-tester@4.0.0 (2017-08-16)
- Your snapshots will break (for the better). Just update them. Nothing else changed.
babel-plugin-tester@3.3.0 (2017-07-18)
babel-plugin-tester@3.2.0 (2017-06-30)
🏗️ Patch babel-plugin-tester@3.2.2 (2017-07-06)
🏗️ Patch babel-plugin-tester@3.2.1 (2017-07-05)
- Assert should be (actual, expected) (9fcb418)
babel-plugin-tester@3.1.0 (2017-06-12)
babel-plugin-tester@3.0.0 (2017-05-23)
- Default parser options changed to remove recast
babel-plugin-tester@2.0.0 (2017-05-19)
-
fixtureshas been repurposed. See the docs. -
modifierhas been removed, useonlyandskipinstead
- errors: add errors config (#5) (c157316)
- fixtures: add
fixturesdirectory (#6) (6e1554d) - tests: add
onlyandskip, removemodifier(#7) (ad1d1b1)
babel-plugin-tester@1.1.0 (2017-05-16)
- tests: add object API (df54a40)
🏗️ Patch babel-plugin-tester@1.1.1 (2017-05-16)
- Properly deindent and trim code and output (eb60549)
babel-plugin-tester@1.0.0 (2017-05-16)
- lib: initial release (fe80771)