hermes-test 0.2.1 → 0.2.4
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/bin/hermes-test.js +6 -1
- package/package.json +5 -5
- package/src/harness.ts +4 -0
- package/src/store.ts +1 -0
package/bin/hermes-test.js
CHANGED
|
@@ -25,7 +25,12 @@ if (!pkg) {
|
|
|
25
25
|
|
|
26
26
|
let binPath;
|
|
27
27
|
try {
|
|
28
|
-
|
|
28
|
+
// Search from cwd and script dir so the platform package is found
|
|
29
|
+
// even when hoisted to a different node_modules in monorepos (bun/pnpm/yarn workspaces)
|
|
30
|
+
const resolved = require.resolve(`${pkg}/package.json`, {
|
|
31
|
+
paths: [process.cwd(), path.join(__dirname, "..")]
|
|
32
|
+
});
|
|
33
|
+
binPath = path.join(path.dirname(resolved), "bin", "hermes-test");
|
|
29
34
|
} catch {
|
|
30
35
|
console.error(`hermes-test: platform package ${pkg} not installed.`);
|
|
31
36
|
console.error(`Run: npm install --save-dev ${pkg}`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hermes-test",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.4",
|
|
4
|
+
"description": "26-64x faster than Jest. A test runner built for React Native and Expo. One esbuild pass, one process, zero Babel.",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"typesVersions": {
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"react": ">=18"
|
|
51
51
|
},
|
|
52
52
|
"optionalDependencies": {
|
|
53
|
-
"@hermes-test/darwin-arm64": "0.2.
|
|
54
|
-
"@hermes-test/darwin-x64": "0.2.
|
|
55
|
-
"@hermes-test/linux-x64": "0.2.
|
|
53
|
+
"@hermes-test/darwin-arm64": "0.2.4",
|
|
54
|
+
"@hermes-test/darwin-x64": "0.2.4",
|
|
55
|
+
"@hermes-test/linux-x64": "0.2.4"
|
|
56
56
|
},
|
|
57
57
|
"files": [
|
|
58
58
|
"src/",
|
package/src/harness.ts
CHANGED
|
@@ -340,6 +340,10 @@ function resetRegistry(): void {
|
|
|
340
340
|
beforeAllHooks.length = 0;
|
|
341
341
|
afterAllHooks.length = 0;
|
|
342
342
|
currentGroup = undefined;
|
|
343
|
+
// Clear mock and spy state for clean watch reruns
|
|
344
|
+
clearAllMocks();
|
|
345
|
+
if ((globalThis as any).__HT_file_mocks) (globalThis as any).__HT_file_mocks = {};
|
|
346
|
+
resetMockModulePatches();
|
|
343
347
|
}
|
|
344
348
|
|
|
345
349
|
// Expose to the global scope for the harness entry
|
package/src/store.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// withStore: quick identity-reducer store for any state shape
|
|
5
5
|
// withAppReducer: real app reducer with patchState + real actions
|
|
6
6
|
|
|
7
|
+
// @ts-nocheck
|
|
7
8
|
import React from 'react';
|
|
8
9
|
import { Provider } from 'react-redux';
|
|
9
10
|
import { configureStore } from '@reduxjs/toolkit';
|