Jest Config
Factory functions for creating preset Jest configurations. Primarily used in
unison with the Lumos CLI.
Extending config
Update package.json:
{
"lumos": {
"jest": {
"setupFilesAfterEnv": ["@testing-library/jest-dom/extend-expect"]
}
}
}
Create file in configs folder:
configs/eslint.js
modules.exports = {
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'],
};
Settings
Main settings
export interface JestOptions {
graphql?: boolean;
react?: boolean;
node?: boolean;
srcFolder: string;
testsFolder: string;
threshold?: number;
workspaces?: string[];
testingLibrary?: boolean;
testResultFileName?: string;
}
Default values
({
graphql = false,
react = false,
node = false,
testingLibrary = false,
threshold = 40,
testResultFileName = 'TEST-RESULTS.xml',
});