├── .auto-changelog
├── .github
└── workflows
│ └── publish.yml
├── .gitignore
├── .husky
└── pre-commit
├── .lintstagedrc.json
├── .npmrc
├── CHANGELOG.md
├── README.md
├── eslint.config.js
├── jest-e2e.json
├── lib
├── helpers
│ ├── suppertest.helper.ts
│ └── test.helper.ts
├── index.ts
└── types
│ └── supertest-config.type.ts
├── nest-cli.json
├── package-lock.json
├── package.json
├── prettier.config.js
├── sample
├── app.controller.ts
├── app.e2e-spec.ts
├── app.module.ts
├── app.service.ts
├── main.ts
└── test.helper.ts
├── tsconfig.build.json
└── tsconfig.json
/.auto-changelog:
--------------------------------------------------------------------------------
1 | {
2 | "output": "CHANGELOG.md",
3 | "template": "keepachangelog",
4 | "ignoreCommitPattern": "^(?!(feat|fix|\\[feat\\]|\\[fix\\]))(.*)$",
5 | "commitLimit": false,
6 | "commitUrl": "https://github.com/hodfords-solutions/nestjs-storage/commit/{id}"
7 | }
--------------------------------------------------------------------------------
/.github/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | name: Publish Package to npmjs
2 | on:
3 | push:
4 | branches:
5 | - main
6 | jobs:
7 | lint:
8 | uses: hodfords-solutions/actions/.github/workflows/lint.yaml@main
9 | build:
10 | uses: hodfords-solutions/actions/.github/workflows/publish.yaml@main
11 | with:
12 | build_path: dist/lib
13 | secrets:
14 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
15 | update-docs:
16 | uses: hodfords-solutions/actions/.github/workflows/update-doc.yaml@main
17 | needs: build
18 | secrets:
19 | DOC_SSH_PRIVATE_KEY: ${{ secrets.DOC_SSH_PRIVATE_KEY }}
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # compiled output
2 | /dist
3 | /node_modules
4 |
5 | # Logs
6 | logs
7 | *.log
8 | npm-debug.log*
9 | pnpm-debug.log*
10 | yarn-debug.log*
11 | yarn-error.log*
12 | lerna-debug.log*
13 |
14 | # OS
15 | .DS_Store
16 |
17 | # Tests
18 | /coverage
19 | /.nyc_output
20 |
21 | # IDEs and editors
22 | /.idea
23 | .project
24 | .classpath
25 | .c9/
26 | *.launch
27 | .settings/
28 | *.sublime-workspace
29 |
30 | # IDE - VSCode
31 | .vscode/*
32 | !.vscode/settings.json
33 | !.vscode/tasks.json
34 | !.vscode/launch.json
35 | !.vscode/extensions.json
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | npx --no-install lint-staged
--------------------------------------------------------------------------------
/.lintstagedrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "libs/**/*.ts": ["prettier --write"]
3 | }
4 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
2 | registry=https://registry.npmjs.org/
3 | always-auth=true
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | All notable changes to this project will be documented in this file.
4 |
5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7 |
8 | Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
9 |
10 | ## [8.0.0](https://hodfords-solutions/hodfords-solutions/nestjs-storage.git/compare/1.0.5...8.0.0) - 2024-01-02
11 |
12 | ## 1.0.5 - 2023-09-05
13 |
14 | ### Commits
15 |
16 | - feat: init project [`7a8cbcd`](https://github.com/hodfords-solutions/nestjs-storage/commit/7a8cbcde75c940d2ff53fbc149c70e5d45ce0f16)
17 | - feat: support proxy for s3 [`180963e`](https://github.com/hodfords-solutions/nestjs-storage/commit/180963eaff45bd69b6122cb52f7989b7481f2d84)
18 | - feat: change the way to generate file name [`8c4ecd0`](https://github.com/hodfords-solutions/nestjs-storage/commit/8c4ecd087337bfd5e286f630dfd1b1f9df8c287d)
19 | - feat: change the way to generate file name [`76147e7`](https://github.com/hodfords-solutions/nestjs-storage/commit/76147e7eec83016e9999b2772a0942c26c2735fb)
20 | - fix: update version, change region to s3 only [`f73349c`](https://github.com/hodfords-solutions/nestjs-storage/commit/f73349c7e50febb832953e1c797db030e93a6395)
21 | - fix: update versio n [`470f5f0`](https://github.com/hodfords-solutions/nestjs-storage/commit/470f5f0166004c7f35dc57f8676036f7cee73da3)
22 | - fix: add s3 region [`0ce7e7e`](https://github.com/hodfords-solutions/nestjs-storage/commit/0ce7e7e7a50f25574b01a6b3ad33c7e19d5b9c87)
23 | - feat: init project [`641a9d6`](https://github.com/hodfords-solutions/nestjs-storage/commit/641a9d619225845eb5ef958d7ea14f521063ce8c)
24 | - feat: init project [`c95373b`](https://github.com/hodfords-solutions/nestjs-storage/commit/c95373b5de2fe4b7633f9a89c6ae2634eddc112a)
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Nestjs-Testing is a testing library for Nestjs applications. It provides a set of utilities to help you test your Nestjs application.
7 |
8 |
9 | ## Installation 🤖
10 | To begin using it, we first install the required dependencies.
11 | ```
12 | npm install @hodfords/nestjs-testing
13 | ```
14 |
15 | ## Configuration 🚀
16 | To easily customize the configuration, let's create an object that extends the `BaseTestHelper` class. This object will be used to configure the test environment.
17 |
18 | ```typescript
19 | export class TestHelper extends BaseTestHelper {
20 | getSupertestConfig(): SupertestConfig {
21 | return {
22 | isUseBearerAuth: true,
23 | authenticationHeader: 'Authorization'
24 | };
25 | }
26 |
27 | getTestModuleBuilder(): TestingModuleBuilder {
28 | return Test.createTestingModule({
29 | imports: [AppModule]
30 | });
31 | }
32 | }
33 | ```
34 |
35 | ## Usage 🚀
36 |
37 | Write your test cases using the `TestHelper` class.
38 |
39 | ```typescript
40 | describe('AppController (e2e)', () => {
41 | let testHelper = new TestHelper();
42 |
43 | beforeAll(async () => {
44 | await testHelper.initialize();
45 | });
46 |
47 | it('Get index success', async () => {
48 | return testHelper.get('/').isOk().expect('Hello World!');
49 | });
50 | });
51 | ```
52 |
53 | ## License
54 | This project is licensed under the MIT License
55 |
--------------------------------------------------------------------------------
/eslint.config.js:
--------------------------------------------------------------------------------
1 | module.exports = require('@hodfords/nestjs-eslint-config');
2 |
--------------------------------------------------------------------------------
/jest-e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "moduleFileExtensions": ["js", "json", "ts"],
3 | "rootDir": ".",
4 | "testEnvironment": "node",
5 | "testRegex": ".e2e-spec.ts$",
6 | "transform": {
7 | "^.+\\.(t|j)s$": "ts-jest"
8 | },
9 | "moduleNameMapper": {
10 | "^~(.*)$": "/src/$1",
11 | "@hodfords/nestjs-testing": ["/lib"]
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/helpers/suppertest.helper.ts:
--------------------------------------------------------------------------------
1 | import request from 'supertest';
2 | import superagent from 'superagent';
3 | import { get, has } from 'lodash';
4 | import { HttpStatus } from '@nestjs/common';
5 | import { Test } from '@nestjs/testing';
6 | import { SupertestConfig } from '../types/supertest-config.type';
7 |
8 | const test = (request as any).Test;
9 | const msgError = 'Response do not contains key';
10 |
11 | declare module 'supertest' {
12 | interface Test extends superagent.SuperAgentRequest {
13 | config: SupertestConfig;
14 |
15 | authenticate(token: string): this;
16 |
17 | setHeader(key: string, value: string): this;
18 |
19 | has(keys: string | string[]): this;
20 |
21 | notHas(keys: string | string[]): this;
22 |
23 | assertValue(key: string, value): this;
24 |
25 | isOk(): this;
26 |
27 | isAuthError(): this;
28 |
29 | isValidateError(): this;
30 |
31 | isForbiddenError(): this;
32 |
33 | isBadRequestError(): this;
34 |
35 | isNoContent(): this;
36 |
37 | isNotFound(): this;
38 |
39 | isCreated(): this;
40 |
41 | isPreconditionFailed(): this;
42 |
43 | isPagination(dataKey?: string): this;
44 | }
45 | }
46 |
47 | test.prototype.authenticate = function (value: string): Test {
48 | if (this.config.isUseBearerAuth) {
49 | return this.set('Authorization', `Bearer ${value}`);
50 | }
51 |
52 | return this.set(this.config.authenticationHeader, value);
53 | };
54 |
55 | test.prototype.setHeader = function (key: string, value: any): Test {
56 | return this.set(key, value);
57 | };
58 |
59 | test.prototype.isOk = function (): Test {
60 | return this.expect(HttpStatus.OK);
61 | };
62 |
63 | test.prototype.isNotFound = function (): Test {
64 | return this.expect(HttpStatus.NOT_FOUND);
65 | };
66 |
67 | test.prototype.isAuthError = function (): Test {
68 | return this.expect(HttpStatus.UNAUTHORIZED);
69 | };
70 |
71 | test.prototype.isValidateError = function (): Test {
72 | return this.expect(HttpStatus.UNPROCESSABLE_ENTITY);
73 | };
74 |
75 | test.prototype.isForbiddenError = function (): Test {
76 | return this.expect(HttpStatus.FORBIDDEN);
77 | };
78 |
79 | test.prototype.isBadRequestError = function (): Test {
80 | return this.expect(HttpStatus.BAD_REQUEST);
81 | };
82 |
83 | test.prototype.isNoContent = function (): Test {
84 | return this.expect(HttpStatus.NO_CONTENT);
85 | };
86 |
87 | test.prototype.isCreated = function (): Test {
88 | return this.expect(HttpStatus.CREATED);
89 | };
90 |
91 | test.prototype.isPreconditionFailed = function (): Test {
92 | return this.expect(HttpStatus.PRECONDITION_FAILED);
93 | };
94 |
95 | test.prototype.isPagination = function (dataKey?: string): Test {
96 | const paginationKeys = ['total', 'lastPage', 'perPage', 'currentPage'];
97 | if (dataKey) {
98 | return this.expect(function (res) {
99 | for (const key of paginationKeys) {
100 | if (!has(res.body[dataKey], key)) {
101 | throw new Error(`${msgError} ${key}`);
102 | }
103 | }
104 | });
105 | } else {
106 | return this.has(paginationKeys);
107 | }
108 | };
109 |
110 | test.prototype.has = function (keys: string | string[]): Test {
111 | return this.expect(function (res) {
112 | if (typeof keys === 'string') {
113 | if (!has(res.body, keys)) {
114 | throw new Error(`${msgError} ${keys}`);
115 | }
116 | } else {
117 | for (const key of keys) {
118 | if (!has(res.body, key)) {
119 | throw new Error(`${msgError} ${key}`);
120 | }
121 | }
122 | }
123 | });
124 | };
125 |
126 | test.prototype.notHas = function (keys: string | string[]): Test {
127 | return this.expect(function (res) {
128 | if (typeof keys === 'string') {
129 | if (has(res.body, keys)) {
130 | throw new Error('Response contains key ' + keys);
131 | }
132 | } else {
133 | for (const key of keys) {
134 | if (has(res.body, key)) {
135 | throw new Error('Response contains key ' + key);
136 | }
137 | }
138 | }
139 | });
140 | };
141 |
142 | test.prototype.assertValue = function (key: string, value: any): Test {
143 | return this.expect(function (res) {
144 | const body = res.body;
145 | if (get(body, key) !== value) {
146 | throw new Error(`${key} not equal ${value}. Value is ${get(body, key)}`);
147 | }
148 | });
149 | };
150 |
--------------------------------------------------------------------------------
/lib/helpers/test.helper.ts:
--------------------------------------------------------------------------------
1 | import { TestingModule, TestingModuleBuilder } from '@nestjs/testing';
2 | import { Type } from '@nestjs/common';
3 | import request, { CallbackHandler } from 'supertest';
4 | import './suppertest.helper';
5 | import { SupertestConfig } from '../types/supertest-config.type';
6 | import { NestExpressApplication } from '@nestjs/platform-express';
7 | import { Server } from 'http';
8 |
9 | export abstract class BaseTestHelper {
10 | public app: NestExpressApplication;
11 | public moduleFixture: TestingModule;
12 | private testHelperModules: { [_: string]: any } = {};
13 | private httpService: Server;
14 |
15 | abstract getTestModuleBuilder(): TestingModuleBuilder;
16 | abstract getSupertestConfig(): SupertestConfig;
17 |
18 | async beforeNestStart(): Promise {
19 | // Do something before nest start
20 | }
21 |
22 | async initialize(overrideBuilder?: (builder: TestingModuleBuilder) => TestingModuleBuilder): Promise {
23 | let moduleBuilder = this.getTestModuleBuilder();
24 | if (overrideBuilder) {
25 | moduleBuilder = overrideBuilder(moduleBuilder);
26 | }
27 | this.moduleFixture = await moduleBuilder.compile();
28 | this.app = this.moduleFixture.createNestApplication();
29 | await this.beforeNestStart();
30 | await this.app.init();
31 | this.httpService = this.app.getHttpServer();
32 | }
33 |
34 | getTestHelperModule(testHelperModule: new (t: BaseTestHelper) => T): T {
35 | if (!this.testHelperModules[testHelperModule.name]) {
36 | this.testHelperModules[testHelperModule.name] = new testHelperModule(this);
37 | }
38 | return this.testHelperModules[testHelperModule.name];
39 | }
40 |
41 | async close(): Promise {
42 | this.app.flushLogs();
43 | jest.restoreAllMocks();
44 | await this.beforeCloseApp();
45 | await this.app.close();
46 | this.app = null;
47 | if (global.gc) {
48 | global.gc();
49 | }
50 | }
51 |
52 | async beforeCloseApp(): Promise {
53 | // Do something before close app
54 | }
55 |
56 | getService(service: Type): Promise {
57 | return this.moduleFixture.resolve(service);
58 | }
59 |
60 | private applySupertestConfig(request: request.Test): request.Test {
61 | request.config = this.getSupertestConfig();
62 | return request;
63 | }
64 |
65 | get(url: string, callback?: CallbackHandler): request.Test {
66 | return this.applySupertestConfig(request(this.httpService).get(url, callback));
67 | }
68 |
69 | post(url: string, callback?: CallbackHandler): request.Test {
70 | return this.applySupertestConfig(request(this.httpService).post(url, callback));
71 | }
72 |
73 | put(url: string, callback?: CallbackHandler): request.Test {
74 | return this.applySupertestConfig(request(this.httpService).put(url, callback));
75 | }
76 |
77 | patch(url: string, callback?: CallbackHandler): request.Test {
78 | return this.applySupertestConfig(request(this.httpService).patch(url, callback));
79 | }
80 |
81 | delete(url: string, callback?: CallbackHandler): request.Test {
82 | return this.applySupertestConfig(request(this.httpService).delete(url, callback));
83 | }
84 |
85 | async invisibleInDatabase(entity: any, condition: any): Promise {
86 | if (typeof condition === 'string') {
87 | condition = { id: condition };
88 | }
89 | if (await entity.getRepository().findOne(condition)) {
90 | throw new Error(`${JSON.stringify(condition)} visible in database`);
91 | }
92 | }
93 |
94 | async visibleInDatabase(entity: any, condition: any): Promise {
95 | if (typeof condition === 'string') {
96 | condition = { id: condition };
97 | }
98 | if (!(await entity.getRepository().findOneBy(condition))) {
99 | throw new Error(`${JSON.stringify(condition)} invisible in database`);
100 | }
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/lib/index.ts:
--------------------------------------------------------------------------------
1 | export * from './helpers/test.helper';
2 | export * from './types/supertest-config.type';
3 |
--------------------------------------------------------------------------------
/lib/types/supertest-config.type.ts:
--------------------------------------------------------------------------------
1 | export type SupertestConfig = {
2 | isUseBearerAuth?: boolean;
3 | authenticationHeader?: string;
4 | };
5 |
--------------------------------------------------------------------------------
/nest-cli.json:
--------------------------------------------------------------------------------
1 | {
2 | "collection": "@nestjs/schematics",
3 | "sourceRoot": "sample",
4 | "projects": {
5 | "nestjs-testing": {
6 | "type": "library",
7 | "root": "lib",
8 | "entryFile": "index",
9 | "sourceRoot": "lib"
10 | }
11 | },
12 | "compilerOptions": {
13 | "webpack": false,
14 | "assets": [
15 |
16 | ]
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hodfords/nestjs-testing",
3 | "version": "11.0.0",
4 | "description": "Provides some tools for implementing Unit test in Nestjs.",
5 | "homepage": "https://github.com/hodfords-solutions/nestjs-testing#readme",
6 | "bugs": {
7 | "url": "https://github.com/hodfords-solutions/nestjs-testing/issues"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git+https://github.com/hodfords-solutions/nestjs-testing.git"
12 | },
13 | "license": "UNLICENSED",
14 | "author": "",
15 | "scripts": {
16 | "prebuild": "rimraf dist",
17 | "build": "nest build",
18 | "format": "prettier --write \"sample/**/*.ts\" \"lib/**/*.ts\"",
19 | "postbuild": "cp package.json dist/lib && cp README.md dist/lib && cp .npmrc dist/lib",
20 | "lint": "eslint --fix",
21 | "prepare": "is-ci || husky",
22 | "release:patch": "git add CHANGELOG.md && npm version patch --tag-version-prefix='' -f -m 'chore: release to %s'",
23 | "release:push": "git push --no-verify && git push --tags --no-verify",
24 | "start": "nest start",
25 | "start:debug": "nest start --debug --watch",
26 | "start:dev": "npm run prebuild && nest start --watch",
27 | "start:prod": "node dist/main",
28 | "test": "jest",
29 | "test:cov": "jest --coverage",
30 | "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
31 | "test:e2e": "jest --config jest-e2e.json",
32 | "test:watch": "jest --watch",
33 | "version": "auto-changelog && git add CHANGELOG.md",
34 | "wz-command": "wz-command"
35 | },
36 | "devDependencies": {
37 | "@hodfords/nestjs-eslint-config": "11.0.0",
38 | "@hodfords/nestjs-prettier-config": "11.0.0",
39 | "@nestjs/cli": "11.0.2",
40 | "@nestjs/common": "11.0.8",
41 | "@nestjs/core": "11.0.8",
42 | "@nestjs/platform-express": "11.0.8",
43 | "@nestjs/schematics": "11.0.0",
44 | "@nestjs/testing": "11.0.8",
45 | "@types/express": "5.0.0",
46 | "@types/jest": "29.5.14",
47 | "@types/lodash": "^4.17.15",
48 | "@types/node": "22.13.1",
49 | "@types/pg": "^8.11.11",
50 | "@types/supertest": "2.0.16",
51 | "auto-changelog": "2.5.0",
52 | "eslint": "9.20.0",
53 | "express": "4.21.2",
54 | "husky": "9.1.7",
55 | "is-ci": "4.1.0",
56 | "jest": "29.7.0",
57 | "lint-staged": "15.4.3",
58 | "lodash": "^4.17.21",
59 | "pg": "^8.13.1",
60 | "prettier": "3.5.0",
61 | "reflect-metadata": "0.2.2",
62 | "rimraf": "6.0.1",
63 | "rxjs": "7.8.1",
64 | "source-map-support": "0.5.21",
65 | "supertest": "7.0.0",
66 | "ts-jest": "29.2.5",
67 | "ts-loader": "9.5.2",
68 | "ts-node": "10.9.2",
69 | "tsconfig-paths": "4.2.0",
70 | "typescript": "5.7.3"
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/prettier.config.js:
--------------------------------------------------------------------------------
1 | module.exports = require('@hodfords/nestjs-prettier-config');
2 |
--------------------------------------------------------------------------------
/sample/app.controller.ts:
--------------------------------------------------------------------------------
1 | import { Controller, Get, HttpCode, HttpStatus } from '@nestjs/common';
2 | import { AppService } from './app.service';
3 |
4 | @Controller()
5 | export class AppController {
6 | constructor(private readonly appService: AppService) {}
7 |
8 | @Get()
9 | @HttpCode(HttpStatus.OK)
10 | getHello(): string {
11 | return this.appService.getHello();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/sample/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { TestHelper } from './test.helper';
2 |
3 | describe('AppController (e2e)', () => {
4 | const testHelper = new TestHelper();
5 |
6 | beforeAll(async () => {
7 | await testHelper.initialize();
8 | });
9 |
10 | it('Get index success', async () => {
11 | return testHelper.get('/').isOk().expect('Hello World!2');
12 | });
13 | });
14 |
--------------------------------------------------------------------------------
/sample/app.module.ts:
--------------------------------------------------------------------------------
1 | import { Module } from '@nestjs/common';
2 | import { AppController } from './app.controller';
3 | import { AppService } from './app.service';
4 |
5 | @Module({
6 | imports: [],
7 | controllers: [AppController],
8 | providers: [AppService]
9 | })
10 | export class AppModule {}
11 |
--------------------------------------------------------------------------------
/sample/app.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@nestjs/common';
2 |
3 | @Injectable()
4 | export class AppService {
5 | getHello(): string {
6 | return 'Hello World!';
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/sample/main.ts:
--------------------------------------------------------------------------------
1 | import { NestFactory } from '@nestjs/core';
2 | import { NestExpressApplication } from '@nestjs/platform-express';
3 | import { AppModule } from './app.module';
4 |
5 | async function bootstrap() {
6 | const app = await NestFactory.create(AppModule);
7 | await app.listen(2008);
8 | }
9 | bootstrap().then();
10 |
--------------------------------------------------------------------------------
/sample/test.helper.ts:
--------------------------------------------------------------------------------
1 | import { BaseTestHelper } from '@hodfords/nestjs-testing';
2 | import { Test, TestingModuleBuilder } from '@nestjs/testing';
3 | import { AppModule } from './app.module';
4 | import { SupertestConfig } from 'lib/types/supertest-config.type';
5 |
6 | export class TestHelper extends BaseTestHelper {
7 | getSupertestConfig(): SupertestConfig {
8 | return {
9 | isUseBearerAuth: true,
10 | authenticationHeader: 'Authorization'
11 | };
12 | }
13 |
14 | getTestModuleBuilder(): TestingModuleBuilder {
15 | return Test.createTestingModule({
16 | imports: [AppModule]
17 | });
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
4 | }
5 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "declaration": true,
5 | "removeComments": true,
6 | "esModuleInterop": true,
7 | "emitDecoratorMetadata": true,
8 | "experimentalDecorators": true,
9 | "allowSyntheticDefaultImports": true,
10 | "target": "es2017",
11 | "sourceMap": true,
12 | "outDir": "./dist",
13 | "baseUrl": "./",
14 | "incremental": true,
15 | "skipLibCheck": true,
16 | "strictNullChecks": false,
17 | "noImplicitAny": false,
18 | "strictBindCallApply": false,
19 | "forceConsistentCasingInFileNames": false,
20 | "noFallthroughCasesInSwitch": false,
21 | "paths": {
22 | "~*": [
23 | "src/*"
24 | ],
25 | "@hodfords/nestjs-testing": ["lib"]
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------