fix(remix): typo in tsconfig.spec.json update led to invalid tsconfig (#21886)
This commit is contained in:
parent
4a5b5f245d
commit
246fd1907b
@ -405,6 +405,39 @@ installGlobals();
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided --unitTestRunner should generate the correct files for testing using vitest 4`] = `
|
||||
"{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../dist/out-tsc",
|
||||
"types": [
|
||||
"vitest/globals",
|
||||
"vitest/importMeta",
|
||||
"vite/client",
|
||||
"node",
|
||||
"vitest"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"vite.config.ts",
|
||||
"vitest.config.ts",
|
||||
"app/**/*.ts",
|
||||
"app/**/*.tsx",
|
||||
"app/**/*.js",
|
||||
"app/**/*.jsx",
|
||||
"tests/**/*.spec.ts",
|
||||
"tests/**/*.test.ts",
|
||||
"tests/**/*.spec.tsx",
|
||||
"tests/**/*.test.tsx",
|
||||
"tests/**/*.spec.js",
|
||||
"tests/**/*.test.js",
|
||||
"tests/**/*.spec.jsx",
|
||||
"tests/**/*.test.jsx"
|
||||
]
|
||||
}
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided should create the application correctly 1`] = `
|
||||
"import { createWatchPaths } from '@nx/remix';
|
||||
import { dirname } from 'path';
|
||||
@ -882,6 +915,39 @@ installGlobals();
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived --unitTestRunner should generate the correct files for testing using vitest 4`] = `
|
||||
"{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"types": [
|
||||
"vitest/globals",
|
||||
"vitest/importMeta",
|
||||
"vite/client",
|
||||
"node",
|
||||
"vitest"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"vite.config.ts",
|
||||
"vitest.config.ts",
|
||||
"app/**/*.ts",
|
||||
"app/**/*.tsx",
|
||||
"app/**/*.js",
|
||||
"app/**/*.jsx",
|
||||
"tests/**/*.spec.ts",
|
||||
"tests/**/*.test.ts",
|
||||
"tests/**/*.spec.tsx",
|
||||
"tests/**/*.test.tsx",
|
||||
"tests/**/*.spec.js",
|
||||
"tests/**/*.test.js",
|
||||
"tests/**/*.spec.jsx",
|
||||
"tests/**/*.test.jsx"
|
||||
]
|
||||
}
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived should create the application correctly 1`] = `
|
||||
"import { createWatchPaths } from '@nx/remix';
|
||||
import { dirname } from 'path';
|
||||
@ -1181,6 +1247,39 @@ test('renders loader data', async () => {
|
||||
`;
|
||||
|
||||
exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 4`] = `
|
||||
"{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/out-tsc",
|
||||
"types": [
|
||||
"vitest/globals",
|
||||
"vitest/importMeta",
|
||||
"vite/client",
|
||||
"node",
|
||||
"vitest"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"vite.config.ts",
|
||||
"vitest.config.ts",
|
||||
"app/**/*.ts",
|
||||
"app/**/*.tsx",
|
||||
"app/**/*.js",
|
||||
"app/**/*.jsx",
|
||||
"tests/**/*.spec.ts",
|
||||
"tests/**/*.test.ts",
|
||||
"tests/**/*.spec.tsx",
|
||||
"tests/**/*.test.tsx",
|
||||
"tests/**/*.spec.js",
|
||||
"tests/**/*.test.js",
|
||||
"tests/**/*.spec.jsx",
|
||||
"tests/**/*.test.jsx"
|
||||
]
|
||||
}
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 5`] = `
|
||||
"import { installGlobals } from '@remix-run/node';
|
||||
import '@testing-library/jest-dom/matchers';
|
||||
installGlobals();
|
||||
|
||||
@ -74,6 +74,7 @@ describe('Remix Application', () => {
|
||||
expect(
|
||||
tree.read('tests/routes/_index.spec.tsx', 'utf-8')
|
||||
).toMatchSnapshot();
|
||||
expect(tree.read('tsconfig.spec.json', 'utf-8')).toMatchSnapshot();
|
||||
expect(tree.read('test-setup.ts', 'utf-8')).toMatchSnapshot();
|
||||
});
|
||||
|
||||
@ -282,6 +283,9 @@ describe('Remix Application', () => {
|
||||
expect(
|
||||
tree.read(`${appDir}/test-setup.ts`, 'utf-8')
|
||||
).toMatchSnapshot();
|
||||
expect(
|
||||
tree.read(`${appDir}/tsconfig.spec.json`, 'utf-8')
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should generate the correct files for testing using jest', async () => {
|
||||
|
||||
@ -64,7 +64,7 @@ export function updateUnitTestConfig(
|
||||
);
|
||||
|
||||
updateJson(tree, pathToTsConfigSpec, (json) => {
|
||||
json.includes = [
|
||||
json.include = [
|
||||
'vite.config.ts',
|
||||
'vitest.config.ts',
|
||||
'app/**/*.ts',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user