Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure next/jest is published #31296

Merged
merged 2 commits into from Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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