mirror of
https://github.com/andwati/blog-nest.git
synced 2026-11-25 05:28:47 +00:00
feat: initialize pnpm workspace, TypeScript configuration, and Turbo tasks
- Added pnpm-workspace.yaml to manage workspace packages and dependencies. - Created tsconfig.json with strict TypeScript settings for better type safety. - Introduced turbo.json to define build, lint, test, and other tasks with dependencies.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import type { INestApplication } from '@nestjs/common'
|
||||
import { Test, type TestingModule } from '@nestjs/testing'
|
||||
import request from 'supertest'
|
||||
import type { App } from 'supertest/types'
|
||||
import { AppModule } from './../src/app.module'
|
||||
|
||||
describe('AppController (e2e)', () => {
|
||||
let app: INestApplication<App>
|
||||
|
||||
beforeEach(async () => {
|
||||
const moduleFixture: TestingModule = await Test.createTestingModule({
|
||||
imports: [AppModule],
|
||||
}).compile()
|
||||
|
||||
app = moduleFixture.createNestApplication()
|
||||
await app.init()
|
||||
})
|
||||
|
||||
it('/ (GET)', () => {
|
||||
return request(app.getHttpServer())
|
||||
.get('/')
|
||||
.expect(200)
|
||||
.expect('Hello World!')
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"moduleFileExtensions": ["js", "json", "ts"],
|
||||
"rootDir": ".",
|
||||
"testEnvironment": "node",
|
||||
"testRegex": ".e2e-spec.ts$",
|
||||
"transform": {
|
||||
"^.+\\.(t|j)s$": "ts-jest"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user