Billing UI (Nightly & Dev only) and Jest component unit testing (#6640)
A bajillion commits hi * all the shit i'll git reset origin/main && git add -p . later * fmt * wip * fmt * rebase; fmt; tsc; lint; * fmt * Add jest tests * fmt * ok * add nightly checks * More is_nightly checks * be happy codespell * Make vitest ignore my shit * nightly OR debug; try vitest fixing again * Add this back * fix * Update src/components/LowerRightControls.tsx Co-authored-by: Frank Noirot <frank@zoo.dev> * Update src/components/LowerRightControls.tsx Co-authored-by: Frank Noirot <frank@zoo.dev> * Update src/components/LowerRightControls.tsx Co-authored-by: Frank Noirot <frank@zoo.dev> * Update src/components/BillingDialog.tsx Co-authored-by: Frank Noirot <frank@zoo.dev> * Update tailwind.config.js Co-authored-by: Frank Noirot <frank@zoo.dev> * Update tailwind.config.js Co-authored-by: Frank Noirot <frank@zoo.dev> * Update src/components/BillingRemaining.tsx Co-authored-by: Frank Noirot <frank@zoo.dev> * Update src/components/BillingRemaining.tsx Co-authored-by: Frank Noirot <frank@zoo.dev> * Update src/components/CustomIcon.tsx Co-authored-by: Frank Noirot <frank@zoo.dev> * Update src/components/CustomIcon.tsx Co-authored-by: Frank Noirot <frank@zoo.dev> * Update src/components/CustomIcon.tsx Co-authored-by: Frank Noirot <frank@zoo.dev> * Update src/components/CustomIcon.tsx Co-authored-by: Frank Noirot <frank@zoo.dev> * Update src/components/BillingRemaining.tsx Co-authored-by: Frank Noirot <frank@zoo.dev> * Update src/components/BillingRemaining.tsx Co-authored-by: Frank Noirot <frank@zoo.dev> * fixes * tid bits * Fix tests * color * Update src/components/BillingRemaining.tsx Co-authored-by: Frank Noirot <frank@zoo.dev> * fix someone else's problem --------- Co-authored-by: Frank Noirot <frank@zoo.dev>
This commit is contained in:
		
							
								
								
									
										19
									
								
								jest-component-unit-tests/jest.config.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								jest-component-unit-tests/jest.config.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | ||||
| import { pathsToModuleNameMapper } from 'ts-jest' | ||||
| // In the following statement, replace `./tsconfig` with the path to your `tsconfig` file | ||||
| // which contains the path mapping (ie the `compilerOptions.paths` option): | ||||
| import { compilerOptions } from './tsconfig.json' | ||||
| import type { Config } from 'jest' | ||||
|  | ||||
| const jestConfig: Config = { | ||||
|   // [...] | ||||
|   preset: "ts-jest", | ||||
|   transform: { | ||||
|     "^.+\.tsx?$": ["ts-jest",{ babelConfig: true }], | ||||
|   }, | ||||
|   testEnvironment: "jest-fixed-jsdom", | ||||
|   // TAG: paths, path, baseUrl, alias | ||||
|   // This is necessary to use tsconfig path aliases. | ||||
|   moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/../' }), | ||||
| } | ||||
|  | ||||
| export default jestConfig | ||||
		Reference in New Issue
	
	Block a user