- Support Next v12.1.1+
- Support Next v12.1.0+
- Fix segfault errors with Next v12
wrapper
option replaced withwrappers
.wrappers
accepts an absolute url pointing to a wrappers file.
- Include jest error details on
loadFile
error
- Support Next v11.1.2+
- Disable
useDocument
option
- Support route params with special characters like
-
- Support Next v11.1.0+
- Extend peerDependencies to include Next.js v11
- Silence
jest.mock
error by renamingmoduleName
->mockModuleName
- Support
next/image
external hostname - Hide global navigator in server environment
- Pass custom app props to
App
- Fine tune things for Jest v27
- Set jsdom as default test environment
- Replace fast-glob with tiny-glob
- Add a comment to empty pages to prevent test from failing
- Skip testing-library auto cleanup
- Disable aws-amplify test
- Add
wrapper.App
option - Add locale fields to data fetching contexts
- Prevent
@next/env
from loading env vars - Don't throw if Next.js' config-utils doesn't exist
- Execute
getStaticProps
in server mode
- Populate
i18n
(locale) router fields
- Support Next v10.0.8+
- Fix async
loadConfig
- Introduce
sharedModules
option to enable server side mocking
- Pass-through
NODE_ENV
to client render context
- Fix catch all route resolution priority
- Initial
initTestHelpers()
test environment setup should be removed when running in Jest/Jasmine-like environments
- Respect non-isolated modules when
executeWithFreshModules
is executed
- Filter runtime environment variables
- Make environment variables declared in dotenv files available in
next.config.js
- Automatically initialise test environment with Jest/Jasmine-like test runners
- Remove
nonIsolatedModules
option
- Load files necessary to perform rendering in one single go to preserve module identity
- Improve DX by throwing on import failure instead of swallowing error
- Render 404 page when matching route not found
- Add
wrapper
option
- Support custom _document
renderPage
- Introduce
dotenvFile
option to support environment variables loading - Add support for
getServerSideProps
'snotFound
return
- Support client side navigation when url is provided as object
- Minimum Node.js supported version >= 12
- Catch-all and optional cath-all route segments return
params
entries as array of values
- Support next/config runtime configuration
- Fix missing cookie package dependency
- Fix missing DefaultApp.tsx file in dist folder
- Uniform error messages
- Expose new
render
,serverRender
andserverRenderAsString
methods - Correctly "simulate" browser behaviour by initial rendering on "server" and hydration on "client"
- Mount/hydrate with
react-dom/server
hydrate
page
doesn't render_document
whenuseDocument
istrue
- Add
req.cookies
property in "getServerSideProps"
- Require and execute _document, _app and pages (including data fetching methods) in expected client or server environment
- Ensure only pages with allowed extensions are required
- Prevent custom app from executing data fetching when
useApp
isfalse
- Ensure router object and rendered page are updated simultaneously
- Support
next/head
- Provide
initTestHelpers
to help setting up test environment
- Fix client navigation when
useDocument
enabled
- Handle data fetching
redirect
returns
- Fix user events not firing when using default
_document
- Make
document.cookie
available to fetching methods asctx.req.headers.cookie
- Make
referer
available to fetching methods asctx.req.headers.referer
- Don't pass
getInitialProps
contextreq
/res
objects when execution happens as a result of client-side navigation - Simplistically simulate non-browser environment when executing server-only methods/modules
- Renamed
useCustomApp
option touseApp
useDocument
experimental option: add_document
rendering support
- Make paths handling OS insensitive
- Dropped support for Next.js 9
getPage
promise returns an object with apage
prop holding the expected page element (previously page element was directly returned)useCustomApp
option defaults totrue
- Provide support for Next.js 10
- Fix default routing behaviour with trailing slash (#24)
- Support client-side navigation via
Link
,router.push
,router.replace
getPage
trows when page's fetching methods return an object with missingprops
field (eg.redirect
andnotFound
responses). The response object is accessible inerror.payload
.
- Remove
pagesDirectory
andpageExtensions
options - Rename
customApp
option ->useCustomApp
- Auto detect pages directory
- Auto detect
pageExtensions
option - Add
nextRoot
option
- Support custom App's data fetching with
getInitialProps
- Throw error when no matching page is found
- Support custom file extensions via
pageExtensions
option - Migrate tests to TS
- Support pages'
getInitialProps
data fetching method
- Support custom App component behind
customApp
option flag (no support for App'sgetInitialProps
, yet)
- Expose Typescript types
- Migrate codebase to Typescript
- Replace query-string with node's querystring
Initial release