Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ ts_project(
deps = [
"//:node_modules/@types/node",
"//:node_modules/fast-glob",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core/node",
"//tests/e2e/utils",
],
)
Expand All @@ -31,7 +29,6 @@ rollup.rollup(
srcs = [
"rollup.config.mjs",
":runner",
"//:node_modules/@rollup/plugin-alias",
"//:node_modules/@rollup/plugin-commonjs",
"//:node_modules/@rollup/plugin-json",
"//:node_modules/@rollup/plugin-node-resolve",
Expand Down
19 changes: 1 addition & 18 deletions tests/e2e_runner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { parseArgs, styleText } from 'node:util';
import { createConsoleLogger } from '../packages/angular_devkit/core/node';
import glob from 'fast-glob';
import * as path from 'node:path';
import * as fs from 'node:fs';
Expand Down Expand Up @@ -110,19 +109,6 @@ if (process.env.CHROME_BIN) {
process.env.PATH = process.env.PATH! + delimiter + dirname(process.env.CHROME_BIN!);
}

const logger = createConsoleLogger(argv.verbose, process.stdout, process.stderr, {
info: (s) => s,
debug: (s) => s,
warn: (s) => styleText(['bold', 'yellow'], s),
error: (s) => styleText(['bold', 'red'], s),
fatal: (s) => styleText(['bold', 'red'], s),
});

const logStack = [logger];
function lastLogger() {
return logStack.at(-1)!;
}

// Under bazel the compiled file (.js) and types (.d.ts) are available.
const SRC_FILE_EXT_RE = /\.js$/;
const testGlob = (process.env.TESTBRIDGE_TEST_ONLY ?? argv.glob).replace(/\.ts$/, '.js');
Expand Down Expand Up @@ -303,17 +289,14 @@ async function runSteps(

printHeader(name, stepIndex, steps.length, type);

// Run the test function with the current file on the logStack.
logStack.push(lastLogger().createChild(absoluteName));
// Run the test function with the current file.
try {
await run(absoluteName);
} catch (e) {
console.log('\n');
console.error(styleText(['red'], `${capsType} "${name}" failed...`));

throw e;
} finally {
logStack.pop();
}

console.log('----');
Expand Down
Loading