Skip to content

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jun 17, 2025

Note

Mend has cancelled the proposed renaming of the Renovate GitHub app being renamed to mend[bot].

This notice will be removed on 2025-10-07.


This PR contains the following updates:

Package Change Age Confidence
babel-plugin-tester ^10.1.0 -> ^12.0.0 age confidence

Release Notes

babel-utils/babel-plugin-tester (babel-plugin-tester)

v12.0.0

Compare Source

💥 BREAKING CHANGES 💥
  • 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.

  • ResultFormatter is no longer synchronous and can now return a Promise.

  • Adoption of prettier@​3 requires some versions of Node to be executed with the --experimental-vm-modules option. 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.

✨ Features
  • Allow testing entire babel transform result via outputRaw ([e9d5aa1][4]) see [#​186][5]
  • Support collapsing/overwriting technically-illegal duplicate plugin/preset PluginItems ([bf0a088][6])
  • Upgrade to prettier@​3 ([3334248][7])
🪄 Fixes
  • readme: use proper codecov coverage badge ([1047e5c][8])
⚙️ Build System
  • Adopt @​-xun/symbiote ([89ec951][9])
  • deps: bump core-js from 3.40.0 to 3.42.0 ([879dd6b][10])
  • deps: bump core-js from 3.42.0 to 3.43.0 ([7590b87][11])
  • deps: bump debug from 4.4.0 to 4.4.1 ([3c2538c][12])
  • deps: bump prettier from 3.4.2 to 3.5.3 ([e0a29da][13])
  • deps: bump pretty-format from 29.7.0 to 30.0.0 ([7ea13c3][14])
  • deps: bump rejoinder from 1.2.5 to 2.0.1 ([76dcccd][15])
  • deps: bump type-fest from 4.32.0 to 4.41.0 ([bcbb568][16])
  • package: be more selective about which files are included during docs generation ([cbb4215][17])
  • package: bump minimum supported node versions to maintained ([ee6f7da][18])
  • release: add "master" branch to release branches ([03734ea][19])
  • Upgrade typescript-babel toolchain to nodenext ([d0b722f][21])
🧙🏿 Refactored
  • src: deprecated default exports are no longer available ([b02d4f0][22])

v11.0.4

Compare Source

💥 BREAKING CHANGES 💥
  • error no longer accepts arbitrary class constructors

    error (aka throws) no longer accepts arbitrary class constructors. Any provided class constructor must extend Error, e.g. built-ins like SyntaxError or custom error classes like class MyError extends Error. Thanks to the nature of JavaScript, **providing a class constructor that does not extend Error will lead to undefined behavior**.

  • error only captures exceptions from Babel

    error (aka throws) no longer potentially captures exceptions thrown by the formatResult function. If the formatResult function throws, the entire test will fail immediately.

  • TypeError for config error; AssertionError for test error

    All configuration-related issues now throw TypeError instead of AssertionError. AssertionError is 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.json and 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, fixture options.json (and options.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 via pluginOptions.

  • Global describe and it functions must be defined

    Babel-plugin-tester will refuse to run if describe, it, it.only, or it.skip are not globally available.

  • Global setup/teardown no longer overwrites local versions

    In previous versions of babel-plugin-tester, test-level setup and teardown functions overrode global setup and teardown functions. In this version of babel-plugin-tester, the global setup and teardown functions 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, and code. 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(...) and describe(...) were called and others being determined as Jest was executing the test. In this version, all configuration options are resolved and finalized before it(...) and describe(...) are called. This also means configurations are finalized _before_ hooks like beforeAll get called by the testing framework.

  • babelOptions.filename is now set to filepath by default rather than undefined.

  • 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 to undefined), 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][24]).

