@exodus/test 1.0.0-rc.58 → 1.0.0-rc.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -2
- package/src/jest.config.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/test",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.59",
|
|
4
4
|
"author": "Exodus Movement, Inc.",
|
|
5
5
|
"description": "A test suite runner",
|
|
6
6
|
"homepage": "https://github.com/ExodusMovement/test",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
],
|
|
87
87
|
"scripts": {
|
|
88
88
|
"test": "npm run test:jest",
|
|
89
|
-
"test:all": "npm run test:jest && npm run test:tape && npm run test:native && npm run test:pure && npm run test:typescript && npm run test:fetch",
|
|
89
|
+
"test:all": "npm run test:jest && npm run test:tape && npm run test:native && npm run test:pure && npm run test:typescript && npm run test:fetch && npm run test:jsdom",
|
|
90
90
|
"test:native": "EXODUS_TEST_IGNORE='{**/typescript/**,**/jest-repo/**/user.test.js}' ./bin/index.js --jest 'tests/**/*.test.{js,cjs,mjs}'",
|
|
91
91
|
"test:typescript": "./bin/index.js --jest --typescript tests/typescript.test.ts",
|
|
92
92
|
"test:jest": "./bin/index.js --jest --esbuild",
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"test:bun": "EXODUS_TEST_ENGINE=bun:pure EXODUS_TEST_IGNORE='tests/jest-extended/**' npm run test",
|
|
96
96
|
"test:hermes": "EXODUS_TEST_ENGINE=hermes:bundle EXODUS_TEST_IGNORE='tests/{{jest-extended,inband}/**,jest-when/when.test.*,jest/jest.{mock,resetModules}.*}' npm run test",
|
|
97
97
|
"test:fetch": "./bin/index.js --jest --drop-network --engine node:pure tests/fetch.test.js tests/websocket.test.js",
|
|
98
|
+
"test:jsdom": "EXODUS_TEST_JEST_CONFIG='{\"testMatch\":[\"**/*.jsdom-test.js\"],\"testEnvironment\":\"jsdom\", \"rootDir\": \".\"}' ./bin/index.js --jest",
|
|
98
99
|
"coverage": "./bin/index.js --jest --esbuild --coverage",
|
|
99
100
|
"lint": "prettier --list-different . && eslint .",
|
|
100
101
|
"lint:fix": "prettier --write . && eslint --fix ."
|
package/src/jest.config.js
CHANGED
|
@@ -110,7 +110,10 @@ export async function installJestEnvironment(jestGlobals) {
|
|
|
110
110
|
}
|
|
111
111
|
} else if (config.rootDir) {
|
|
112
112
|
const { resolve } = await import('node:path')
|
|
113
|
-
|
|
113
|
+
const { createRequire } = await import('node:module')
|
|
114
|
+
const require = createRequire(resolve(config.rootDir, 'package.json'))
|
|
115
|
+
|
|
116
|
+
dynamicImport = (path) => import(require.resolve(path))
|
|
114
117
|
} else {
|
|
115
118
|
dynamicImport = async () => assert.fail('Unreachable: importing plugins without a rootDir')
|
|
116
119
|
}
|