Skip to content

Commit f072381

Browse files
committed
fixup! chore(nest): add more test for Nest features compatibilty
1 parent 6fdf8bf commit f072381

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/nest/src/nest-features.test.ts renamed to packages/nest/src/test/nest-features.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import request from 'supertest'
1717
import { afterEach, describe, expect, it, vi } from 'vitest'
1818
import { z } from 'zod'
1919

20-
import { Implement, ORPCModule } from '.'
20+
import { Implement, ORPCModule } from '..'
2121

2222
// 1. oRPC Contract
2323
const testContract = {
@@ -601,6 +601,8 @@ describe('oRPC Nest Middleware Integration', () => {
601601
expect(['gzip', 'deflate']).toContain(response.headers['content-encoding'])
602602

603603
// Verify that the oRPC handler response is correctly returned (supertest auto-decompresses)
604+
// Works because compression middleware monkeypatch the res.send method to access the body or
605+
// use a fastify hook to access the reply payload
604606
expect(response.body).toHaveProperty('data')
605607
expect(response.body).toHaveProperty('size')
606608
expect(response.body.size).toBeGreaterThan(0)

packages/nest/src/response-types.test.ts renamed to packages/nest/src/test/response-types.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { implement, withEventMeta } from '@orpc/server'
88
import request from 'supertest'
99
import { afterEach, describe, expect, it } from 'vitest'
1010
import { z } from 'zod'
11-
import { Implement } from './implement'
12-
import { ORPCModule } from './module'
11+
import { Implement } from '../implement'
12+
import { ORPCModule } from '../module'
1313

1414
/**
1515
* Test suite for validating all supported ORPC response types work correctly

0 commit comments

Comments
 (0)