Unverified Commit 2800a2b1 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Ensure next/jest is published (#31296)

Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent bd800385
...@@ -44,7 +44,7 @@ const customJestConfig = { ...@@ -44,7 +44,7 @@ const customJestConfig = {
// createJestConfig is exported in this way to ensure that next/jest can load the Next.js config which is async // createJestConfig is exported in this way to ensure that next/jest can load the Next.js config which is async
module.exports = createJestConfig(customJestConfig) module.exports = createJestConfig(customJestConfig)
*/ */
module.exports = function nextJest(options: { dir?: string } = {}) { export default function nextJest(options: { dir?: string } = {}) {
// createJestConfig // createJestConfig
return (customJestConfig: any) => { return (customJestConfig: any) => {
// Function that is provided as the module.exports of jest.config.js // Function that is provided as the module.exports of jest.config.js
......
export * from './dist/build/jest/jest'
export { default } from './dist/build/jest/jest'
module.exports = require('./dist/build/jest/jest') function interopDefault(mod) {
return mod.default || mod
}
module.exports = interopDefault(require('./dist/build/jest/jest'))
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
"link.d.ts", "link.d.ts",
"router.js", "router.js",
"router.d.ts", "router.d.ts",
"jest.js",
"jest.d.ts",
"amp.js", "amp.js",
"amp.d.ts", "amp.d.ts",
"types/index.d.ts", "types/index.d.ts",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment