UNPKG

@nx/react

Version:

The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides: - Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook. - Generators for applica

21 lines (17 loc) 634 B
"use strict"; 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} } `; }