Skip to content

Commit

Permalink
Ensure next/jest is published (#31296)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
timneutkens and kodiakhq[bot] committed Nov 11, 2021
1 parent bd80038 commit 2800a2b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/next/build/jest/jest.ts
Expand Up @@ -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
module.exports = createJestConfig(customJestConfig)
*/
module.exports = function nextJest(options: { dir?: string } = {}) {
export default function nextJest(options: { dir?: string } = {}) {
// createJestConfig
return (customJestConfig: any) => {
// Function that is provided as the module.exports of jest.config.js
Expand Down
2 changes: 2 additions & 0 deletions packages/next/jest.d.ts
@@ -0,0 +1,2 @@
export * from './dist/build/jest/jest'
export { default } from './dist/build/jest/jest'
5 changes: 4 additions & 1 deletion packages/next/jest.js
@@ -1 +1,4 @@
module.exports = require('./dist/build/jest/jest')
function interopDefault(mod) {
return mod.default || mod
}
module.exports = interopDefault(require('./dist/build/jest/jest'))
2 changes: 2 additions & 0 deletions packages/next/package.json
Expand Up @@ -40,6 +40,8 @@
"link.d.ts",
"router.js",
"router.d.ts",
"jest.js",
"jest.d.ts",
"amp.js",
"amp.d.ts",
"types/index.d.ts",
Expand Down

0 comments on commit 2800a2b

Please sign in to comment.