@nx/react
Version:
21 lines (17 loc) • 634 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getInSourceVitestTestsTemplate = getInSourceVitestTestsTemplate;
function getInSourceVitestTestsTemplate(testContent) {
return `
if (import.meta.vitest) {
// add tests related to your file here
// For more information please visit the Vitest docs site here: https://vitest.dev/guide/in-source.html
const { it, expect, beforeEach } = import.meta.vitest;
let render: typeof import('@testing-library/react').render;
beforeEach(async () => {
render = (await import('@testing-library/react')).render;
});
${testContent}
}
`;
}
;