Rename TSInjex to TSinjex and Add Jest Setup in README
Renamed all instances of 'TSInjex' to 'TSinjex' for consistency across the codebase, including interfaces, classes, and test files. Updated the version in `package.json` from 0.0.5 to 0.0.6. Added Jest setup example to the `README.md` to guide developers on initial configuration for testing.
This commit is contained in:
22
README.md
22
README.md
@@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
## Jest
|
||||
|
||||
### Example jest setup
|
||||
|
||||
```ts
|
||||
module.exports = {
|
||||
setupFilesAfterEnv: ['./scripts/jest.setup.js'],
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/__tests__/**/*.test.ts', '**/?(*.)+(test).ts'],
|
||||
moduleDirectories: ['node_modules', 'src'],
|
||||
moduleNameMapper: {
|
||||
'^src/(.*)$': '<rootDir>/src/$1', // Map src to the source folder
|
||||
'^ts-injex$': '<rootDir>/node_modules/ts-injex/src', // Map ts-injex to the source folder
|
||||
},
|
||||
transformIgnorePatterns: [
|
||||
'node_modules/(?!ts-injex)' // **Dont** ignore ts-injex on preset `ts-jest`
|
||||
],
|
||||
};
|
||||
```
|
Reference in New Issue
Block a user