✨ Features
  • Add support for testing presets ([73b90b3][25])
  • Implement default filepath inference using Error stack trace ([9d1b321][26])
  • src: add exec/execFixture support via Node's VM module ([4754f42][27])
  • src: add support for "only", "skip", and "title" test options in fixtures ([#​90][28]) ([89b58b5][29])
  • src: add support for arbitrary run order of plugin under test ([#​91][30]) ([8c8b858][31])
  • src: add support for loading prettier configuration files in fixtures ([f54deda][32])
  • src: add TEST_SKIP/TEST_NUM_SKIP/TEST_ONLY/TEST_NUM_ONLY env variable support ([13626d1][33])
  • src: bring back (lightweight) plugin name inference ([#​92][34]) ([f9ad903][35])
  • src: implement titleNumbering and restartTitleNumbering options ([09e792d][36])
  • src: implement standard setup/teardown run order ([4ea283f][37])
  • src: provide debug output support via debug package ([4c7c6e7][38])
  • Windows support ([f214995][39])
🪄 Fixes
  • src: ensure test function errors are not swallowed by teardown function errors ([2acfe37][40])
  • src: fix fixtureOutputExt being ignored in root options.json ([#​89][41]) ([481be19][42])
  • src: fix plugin run order for fixtures to match tests ([#​88][43]) ([fbb6c19][44])
⚙️ Build System
🧙🏿 Refactored
  • Lodash.mergeWith customizer now allows unsetting options by setting them to undefined ([74af680][51])
  • Reorganize source into unified extensible tester pipeline w/ first-class fixtures support ([0c44392][52])

🏗️ Patch babel-plugin-tester[@​11.0.4][53] (2023-01-25)
🪄 Fixes
  • Ensure exec realm has access to context-sensitive versions of __filename and __dirname globals ([0306698][54])

🏗️ Patch babel-plugin-tester[@​11.0.3][55] (2023-01-24)
🪄 Fixes
  • Pass full file path to prettier::resolveConfig, not just the dirname ([e9ebcdd][56])

🏗️ Patch babel-plugin-tester[@​11.0.2][57] (2023-01-23)
🪄 Fixes
  • src: use cross-realm symbols ([330aa1e][58])
  • Use node-util import compatible with node@​14 ([2c4cd84][59])
⚙️ Build System
  • babel: explicitly include polyfills for shipped proposals ([850d58c][60])

🏗️ Patch babel-plugin-tester[@​11.0.1][61] (2023-01-18)
🪄 Fixes
  • src: ensure deprecated config option is still supported by prettierFormatter ([e48badf][62]) see [#​139][63]

v11.0.3

Compare Source

💥 BREAKING CHANGES 💥
  • error no longer accepts arbitrary class constructors

    error (aka throws) no longer accepts arbitrary class constructors. Any provided class constructor must extend Error, e.g. built-ins like SyntaxError or custom error classes like class MyError extends Error. Thanks to the nature of JavaScript, **providing a class constructor that does not extend Error will lead to undefined behavior**.

  • error only captures exceptions from Babel

    error (aka throws) no longer potentially captures exceptions thrown by the formatResult function. If the formatResult function throws, the entire test will fail immediately.

  • TypeError for config error; AssertionError for test error

    All configuration-related issues now throw TypeError instead of AssertionError. AssertionError is 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.json and 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, fixture options.json (and options.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 via pluginOptions.

  • Global describe and it functions must be defined

    Babel-plugin-tester will refuse to run if describe, it, it.only, or it.skip are not globally available.

  • Global setup/teardown no longer overwrites local versions

    In previous versions of babel-plugin-tester, test-level setup and teardown functions overrode global setup and teardown functions. In this version of babel-plugin-tester, the global setup and teardown functions 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, and code. 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(...) and describe(...) were called and others being determined as Jest was executing the test. In this version, all configuration options are resolved and finalized before it(...) and describe(...) are called. This also means configurations are finalized _before_ hooks like beforeAll get called by the testing framework.

  • babelOptions.filename is now set to filepath by default rather than undefined.

  • 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 to undefined), 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][24]).

✨ Features
  • Add support for testing presets ([73b90b3][25])
  • Implement default filepath inference using Error stack trace ([9d1b321][26])
  • src: add exec/execFixture support via Node's VM module ([4754f42][27])
  • src: add support for "only", "skip", and "title" test options in fixtures ([#​90][28]) ([89b58b5][29])
  • src: add support for arbitrary run order of plugin under test ([#​91][30]) ([8c8b858][31])
  • src: add support for loading prettier configuration files in fixtures ([f54deda][32])
  • src: add TEST_SKIP/TEST_NUM_SKIP/TEST_ONLY/TEST_NUM_ONLY env variable support ([13626d1][33])
  • src: bring back (lightweight) plugin name inference ([#​92][34]) ([f9ad903][35])
  • src: implement titleNumbering and restartTitleNumbering options ([09e792d][36])
  • src: implement standard setup/teardown run order ([4ea283f][37])
  • src: provide debug output support via debug package ([4c7c6e7][38])
  • Windows support ([f214995][39])
🪄 Fixes
  • src: ensure test function errors are not swallowed by teardown function errors ([2acfe37][40])
  • src: fix fixtureOutputExt being ignored in root options.json ([#​89][41]) ([481be19][42])
  • src: fix plugin run order for fixtures to match tests ([#​88][43]) ([fbb6c19][44])
⚙️ Build System
🧙🏿 Refactored
  • Lodash.mergeWith customizer now allows unsetting options by setting them to undefined ([74af680][51])
  • Reorganize source into unified extensible tester pipeline w/ first-class fixtures support ([0c44392][52])

🏗️ Patch babel-plugin-tester[@​11.0.4][53] (2023-01-25)
🪄 Fixes
  • Ensure exec realm has access to context-sensitive versions of __filename and __dirname globals ([0306698][54])

🏗️ Patch babel-plugin-tester[@​11.0.3][55] (2023-01-24)
🪄 Fixes
  • Pass full file path to prettier::resolveConfig, not just the dirname ([e9ebcdd][56])

🏗️ Patch babel-plugin-tester[@​11.0.2][57] (2023-01-23)
🪄 Fixes
  • src: use cross-realm symbols ([330aa1e][58])
  • Use node-util import compatible with node@​14 ([2c4cd84][59])
⚙️ Build System
  • babel: explicitly include polyfills for shipped proposals ([850d58c][60])

🏗️ Patch babel-plugin-tester[@​11.0.1][61] (2023-01-18)
🪄 Fixes
  • src: ensure deprecated config option is still supported by prettierFormatter ([e48badf][62]) see [#​139][63]

v11.0.2

Compare Source

💥 BREAKING CHANGES 💥
  • error no longer accepts arbitrary class constructors

    error (aka throws) no longer accepts arbitrary class constructors. Any provided class constructor must extend Error, e.g. built-ins like SyntaxError or custom error classes like class MyError extends Error. Thanks to the nature of JavaScript, **providing a class constructor that does not extend Error will lead to undefined behavior**.

  • error only captures exceptions from Babel

    error (aka throws) no longer potentially captures exceptions thrown by the formatResult function. If the formatResult function throws, the entire test will fail immediately.

  • TypeError for config error; AssertionError for test error

    All configuration-related issues now throw TypeError instead of AssertionError. AssertionError is 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.json and 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, fixture options.json (and options.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 via pluginOptions.

  • Global describe and it functions must be defined

    Babel-plugin-tester will refuse to run if describe, it, it.only, or it.skip are not globally available.

  • Global setup/teardown no longer overwrites local versions

    In previous versions of babel-plugin-tester, test-level setup and teardown functions overrode global setup and teardown functions. In this version of babel-plugin-tester, the global setup and teardown functions 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, and code. 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(...) and describe(...) were called and others being determined as Jest was executing the test. In this version, all configuration options are resolved and finalized before it(...) and describe(...) are called. This also means configurations are finalized _before_ hooks like beforeAll get called by the testing framework.

  • babelOptions.filename is now set to filepath by default rather than undefined.

  • 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 to undefined), 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][24]).

✨ Features
  • Add support for testing presets ([73b90b3][25])
  • Implement default filepath inference using Error stack trace ([9d1b321][26])
  • src: add exec/execFixture support via Node's VM module ([4754f42][27])
  • src: add support for "only", "skip", and "title" test options in fixtures ([#​90][28]) ([89b58b5][29])
  • src: add support for arbitrary run order of plugin under test ([#​91][30]) ([8c8b858][31])
  • src: add support for loading prettier configuration files in fixtures ([f54deda][32])
  • src: add TEST_SKIP/TEST_NUM_SKIP/TEST_ONLY/TEST_NUM_ONLY env variable support ([13626d1][33])
  • src: bring back (lightweight) plugin name inference ([#​92][34]) ([f9ad903][35])
  • src: implement titleNumbering and restartTitleNumbering options ([09e792d][36])
  • src: implement standard setup/teardown run order ([4ea283f][37])
  • src: provide debug output support via debug package ([4c7c6e7][38])
  • Windows support ([f214995][39])
🪄 Fixes
  • src: ensure test function errors are not swallowed by teardown function errors ([2acfe37][40])
  • src: fix fixtureOutputExt being ignored in root options.json ([#​89][41]) ([481be19][42])
  • src: fix plugin run order for fixtures to match tests ([#​88][43]) ([fbb6c19][44])
⚙️ Build System
🧙🏿 Refactored
  • Lodash.mergeWith customizer now allows unsetting options by setting them to undefined ([74af680][51])
  • Reorganize source into unified extensible tester pipeline w/ first-class fixtures support ([0c44392][52])

🏗️ Patch babel-plugin-tester[@​11.0.4][53] (2023-01-25)
🪄 Fixes
  • Ensure exec realm has access to context-sensitive versions of __filename and __dirname globals ([0306698][54])

🏗️ Patch babel-plugin-tester[@​11.0.3][55] (2023-01-24)
🪄 Fixes
  • Pass full file path to prettier::resolveConfig, not just the dirname ([e9ebcdd][56])

🏗️ Patch babel-plugin-tester[@​11.0.2][57] (2023-01-23)
🪄 Fixes
  • src: use cross-realm symbols ([330aa1e][58])
  • Use node-util import compatible with node@​14 ([2c4cd84][59])
⚙️ Build System
  • babel: explicitly include polyfills for shipped proposals ([850d58c][60])

🏗️ Patch babel-plugin-tester[@​11.0.1][61] (2023-01-18)
🪄 Fixes
  • src: ensure deprecated config option is still supported by prettierFormatter ([e48badf][62]) see [#​139][63]

v11.0.1

Compare Source

💥 BREAKING CHANGES 💥
  • error no longer accepts arbitrary class constructors

    error (aka throws) no longer accepts arbitrary class constructors. Any provided class constructor must extend Error, e.g. built-ins like SyntaxError or custom error classes like class MyError extends Error. Thanks to the nature of JavaScript, **providing a class constructor that does not extend Error will lead to undefined behavior**.

  • error only captures exceptions from Babel

    error (aka throws) no longer potentially captures exceptions thrown by the formatResult function. If the formatResult function throws, the entire test will fail immediately.

  • TypeError for config error; AssertionError for test error

    All configuration-related issues now throw TypeError instead of AssertionError. AssertionError is 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.json and 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, fixture options.json (and options.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 via pluginOptions.

  • Global describe and it functions must be defined

    Babel-plugin-tester will refuse to run if describe, it, it.only, or it.skip are not globally available.

  • Global setup/teardown no longer overwrites local versions

    In previous versions of babel-plugin-tester, test-level setup and teardown functions overrode global setup and teardown functions. In this version of babel-plugin-tester, the global setup and teardown functions 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, and code. 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(...) and describe(...) were called and others being determined as Jest was executing the test. In this version, all configuration options are resolved and finalized before it(...) and describe(...) are called. This also means configurations are finalized _before_ hooks like beforeAll get called by the testing framework.

  • babelOptions.filename is now set to filepath by default rather than undefined.

  • 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 to undefined), 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][24]).

✨ Features
  • Add support for testing presets ([73b90b3][25])
  • Implement default filepath inference using Error stack trace ([9d1b321][26])
  • src: add exec/execFixture support via Node's VM module ([4754f42][27])
  • src: add support for "only", "skip", and "title" test options in fixtures ([#​90][28]) ([89b58b5][29])
  • src: add support for arbitrary run order of plugin under test ([#​91][30]) ([8c8b858][31])
  • src: add support for loading prettier configuration files in fixtures ([f54deda][32])
  • src: add TEST_SKIP/TEST_NUM_SKIP/TEST_ONLY/TEST_NUM_ONLY env variable support ([13626d1][33])
  • src: bring back (lightweight) plugin name inference ([#​92][34]) ([f9ad903][35])
  • src: implement titleNumbering and restartTitleNumbering options ([09e792d][36])
  • src: implement standard setup/teardown run order ([4ea283f][37])
  • src: provide debug output support via debug package ([4c7c6e7][38])
  • Windows support ([f214995][39])
🪄 Fixes
  • src: ensure test function errors are not swallowed by teardown function errors ([2acfe37][40])
  • src: fix fixtureOutputExt being ignored in root options.json ([#​89][41]) ([481be19][42])
  • src: fix plugin run order for fixtures to match tests ([#​88][43]) ([fbb6c19][44])
⚙️ Build System
🧙🏿 Refactored
  • Lodash.mergeWith customizer now allows unsetting options by setting them to undefined ([74af680][51])
  • Reorganize source into unified extensible tester pipeline w/ first-class fixtures support ([0c44392][52])

🏗️ Patch babel-plugin-tester[@​11.0.4][53] (2023-01-25)
🪄 Fixes
  • Ensure exec realm has access to context-sensitive versions of __filename and __dirname globals ([0306698][54])

🏗️ Patch babel-plugin-tester[@​11.0.3][55] (2023-01-24)
🪄 Fixes
  • Pass full file path to prettier::resolveConfig, not just the dirname ([e9ebcdd][56])

🏗️ Patch babel-plugin-tester[@​11.0.2][57] (2023-01-23)
🪄 Fixes
  • src: use cross-realm symbols ([330aa1e][58])
  • Use node-util import compatible with node@​14 ([2c4cd84][59])
⚙️ Build System
  • babel: explicitly include polyfills for shipped proposals ([850d58c][60])

🏗️ Patch babel-plugin-tester[@​11.0.1][61] (2023-01-18)
🪄 Fixes
  • src: ensure deprecated config option is still supported by prettierFormatter ([e48badf][62]) see [#​139][63]

v11.0.0

Compare Source

💥 BREAKING CHANGES 💥
  • error no longer accepts arbitrary class constructors

    error (aka throws) no longer accepts arbitrary class constructors. Any provided class constructor must extend Error, e.g. built-ins like SyntaxError or custom error classes like class MyError extends Error. Thanks to the nature of JavaScript, **providing a class constructor that does not extend Error will lead to undefined behavior**.

  • error only captures exceptions from Babel

    error (aka throws) no longer potentially captures exceptions thrown by the formatResult function. If the formatResult function throws, the entire test will fail immediately.

  • TypeError for config error; AssertionError for test error

    All configuration-related issues now throw TypeError instead of AssertionError. AssertionError is 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.json and 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, fixture options.json (and options.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 via pluginOptions.

  • Global describe and it functions must be defined

    Babel-plugin-tester will refuse to run if describe, it, it.only, or it.skip are not globally available.

  • Global setup/teardown no longer overwrites local versions

    In previous versions of babel-plugin-tester, test-level setup and teardown functions overrode global setup and teardown functions. In this version of babel-plugin-tester, the global setup and teardown functions 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, and code. 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(...) and describe(...) were called and others being determined as Jest was executing the test. In this version, all configuration options are resolved and finalized before it(...) and describe(...) are called. This also means configurations are finalized _before_ hooks like beforeAll get called by the testing framework.

  • babelOptions.filename is now set to filepath by default rather than undefined.

  • 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 to undefined), 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][24]).

✨ Features
  • Add support for testing presets ([73b90b3][25])
  • Implement default filepath inference using Error stack trace ([9d1b321][26])
  • src: add exec/execFixture support via Node's VM module ([4754f42][27])
  • src: add support for "only", "skip", and "title" test options in fixtures ([#​90][28]) ([89b58b5][29])
  • src: add support for arbitrary run order of plugin under test ([#​91][30]) ([8c8b858][31])
  • src: add support for loading prettier configuration files in fixtures ([f54deda][32])
  • src: add TEST_SKIP/TEST_NUM_SKIP/TEST_ONLY/TEST_NUM_ONLY env variable support ([13626d1][33])
  • src: bring back (lightweight) plugin name inference ([#​92][34]) ([f9ad903][35])
  • src: implement titleNumbering and restartTitleNumbering options ([09e792d][36])
  • src: implement standard setup/teardown run order ([4ea283f][37])
  • src: provide debug output support via debug package ([4c7c6e7][38])
  • Windows support ([f214995][39])
🪄 Fixes
  • src: ensure test function errors are not swallowed by teardown function errors ([2acfe37][40])
  • src: fix fixtureOutputExt being ignored in root options.json ([#​89][41]) ([481be19][42])
  • src: fix plugin run order for fixtures to match tests ([#​88][43]) ([fbb6c19][44])
⚙️ Build System
🧙🏿 Refactored
  • Lodash.mergeWith customizer now allows unsetting options by setting them to undefined ([74af680][51])
  • Reorganize source into unified extensible tester pipeline w/ first-class fixtures support ([0c44392][52])

🏗️ Patch babel-plugin-tester[@​11.0.4][53] (2023-01-25)
🪄 Fixes
  • Ensure exec realm has access to context-sensitive versions of __filename and __dirname globals ([0306698][54])

🏗️ Patch babel-plugin-tester[@​11.0.3][55] (2023-01-24)
🪄 Fixes
  • Pass full file path to prettier::resolveConfig, not just the dirname ([e9ebcdd][56])

🏗️ Patch babel-plugin-tester[@​11.0.2][57] (2023-01-23)
🪄 Fixes
  • src: use cross-realm symbols ([330aa1e][58])
  • Use node-util import compatible with node@​14 ([2c4cd84][59])
⚙️ Build System
  • babel: explicitly include polyfills for shipped proposals ([850d58c][60])

🏗️ Patch babel-plugin-tester[@​11.0.1][61] (2023-01-18)
🪄 Fixes
  • src: ensure deprecated config option is still supported by prettierFormatter ([e48badf][62]) see [#​139][63]


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/babel-plugin-tester-12.x branch from cb5cc4c to 220f0f9 Compare August 10, 2025 13:47
@renovate renovate bot force-pushed the renovate/babel-plugin-tester-12.x branch from 220f0f9 to 7a0666d Compare August 19, 2025 14:44
@renovate renovate bot force-pushed the renovate/babel-plugin-tester-12.x branch from 7a0666d to f6e07a4 Compare August 31, 2025 11:10
@renovate renovate bot force-pushed the renovate/babel-plugin-tester-12.x branch from f6e07a4 to be2f1c8 Compare September 25, 2025 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants