Transform your .pug files to HTML for running Jest with markup templates
npm install pug-jest --save-dev
Define pug-jest
as a transformer for Jest, by adding
the following to your Jest configuration in your package.json
:
{
"jest": {
"transform": {
"\\.(pug)$": "<rootDir>/node_modules/pug-jest"
}
}
}