Skip to content

Commit

Permalink
remove duplicated test
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed May 12, 2024
1 parent c65197f commit 6e59e6e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
25 changes: 0 additions & 25 deletions test/e2e/module-layer/module-layer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,31 +99,6 @@ describe('module layer', () => {
}
})
})

describe('client packages in pages api', () => {
const pagesApiFile = 'pages/api/mixed.js'
let pagesApiContent
beforeAll(async () => {
pagesApiContent = await next.readFile(pagesApiFile)
await next.patchFile(
pagesApiFile,
pagesApiContent.replace(
"// import '../../lib/mixed-lib'",
"import '../../lib/mixed-lib'"
)
)
})
afterAll(async () => {
await next.patchFile(pagesApiFile, pagesApiContent)
})

it('should not error when import client packages in pages/api', async () => {
await retry(async () => {
const { status } = await next.fetch('/api/mixed')
expect(status).toBe(200)
})
})
})
}

describe('with server-only in server targets', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/module-layer/pages/api/mixed.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// import '../../lib/mixed-lib'
import '../../lib/mixed-lib'

export default function handler(req, res) {
return res.send('pages/api/mixed.js:')
Expand Down

0 comments on commit 6e59e6e

Please sign in to comment.