Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding committed Feb 8, 2022
1 parent c6a8413 commit 2b096e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ import { nextBuild } from './utils'

export default function (context) {
it('should not generate functions manifest when filesystem API is not enabled', async () => {
await nextBuild(appDir)
await nextBuild(context.appDir)
const functionsManifestPath = join(
distDir,
context.distDir,
'server',
'functions-manifest.json'
)
await fs.remove(join(appDir, '.next'))
await fs.remove(join(context.appDir, '.next'))
expect(fs.existsSync(functionsManifestPath)).toBe(false)
})
it('should contain rsc paths in functions manifest', async () => {
await nextBuild(appDir, { env: { ENABLE_FILE_SYSTEM_API: '1' } })
await nextBuild(context.appDir, { env: { ENABLE_FILE_SYSTEM_API: '1' } })
const functionsManifestPath = join(
distDir,
context.distDir,
'server',
'functions-manifest.json'
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ runSuite('Custom Document', 'prod', documentSuite)
runSuite('Functions manifest', 'build', { runTests: functions })

function runSuite(suiteName, env, options) {
const context = { appDir }
const context = { appDir, distDir }
describe(`${suiteName} ${env}`, () => {
beforeAll(async () => {
options.beforeAll?.()
Expand Down

0 comments on commit 2b096e6

Please sign in to comment.