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

Function describeCase

test/e2e/instrumentation-hook/instrumentation-hook.test.ts:5–18  ·  view source on GitHub ↗
(
  caseName: string,
  callback: (context: ReturnType<typeof nextTestSetup>) => void
)

Source from the content-addressed store, hash-verified

3import path from 'path'
4
5const describeCase = (
6 caseName: string,
7 callback: (context: ReturnType<typeof nextTestSetup>) => void
8) => {
9 describe(caseName, () => {
10 const context = nextTestSetup({
11 files: path.join(__dirname, caseName),
12 skipDeployment: true,
13 })
14 if (context.skipped) return
15
16 callback(context)
17 })
18}
19describe('Instrumentation Hook', () => {
20 describeCase('with-esm-import', ({ next }) => {
21 it('with-esm-import should run the instrumentation hook', async () => {

Callers 1

Calls 4

nextTestSetupFunction · 0.90
describeFunction · 0.85
callbackFunction · 0.50
joinMethod · 0.45

Tested by

no test coverage detected