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`] = `
|
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=as-provided should create the application correctly 1`] = `
|
||||||
"import { createWatchPaths } from '@nx/remix';
|
"import { createWatchPaths } from '@nx/remix';
|
||||||
import { dirname } from 'path';
|
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`] = `
|
exports[`Remix Application Integrated Repo --projectNameAndRootFormat=derived should create the application correctly 1`] = `
|
||||||
"import { createWatchPaths } from '@nx/remix';
|
"import { createWatchPaths } from '@nx/remix';
|
||||||
import { dirname } from 'path';
|
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`] = `
|
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 { installGlobals } from '@remix-run/node';
|
||||||
import '@testing-library/jest-dom/matchers';
|
import '@testing-library/jest-dom/matchers';
|
||||||
installGlobals();
|
installGlobals();
|
||||||
|
|||||||
@ -74,6 +74,7 @@ describe('Remix Application', () => {
|
|||||||
expect(
|
expect(
|
||||||
tree.read('tests/routes/_index.spec.tsx', 'utf-8')
|
tree.read('tests/routes/_index.spec.tsx', 'utf-8')
|
||||||
).toMatchSnapshot();
|
).toMatchSnapshot();
|
||||||
|
expect(tree.read('tsconfig.spec.json', 'utf-8')).toMatchSnapshot();
|
||||||
expect(tree.read('test-setup.ts', 'utf-8')).toMatchSnapshot();
|
expect(tree.read('test-setup.ts', 'utf-8')).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -282,6 +283,9 @@ describe('Remix Application', () => {
|
|||||||
expect(
|
expect(
|
||||||
tree.read(`${appDir}/test-setup.ts`, 'utf-8')
|
tree.read(`${appDir}/test-setup.ts`, 'utf-8')
|
||||||
).toMatchSnapshot();
|
).toMatchSnapshot();
|
||||||
|
expect(
|
||||||
|
tree.read(`${appDir}/tsconfig.spec.json`, 'utf-8')
|
||||||
|
).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should generate the correct files for testing using jest', async () => {
|
it('should generate the correct files for testing using jest', async () => {
|
||||||
|
|||||||
@ -64,7 +64,7 @@ export function updateUnitTestConfig(
|
|||||||
);
|
);
|
||||||
|
|
||||||
updateJson(tree, pathToTsConfigSpec, (json) => {
|
updateJson(tree, pathToTsConfigSpec, (json) => {
|
||||||
json.includes = [
|
json.include = [
|
||||||
'vite.config.ts',
|
'vite.config.ts',
|
||||||
'vitest.config.ts',
|
'vitest.config.ts',
|
||||||
'app/**/*.ts',
|
'app/**/*.ts',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user