MCPcopy Index your code
hub / github.com/angular/angular-cli / runSteps

Function runSteps

tests/e2e_runner.ts:273–305  ·  view source on GitHub ↗
(
  run: (name: string) => Promise<void> | void,
  steps: string[],
  type: 'setup' | 'test' | 'initializer',
)

Source from the content-addressed store, hash-verified

271});
272
273async function runSteps(
274 run: (name: string) => Promise<void> | void,
275 steps: string[],
276 type: 'setup' | 'test' | 'initializer',
277) {
278 const capsType = type[0].toUpperCase() + type.slice(1);
279
280 for (const [stepIndex, relativeName] of steps.entries()) {
281 // Make sure this is a windows compatible path.
282 let absoluteName = path.join(e2eRoot, relativeName).replace(SRC_FILE_EXT_RE, '');
283 if (/^win/.test(process.platform)) {
284 absoluteName = absoluteName.replace(/\\/g, path.posix.sep);
285 }
286
287 const name = relativeName.replace(SRC_FILE_EXT_RE, '');
288 const start = Date.now();
289
290 printHeader(name, stepIndex, steps.length, type);
291
292 // Run the test function with the current file.
293 try {
294 await run(absoluteName);
295 } catch (e) {
296 console.log('\n');
297 console.error(styleText(['red'], `${capsType} "${name}" failed...`));
298
299 throw e;
300 }
301
302 console.log('----');
303 printFooter(name, type, start);
304 }
305}
306
307function runSetup(absoluteName: string): Promise<void> {
308 const module = require(absoluteName);

Callers 1

e2e_runner.tsFile · 0.85

Calls 6

printHeaderFunction · 0.85
printFooterFunction · 0.85
logMethod · 0.65
errorMethod · 0.65
runFunction · 0.50
entriesMethod · 0.45

Tested by

no test coverage detected