@react-native-harness/jest 1.1.0-rc.1 → 1.1.0-rc.2

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.
Files changed (68) hide show
  1. package/dist/__tests__/harness-cache.test.d.ts +2 -0
  2. package/dist/__tests__/harness-cache.test.d.ts.map +1 -0
  3. package/dist/__tests__/harness-cache.test.js +51 -0
  4. package/dist/__tests__/harness.test.js +340 -47
  5. package/dist/__tests__/index.test.d.ts +2 -0
  6. package/dist/__tests__/index.test.d.ts.map +1 -0
  7. package/dist/__tests__/index.test.js +42 -0
  8. package/dist/cli-args.d.ts +1 -0
  9. package/dist/cli-args.d.ts.map +1 -1
  10. package/dist/cli-args.js +5 -0
  11. package/dist/crash-supervisor.d.ts.map +1 -1
  12. package/dist/crash-supervisor.js +7 -6
  13. package/dist/errors.d.ts +1 -0
  14. package/dist/errors.d.ts.map +1 -1
  15. package/dist/errors.js +1 -0
  16. package/dist/harness.d.ts +23 -1
  17. package/dist/harness.d.ts.map +1 -1
  18. package/dist/harness.js +396 -50
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +205 -58
  21. package/dist/logs.d.ts +1 -0
  22. package/dist/logs.d.ts.map +1 -1
  23. package/dist/logs.js +3 -0
  24. package/dist/run.d.ts +7 -1
  25. package/dist/run.d.ts.map +1 -1
  26. package/dist/run.js +13 -8
  27. package/dist/setup.d.ts.map +1 -1
  28. package/dist/setup.js +18 -2
  29. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  30. package/package.json +7 -6
  31. package/src/__tests__/harness-cache.test.ts +74 -0
  32. package/src/__tests__/harness.test.ts +469 -51
  33. package/src/__tests__/index.test.ts +61 -0
  34. package/src/cli-args.ts +6 -0
  35. package/src/crash-supervisor.ts +13 -6
  36. package/src/env.d.ts +1 -1
  37. package/src/errors.ts +5 -0
  38. package/src/harness.ts +504 -58
  39. package/src/index.ts +276 -64
  40. package/src/logs.ts +4 -0
  41. package/src/run.ts +20 -10
  42. package/src/setup.ts +22 -1
  43. package/tsconfig.json +3 -3
  44. package/tsconfig.lib.json +6 -6
  45. package/dist/cli-args.test.d.ts +0 -2
  46. package/dist/cli-args.test.d.ts.map +0 -1
  47. package/dist/cli-args.test.js +0 -1
  48. package/dist/crash-monitor.d.ts +0 -16
  49. package/dist/crash-monitor.d.ts.map +0 -1
  50. package/dist/crash-monitor.js +0 -75
  51. package/dist/event-mapper.d.ts +0 -16
  52. package/dist/event-mapper.d.ts.map +0 -1
  53. package/dist/event-mapper.js +0 -120
  54. package/dist/global-setup.d.ts +0 -3
  55. package/dist/global-setup.d.ts.map +0 -1
  56. package/dist/global-setup.js +0 -60
  57. package/dist/global-teardown.d.ts +0 -3
  58. package/dist/global-teardown.d.ts.map +0 -1
  59. package/dist/global-teardown.js +0 -11
  60. package/dist/harness-reporter.d.ts +0 -8
  61. package/dist/harness-reporter.d.ts.map +0 -1
  62. package/dist/harness-reporter.js +0 -12
  63. package/dist/jest-options.d.ts +0 -2
  64. package/dist/jest-options.d.ts.map +0 -1
  65. package/dist/jest-options.js +0 -1
  66. package/dist/types.d.ts +0 -17
  67. package/dist/types.d.ts.map +0 -1
  68. package/dist/types.js +0 -1
