Skip to content

Commit

Permalink
test(server): Support include with absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
mugifly committed Jun 21, 2024
1 parent 970036d commit e16de08
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
"**/*.(t|j)s"
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
"testEnvironment": "node",
"moduleNameMapper": {
"src/(.*)": "<rootDir>/$1"
}
}
}
4 changes: 2 additions & 2 deletions server/src/app.controller.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Test, TestingModule } from '@nestjs/testing';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AppController } from 'src/app.controller';
import { AppService } from 'src/app.service';

describe('AppController', () => {
let appController: AppController;
Expand Down
3 changes: 3 additions & 0 deletions server/test/jest-e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
"testRegex": ".e2e-spec.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"moduleNameMapper": {
"src/(.*)": "<rootDir>/../src/$1"
}
}

0 comments on commit e16de08

Please sign in to comment.