diff --git a/tools/modern-tests/jest.config.js b/tools/modern-tests/jest.config.js index b40a943b70..41e0609c2a 100644 --- a/tools/modern-tests/jest.config.js +++ b/tools/modern-tests/jest.config.js @@ -2,6 +2,7 @@ module.exports = { preset: 'jest-playwright-preset', rootDir: __dirname, testMatch: ["**/*.test.js"], + setupFilesAfterEnv: ['/jest.setup.js'], verbose: true, // Increase timeout for CLI operations testTimeout: 60_000, diff --git a/tools/modern-tests/jest.setup.js b/tools/modern-tests/jest.setup.js new file mode 100644 index 0000000000..83590326d1 --- /dev/null +++ b/tools/modern-tests/jest.setup.js @@ -0,0 +1,9 @@ +// jest.setup.js +import chalk from 'chalk'; + +// This runs before each test +beforeEach(() => { + const name = expect.getState().currentTestName; + // e.g. a bright cyan arrow and test name + console.log(chalk.cyan(`▶ ${name}`)); +});