-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
samuel
committed
Mar 26, 2024
1 parent
2fab72d
commit 86cfddd
Showing
5 changed files
with
51 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,20 @@ | ||
# nestjs-shared | ||
# NestJS Shared | ||
|
||
This library was generated with [Nx](https://nx.dev). | ||
This library contains the shared nestjs utilities such as validators, DTOs and decorators. | ||
|
||
## Running unit tests | ||
## Testing | ||
|
||
Run `nx test nestjs-shared` to execute the unit tests via [Jest](https://jestjs.io). | ||
```bash | ||
make nestjs-shared/test/unit | ||
make nestjs-shared/test/unit/watch | ||
``` | ||
|
||
## Formatting | ||
|
||
```bash | ||
make nestjs-shared/format | ||
make nestjs-shared/lint | ||
|
||
make nestjs-shared/format/check | ||
make nestjs-shared/lint/check | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
/* eslint-disable */ | ||
export default { | ||
import type { Config } from 'jest' | ||
|
||
const config: Config = { | ||
displayName: 'nestjs-shared', | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], | ||
preset: '../../jest.preset.js', | ||
testEnvironment: 'node', | ||
transform: { | ||
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }] | ||
}, | ||
moduleFileExtensions: ['ts', 'js', 'html'], | ||
coverageDirectory: '../../coverage/packages/nestjs-shared' | ||
'^.+\\.[tj]sx?$': [ | ||
'ts-jest', | ||
{ | ||
tsconfig: '<rootDir>/tsconfig.spec.json' | ||
} | ||
] | ||
} | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import type { Config } from 'jest' | ||
import sharedConfig from './jest.config' | ||
|
||
const config: Config = { | ||
...sharedConfig, | ||
testMatch: ['<rootDir>/**/__test__/unit/**/*.spec.ts'] | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters