File size: 535 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { nextTestSetup } from 'e2e-utils'
import path from 'path'

describe('action-tracing', () => {
  const { next, skipped } = nextTestSetup({
    files: __dirname,
    skipDeployment: true,
  })
  if (skipped) return

  it('should trace server action imported by client correctly', async () => {
    const traceData = (await next.readJSON(
      path.join('.next', 'server', 'app', 'page.js.nft.json')
    )) as {
      files: string[]
    }
    expect(traceData.files.some((file) => file.includes('data.txt'))).toBe(true)
  })
})