Run tests in a native Node.js ESM environment (#13966)

This commit is contained in:
Nicolò Ribaudo
2021-12-03 15:32:58 +01:00
committed by GitHub
parent 578ab22fb7
commit 2d989a983d
159 changed files with 1283 additions and 611 deletions

View File

@@ -0,0 +1,11 @@
import _cjs from "./lib/index.js";
const adapter = _cjs.default.bind();
// For backward compatibility with the CJS-only version, this makes
// import _x from "@babel/helper-plugin-test-runner"
// const x = _x.default
// still work.
adapter.default = _cjs.default;
export default adapter;

View File

@@ -13,6 +13,20 @@
"access": "public"
},
"main": "./lib/index.js",
"exports": {
".": [
{
"import": "./esm.mjs",
"default": "./lib/index.js"
},
"./lib/index.js"
],
"./lib": "./lib/index.js",
"./lib/index": "./lib/index.js",
"./lib/index.js": "./lib/index.js",
"./package": "./package.json",
"./package.json": "./package.json"
},
"dependencies": {
"@babel/helper-transform-fixture-test-runner": "workspace:^"
},