mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
add jest setup file to improve test logging
This commit is contained in:
@@ -2,6 +2,7 @@ module.exports = {
|
||||
preset: 'jest-playwright-preset',
|
||||
rootDir: __dirname,
|
||||
testMatch: ["**/*.test.js"],
|
||||
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
||||
verbose: true,
|
||||
// Increase timeout for CLI operations
|
||||
testTimeout: 60_000,
|
||||
|
||||
9
tools/modern-tests/jest.setup.js
Normal file
9
tools/modern-tests/jest.setup.js
Normal file
@@ -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}`));
|
||||
});
|
||||
Reference in New Issue
Block a user