MCPcopy
hub / github.com/vercel/next.js / runTests

Function runTests

test/integration/server-asset-modules/test/index.test.ts:19–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17const appDir = join(__dirname, '../')
18
19function runTests() {
20 it('should enable reading local files in api routes', async () => {
21 const res = await fetchViaHTTP(appPort, '/api/test', null, {})
22 expect(res.status).toEqual(200)
23 const content = await res.json()
24 expect(content).toHaveProperty('message', 'hello world')
25 })
26}
27
28describe('serverside asset modules', () => {
29 ;(process.env.TURBOPACK_BUILD ? describe.skip : describe)(

Callers 1

index.test.tsFile · 0.70

Calls 4

fetchViaHTTPFunction · 0.90
itFunction · 0.50
expectFunction · 0.50
jsonMethod · 0.45

Tested by

no test coverage detected