MCPcopy
hub / github.com/jestjs/jest / runWatch

Function runWatch

packages/jest-core/src/cli/index.ts:250–285  ·  view source on GitHub ↗
(
  contexts: Array<TestContext>,
  _configs: Array<Config.ProjectConfig>,
  hasDeprecationWarnings: boolean,
  globalConfig: Config.GlobalConfig,
  outputStream: WriteStream,
  hasteMapInstances: Array<IHasteMap>,
  filter?: Filter,
)

Source from the content-addressed store, hash-verified

248};
249
250const runWatch = async (
251 contexts: Array<TestContext>,
252 _configs: Array<Config.ProjectConfig>,
253 hasDeprecationWarnings: boolean,
254 globalConfig: Config.GlobalConfig,
255 outputStream: WriteStream,
256 hasteMapInstances: Array<IHasteMap>,
257 filter?: Filter,
258) => {
259 if (hasDeprecationWarnings) {
260 try {
261 await handleDeprecationWarnings(outputStream, process.stdin);
262 return await watch(
263 globalConfig,
264 contexts,
265 outputStream,
266 hasteMapInstances,
267 undefined,
268 undefined,
269 filter,
270 );
271 } catch {
272 exit(0);
273 }
274 }
275
276 return watch(
277 globalConfig,
278 contexts,
279 outputStream,
280 hasteMapInstances,
281 undefined,
282 undefined,
283 filter,
284 );
285};
286
287const runWithoutWatch = async (
288 globalConfig: Config.GlobalConfig,

Callers 1

_run10000Function · 0.85

Calls 3

watchFunction · 0.85
exitFunction · 0.85

Tested by

no test coverage detected