package/src/index.ts CHANGED
@@ -11,13 +11,40 @@ import type {
11
11
  import pLimit from 'p-limit';
12
12
  import { runHarnessTestFile } from './run.js';
13
13
  import { Config as HarnessConfig } from '@react-native-harness/config';
14
- import { type Harness } from './harness.js';
14
+ import { type Harness, type HarnessRunState } from './harness.js';
15
15
  import { setup } from './setup.js';
16
16
  import { teardown } from './teardown.js';
17
17
  import { HarnessError } from '@react-native-harness/tools';
18
18
  import { getErrorMessage } from './logs.js';
19
19
  import { DeviceNotRespondingError } from '@react-native-harness/bridge/server';
20
- import { NativeCrashError } from './errors.js';
20
+ import { NativeCrashError, StartupStallError } from './errors.js';
21
+ import { logger } from '@react-native-harness/tools';
22
+ import { randomUUID } from 'node:crypto';
23
+ import path from 'node:path';
24
+
25
+ const runLogger = logger.child('run');
26
+
27
+ const createRunSummary = () => ({
28
+ passed: 0,
29
+ failed: 0,
30
+ skipped: 0,
31
+ todo: 0,
32
+ });
33
+
34
+ const applyJestResultToSummary = (
35
+ summary: ReturnType<typeof createRunSummary>,
36
+ result: {
37
+ numPassingTests: number;
38
+ numFailingTests: number;
39
+ numPendingTests: number;
40
+ numTodoTests: number;
41
+ }
42
+ ) => {
43
+ summary.passed += result.numPassingTests;
44
+ summary.failed += result.numFailingTests;
45
+ summary.skipped += result.numPendingTests;
46
+ summary.todo += result.numTodoTests;
47
+ };
21
48
 
22
49
  class CancelRun extends Error {
23
50
  constructor(message?: string) {
@@ -87,81 +114,266 @@ export default class JestHarness implements CallbackTestRunnerInterface {
87
114
  ): Promise<void> {
88
115
  const mutex = pLimit(1);
89
116
  let isFirstTest = true;
117
+ const startTime = Date.now();
118
+ const runId = randomUUID();
119
+ const watchMode = this.#globalConfig.watch || this.#globalConfig.watchAll;
120
+ const rootDir = this.#globalConfig.rootDir ?? process.cwd();
121
+ const testFiles = tests.map((test) =>
122
+ path.relative(rootDir, test.path)
123
+ );
124
+ const summary = createRunSummary();
125
+ const updateRunState = (overrides: Partial<HarnessRunState> = {}) => {
126
+ const nextRunState: HarnessRunState = {
127
+ runId,
128
+ startTime,
129
+ testFiles,
130
+ watchMode,
131
+ coverageEnabled: this.#globalConfig.collectCoverage,
132
+ summary,
133
+ status: summary.failed > 0 ? 'failed' : 'passed',
134
+ ...overrides,
135
+ };
136
+
137
+ harness.setRunState(nextRunState);
138
+ return nextRunState;
139
+ };
140
+
141
+ updateRunState();
142
+ runLogger.debug(
143
+ 'run started: runId=%s files=%d watchMode=%s coverage=%s',
144
+ runId,
145
+ testFiles.length,
146
+ watchMode,
147
+ this.#globalConfig.collectCoverage
148
+ );
149
+ await harness.callHook('run:started', {
150
+ runId,
151
+ startTime,
152
+ testFiles,
153
+ watchMode,
154
+ coverageEnabled: this.#globalConfig.collectCoverage,
155
+ });
156
+ await harness.callHook('metro:initialized', {
157
+ runId,
158
+ port: harnessConfig.metroPort,
159
+ host: harnessConfig.host?.trim() || undefined,
160
+ });
161
+
162
+ try {
163
+ await tests.reduce(
164
+ (promise, test) =>
165
+ mutex(() => {
166
+ let didApplySummary = false;
167
+
168
+ return promise
169
+ .then(async () => {
170
+ const relativeTestPath = path.relative(
171
+ rootDir,
172
+ test.path
173
+ );
174
+ const testFileStartedAt = Date.now();
175
+ let didEmitTestFileFinished = false;
176
+
177
+ await harness.callHook('test-file:started', {
178
+ runId,
179
+ file: relativeTestPath,
180
+ });
181
+ runLogger.debug('test file started: %s', relativeTestPath);
182
+
183
+ const emitTestFileFinished = async (options: {
184
+ status: 'passed' | 'failed' | 'skipped' | 'todo';
185
+ duration: number;
186
+ result: Awaited<ReturnType<typeof runHarnessTestFile>>['harnessResult'] | null;
187
+ }) => {
188
+ didEmitTestFileFinished = true;
189
+ runLogger.debug(
190
+ 'test file finished: %s status=%s duration=%dms',
191
+ relativeTestPath,
192
+ options.status,
193
+ options.duration
194
+ );
195
+ await harness.callHook('test-file:finished', {
196
+ runId,
197
+ file: relativeTestPath,
198
+ duration: options.duration,
199
+ status: options.status,
200
+ result: options.result,
201
+ });
202
+ };
203
+
204
+ try {
205
+ if (watcher.isInterrupted()) {
206
+ throw new CancelRun();
207
+ }
208
+
209
+ if (
210
+ harnessConfig.resetEnvironmentBetweenTestFiles &&
211
+ !isFirstTest
212
+ ) {
213
+ runLogger.debug(
214
+ 'resetting environment before %s',
215
+ relativeTestPath
216
+ );
217
+ await harness.restart(test.path);
218
+ }
219
+ isFirstTest = false;
220
+
221
+ const result = await onStart(test).then(async () => {
222
+ if (!harnessConfig.detectNativeCrashes) {
223
+ runLogger.debug(
224
+ 'native crash detection disabled for %s',
225
+ relativeTestPath
226
+ );
227
+ await harness.ensureAppReady(test.path);
228
+ return runHarnessTestFile({
229
+ testPath: test.path,
230
+ harness,
231
+ globalConfig: this.#globalConfig,
232
+ projectConfig: test.context.config,
233
+ });
234
+ }
235
+
236
+ await harness.ensureAppReady(test.path);
237
+ harness.crashSupervisor.beginTestRun(test.path);
238
+ runLogger.debug(
239
+ 'native crash detection armed for %s',
240
+ relativeTestPath
241
+ );
242
+ const crashPromise =
243
+ harness.crashSupervisor.waitForCrash(test.path);
244
+
245
+ try {
246
+ return await Promise.race([
247
+ runHarnessTestFile({
248
+ testPath: test.path,
249
+ harness,
250
+ globalConfig: this.#globalConfig,
251
+ projectConfig: test.context.config,
252
+ }),
253
+ crashPromise,
254
+ ]);
255
+ } finally {
256
+ harness.crashSupervisor.cancelCrashWaiters();
257
+ }
258
+ });
259
+
260
+ applyJestResultToSummary(summary, result.jestResult);
261
+ didApplySummary = true;
262
+ updateRunState();
263
+ await emitTestFileFinished({
264
+ status: result.harnessResult.status,
265
+ duration: result.duration,
266
+ result: result.harnessResult,
267
+ });
90
268
 
91
- return tests.reduce(
92
- (promise, test) =>
93
- mutex(() =>
94
- promise
95
- .then(async () => {
96
- if (watcher.isInterrupted()) {
97
- throw new CancelRun();
98
- }
269
+ return result;
270
+ } catch (error) {
271
+ if (!didEmitTestFileFinished) {
272
+ await emitTestFileFinished({
273
+ status: 'failed',
274
+ duration: Date.now() - testFileStartedAt,
275
+ result: null,
276
+ });
277
+ }
278
+
279
+ throw error;
280
+ }
281
+ })
282
+ .then(async (result) => {
283
+ if (!result) {
284
+ return;
285
+ }
99
286
 
287
+ await onResult(test, result.jestResult);
288
+ })
289
+ .catch(async (err) => {
100
290
  if (
101
- harnessConfig.resetEnvironmentBetweenTestFiles &&
102
- !isFirstTest
291
+ err instanceof NativeCrashError ||
292
+ err instanceof StartupStallError ||
293
+ err instanceof DeviceNotRespondingError
103
294
  ) {
104
- await harness.restart(test.path);
295
+ runLogger.debug(
296
+ 'classified runtime failure for %s: %s',
297
+ test.path,
298
+ err.name
299
+ );
300
+ summary.failed += 1;
301
+ updateRunState();
105
302
  }
106
- isFirstTest = false;
107
-
108
- return onStart(test).then(async () => {
109
- if (!harnessConfig.detectNativeCrashes) {
110
- await harness.ensureAppReady(test.path);
111
- return runHarnessTestFile({
112
- testPath: test.path,
113
- harness,
114
- globalConfig: this.#globalConfig,
115
- projectConfig: test.context.config,
303
+
304
+ if (err instanceof NativeCrashError) {
305
+ harness.crashSupervisor.reset();
306
+ onFailure(test, {
307
+ message: err.message,
308
+ stack: '',
116
309
  });
117
- }
118
310
 
119
- await harness.ensureAppReady(test.path);
120
- harness.crashSupervisor.beginTestRun(test.path);
121
- const crashPromise = harness.crashSupervisor.waitForCrash(test.path);
311
+ return;
312
+ }
122
313
 
123
- try {
124
- const result = await Promise.race([
125
- runHarnessTestFile({
126
- testPath: test.path,
127
- harness,
128
- globalConfig: this.#globalConfig,
129
- projectConfig: test.context.config,
130
- }),
131
- crashPromise,
132
- ]);
314
+ if (err instanceof StartupStallError) {
315
+ onFailure(test, {
316
+ message: err.message,
317
+ stack: '',
318
+ });
133
319
 
134
- return result;
135
- } finally {
136
- harness.crashSupervisor.cancelCrashWaiters();
320
+ return;
137
321
  }
138
- });
139
- })
140
- .then((result) => onResult(test, result))
141
- .catch(async (err) => {
142
- if (err instanceof NativeCrashError) {
143
- harness.crashSupervisor.reset();
144
- onFailure(test, {
145
- message: err.message,
146
- stack: '',
147
- });
148
322
 
149
- return;
150
- }
323
+ if (err instanceof DeviceNotRespondingError) {
324
+ onFailure(test, {
325
+ message: err.message,
326
+ stack: '',
327
+ });
151
328
 
152
- if (err instanceof DeviceNotRespondingError) {
153
- onFailure(test, {
154
- message: err.message,
155
- stack: '',
156
- });
329
+ return;
330
+ }
157
331
 
158
- return;
159
- }
332
+ if (!(err instanceof CancelRun) && !didApplySummary) {
333
+ summary.failed += 1;
334
+ }
335
+ updateRunState({ error: err });
336
+ onFailure(test, err);
337
+ });
338
+ }),
339
+ Promise.resolve()
340
+ );
160
341
 
161
- onFailure(test, err);
162
- })
163
- ),
164
- Promise.resolve()
165
- );
342
+ const runState = updateRunState();
343
+ runLogger.debug(
344
+ 'run finished: runId=%s status=%s duration=%dms',
345
+ runId,
346
+ runState.status ?? 'passed',
347
+ Date.now() - startTime
348
+ );
349
+ await harness.callHook('run:finished', {
350
+ runId,
351
+ startTime,
352
+ duration: Date.now() - startTime,
353
+ testFiles,
354
+ summary,
355
+ status: runState.status ?? 'passed',
356
+ });
357
+ } catch (error) {
358
+ const runState = updateRunState({
359
+ error,
360
+ status: 'failed',
361
+ });
362
+ runLogger.debug(
363
+ 'run failed: runId=%s status=%s',
364
+ runId,
365
+ runState.status ?? 'failed'
366
+ );
367
+ await harness.callHook('run:finished', {
368
+ runId,
369
+ startTime,
370
+ duration: Date.now() - startTime,
371
+ testFiles,
372
+ summary,
373
+ status: runState.status ?? 'failed',
374
+ error,
375
+ });
376
+ throw error;
377
+ }
166
378
  }
167
379
  }
package/src/logs.ts CHANGED
@@ -31,6 +31,10 @@ export const logMetroPrewarmCompleted = (runner: HarnessPlatform): void => {
31
31
  );
32
32
  };
33
33
 
34
+ export const logMetroCacheReused = (runner: HarnessPlatform): void => {
35
+ log(`${TAG} Reusing Metro cache for ${chalk.bold(runner.name)}\n`);
36
+ };
37
+
34
38
  export const getErrorMessage = (error: HarnessError): string => {
35
39
  return `${ERROR_TAG} ${error.message}\n`;
36
40
  };
package/src/run.ts CHANGED
@@ -65,7 +65,12 @@ export type RunHarnessTestFile = (options: {
65
65
  harness: Harness;
66
66
  projectConfig: JestConfig.ProjectConfig;
67
67
  globalConfig: JestConfig.GlobalConfig;
68
- }) => Promise<JestTestResult>;
68
+ }) => Promise<{
69
+ jestResult: JestTestResult;
70
+ harnessResult: HarnessTestSuiteResult;
71
+ relativeTestPath: string;
72
+ duration: number;
73
+ }>;
69
74
 
70
75
  export const runHarnessTestFile: RunHarnessTestFile = async ({
71
76
  testPath,
@@ -84,7 +89,7 @@ export const runHarnessTestFile: RunHarnessTestFile = async ({
84
89
  (setupFile) => path.relative(globalConfig.rootDir, setupFile)
85
90
  );
86
91
 
87
- const results = await harness.runTests(relativeTestPath, {
92
+ const harnessResult = await harness.runTests(relativeTestPath, {
88
93
  testNamePattern: globalConfig.testNamePattern,
89
94
  setupFiles,
90
95
  setupFilesAfterEnv,
@@ -92,7 +97,7 @@ export const runHarnessTestFile: RunHarnessTestFile = async ({
92
97
  });
93
98
  const end = Date.now();
94
99
 
95
- const allTests = flattenTests(results);
100
+ const allTests = flattenTests(harnessResult);
96
101
  const stats = calculateStats(allTests);
97
102
 
98
103
  // Convert TestResult[] to the format expected by toTestResult
@@ -115,12 +120,12 @@ export const runHarnessTestFile: RunHarnessTestFile = async ({
115
120
  });
116
121
 
117
122
  // Check if the entire suite was skipped
118
- const skipped = results.status === 'skipped';
123
+ const skipped = harnessResult.status === 'skipped';
119
124
 
120
125
  // Get error message from suite if it failed
121
- const errorMessage = results.error?.message || null;
126
+ const errorMessage = harnessResult.error?.message || null;
122
127
 
123
- const totalResults = toTestResult({
128
+ const jestResult = toTestResult({
124
129
  stats: {
125
130
  failures: stats.failures,
126
131
  pending: stats.pending,
@@ -133,15 +138,20 @@ export const runHarnessTestFile: RunHarnessTestFile = async ({
133
138
  errorMessage,
134
139
  tests,
135
140
  jestTestPath: testPath,
136
- coverage: results.coverage as JestTestResult['coverage'],
141
+ coverage: harnessResult.coverage as JestTestResult['coverage'],
137
142
  });
138
143
 
139
- totalResults.failureMessage = formatResultsErrors(
140
- totalResults.testResults,
144
+ jestResult.failureMessage = formatResultsErrors(
145
+ jestResult.testResults,
141
146
  projectConfig,
142
147
  globalConfig,
143
148
  testPath
144
149
  );
145
150
 
146
- return totalResults;
151
+ return {
152
+ jestResult,
153
+ harnessResult,
154
+ relativeTestPath,
155
+ duration: end - start,
156
+ };
147
157
  };
package/src/setup.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  getConfig,
3
3
  type Config as HarnessConfig,
4
+ ConfigSchema,
4
5
  } from '@react-native-harness/config';
5
6
  import type { Config as JestConfig } from 'jest-runner';
6
7
  import { getHarness } from './harness.js';
@@ -9,12 +10,17 @@ import { getAdditionalCliArgs, HarnessCliArgs } from './cli-args.js';
9
10
  import { logTestEnvironmentReady, logTestRunHeader } from './logs.js';
10
11
  import { NoRunnerSpecifiedError, RunnerNotFoundError } from './errors.js';
11
12
  import { HarnessPlatform } from '@react-native-harness/platforms';
13
+ import { logger } from '@react-native-harness/tools';
14
+
15
+ const setupLogger = logger.child('setup');
12
16
 
13
17
  const getHarnessConfig = async (
14
18
  globalConfig: JestConfig.GlobalConfig
15
19
  ): Promise<HarnessConfig> => {
16
20
  const projectRoot = globalConfig.rootDir;
21
+ setupLogger.debug('loading Harness config from %s', projectRoot);
17
22
  const { config: harnessConfig } = await getConfig(projectRoot);
23
+ setupLogger.debug('loaded Harness config');
18
24
  return harnessConfig;
19
25
  };
20
26
 
@@ -36,12 +42,13 @@ const getHarnessRunner = (
36
42
  throw new RunnerNotFoundError(selectedRunnerName);
37
43
  }
38
44
 
45
+ setupLogger.debug('selected runner %s (%s)', runner.name, runner.platformId);
39
46
  return runner;
40
47
  };
41
48
 
42
49
  export const setup = async (globalConfig: JestConfig.GlobalConfig) => {
43
50
  preRunMessage.remove(process.stderr);
44
- const harnessConfig =
51
+ let harnessConfig =
45
52
  global.HARNESS_CONFIG ?? (await getHarnessConfig(globalConfig));
46
53
 
47
54
  if (global.HARNESS) {
@@ -57,6 +64,15 @@ export const setup = async (globalConfig: JestConfig.GlobalConfig) => {
57
64
  });
58
65
 
59
66
  const cliArgs = getAdditionalCliArgs();
67
+
68
+ if (cliArgs.metroPort != null) {
69
+ setupLogger.debug('applying CLI metro port override: %d', cliArgs.metroPort);
70
+ harnessConfig = ConfigSchema.parse({
71
+ ...harnessConfig,
72
+ metroPort: cliArgs.metroPort,
73
+ });
74
+ }
75
+
60
76
  const selectedRunner = getHarnessRunner(harnessConfig, cliArgs);
61
77
 
62
78
  if (globalConfig.collectCoverage) {
@@ -67,19 +83,24 @@ export const setup = async (globalConfig: JestConfig.GlobalConfig) => {
67
83
  if (harnessConfig.coverage?.root) {
68
84
  process.env.RN_HARNESS_COVERAGE_ROOT = harnessConfig.coverage.root;
69
85
  }
86
+
87
+ setupLogger.debug('coverage enabled for this run');
70
88
  }
71
89
 
72
90
  if (harnessConfig.disableViewFlattening) {
73
91
  process.env.RN_HARNESS_VIEW_FLATTENING = 'false';
92
+ setupLogger.debug('view flattening disabled for runtime');
74
93
  }
75
94
 
76
95
  logTestRunHeader(selectedRunner);
96
+ setupLogger.debug('creating Harness instance');
77
97
  const harness = await getHarness(
78
98
  harnessConfig,
79
99
  selectedRunner,
80
100
  globalConfig.rootDir
81
101
  );
82
102
  logTestEnvironmentReady(selectedRunner);
103
+ setupLogger.debug('Harness instance is ready');
83
104
 
84
105
  global.HARNESS_CONFIG = harnessConfig;
85
106
  global.HARNESS = harness;
package/tsconfig.json CHANGED
@@ -3,15 +3,15 @@
3
3
  "files": [],
4
4
  "include": [],
5
5
  "references": [
6
- {
7
- "path": "../cli"
8
- },
9
6
  {
10
7
  "path": "../tools"
11
8
  },
12
9
  {
13
10
  "path": "../platforms"
14
11
  },
12
+ {
13
+ "path": "../plugins"
14
+ },
15
15
  {
16
16
  "path": "../config"
17
17
  },
package/tsconfig.lib.json CHANGED
@@ -8,24 +8,24 @@
8
8
  "emitDeclarationOnly": false,
9
9
  "forceConsistentCasingInFileNames": true,
10
10
  "types": ["node"],
11
- "lib": ["DOM"]
11
+ "lib": ["DOM", "ES2022"]
12
12
  },
13
13
  "include": ["src/**/*.ts"],
14
14
  "references": [
15
15
  {
16
- "path": "../cli/tsconfig.lib.json"
16
+ "path": "../tools/tsconfig.lib.json"
17
17
  },
18
18
  {
19
- "path": "../bundler-metro/tsconfig.lib.json"
19
+ "path": "../platforms/tsconfig.lib.json"
20
20
  },
21
21
  {
22
- "path": "../tools/tsconfig.lib.json"
22
+ "path": "../plugins/tsconfig.lib.json"
23
23
  },
24
24
  {
25
- "path": "../platforms/tsconfig.lib.json"
25
+ "path": "../config/tsconfig.lib.json"
26
26
  },
27
27
  {
28
- "path": "../config/tsconfig.lib.json"
28
+ "path": "../bundler-metro/tsconfig.lib.json"
29
29
  },
30
30
  {
31
31
  "path": "../bridge/tsconfig.lib.json"
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cli-args.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli-args.test.d.ts","sourceRoot":"","sources":["../src/cli-args.test.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export {};
@@ -1,16 +0,0 @@
1
- import { HarnessPlatformRunner } from '@react-native-harness/platforms';
2
- import { BridgeServer } from '@react-native-harness/bridge/server';
3
- export type CrashMonitor = {
4
- startMonitoring(testFilePath: string): Promise<never>;
5
- stopMonitoring(): void;
6
- markIntentionalRestart(): void;
7
- clearIntentionalRestart(): void;
8
- dispose(): void;
9
- };
10
- export type CrashMonitorOptions = {
11
- interval: number;
12
- platformRunner: HarnessPlatformRunner;
13
- bridgeServer: BridgeServer;
14
- };
15
- export declare const createCrashMonitor: ({ interval, platformRunner, bridgeServer, }: CrashMonitorOptions) => CrashMonitor;
16
- //# sourceMappingURL=crash-monitor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"crash-monitor.d.ts","sourceRoot":"","sources":["../src/crash-monitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAInE,MAAM,MAAM,YAAY,GAAG;IACzB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IACtD,cAAc,IAAI,IAAI,CAAC;IACvB,sBAAsB,IAAI,IAAI,CAAC;IAC/B,uBAAuB,IAAI,IAAI,CAAC;IAChC,OAAO,IAAI,IAAI,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,qBAAqB,CAAC;IACtC,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,6CAIhC,mBAAmB,KAAG,YAqFxB,CAAC"}