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

Function updateConfigAndRun

packages/jest-core/src/watch.ts:110–156  ·  view source on GitHub ↗
({
    bail,
    changedSince,
    collectCoverage,
    collectCoverageFrom,
    coverageDirectory,
    coverageReporters,
    findRelatedTests,
    mode,
    nonFlagArgs,
    notify,
    notifyMode,
    onlyFailures,
    reporters,
    testNamePattern,
    testPathPatterns,
    updateSnapshot,
    verbose,
  }: AllowedConfigOptions = {})

Source from the content-addressed store, hash-verified

108 });
109
110 const updateConfigAndRun = async ({
111 bail,
112 changedSince,
113 collectCoverage,
114 collectCoverageFrom,
115 coverageDirectory,
116 coverageReporters,
117 findRelatedTests,
118 mode,
119 nonFlagArgs,
120 notify,
121 notifyMode,
122 onlyFailures,
123 reporters,
124 testNamePattern,
125 testPathPatterns,
126 updateSnapshot,
127 verbose,
128 }: AllowedConfigOptions = {}) => {
129 const previousUpdateSnapshot = globalConfig.updateSnapshot;
130 globalConfig = updateGlobalConfig(globalConfig, {
131 bail,
132 changedSince,
133 collectCoverage,
134 collectCoverageFrom,
135 coverageDirectory,
136 coverageReporters,
137 findRelatedTests,
138 mode,
139 nonFlagArgs,
140 notify,
141 notifyMode,
142 onlyFailures,
143 reporters,
144 testNamePattern,
145 testPathPatterns,
146 updateSnapshot,
147 verbose,
148 });
149
150 startRun(globalConfig);
151 globalConfig = updateGlobalConfig(globalConfig, {
152 // updateSnapshot is not sticky after a run.
153 updateSnapshot:
154 previousUpdateSnapshot === 'all' ? 'none' : previousUpdateSnapshot,
155 });
156 };
157
158 const watchPlugins: Array<WatchPlugin> = INTERNAL_PLUGINS.map(
159 InternalPlugin => new InternalPlugin({stdin, stdout: outputStream}),

Callers 7

onKeypressFunction · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85

Calls 2

updateGlobalConfigFunction · 0.85
startRunFunction · 0.70

Tested by 1

runMethod · 0.68