mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
0bd250f4aa
* Reload the page if the buildIds are mismatch. * Reload the browser with main.js and commons.js buildId mismatch. * Implement proper reloading with an API to persist the state. * Add some tests for force reload. * Change _reload to _forceReload. * Add a section about reload hooks to the README. * Allow to add a hook to handle BUILD_ID mismatch. * Remove readme docs. * Do not show a custom error to the user. * Cancel the routing when there's a BUILD_ID mismatch. * Fix a typo. * Passing route to SingletonRouter.onBuildIdMismatch * Handle buildId mismatch automatically.
17 lines
383 B
JavaScript
17 lines
383 B
JavaScript
/* global describe, test, expect */
|
|
|
|
export default function (context) {
|
|
describe('Misc', () => {
|
|
test('finishes response', async () => {
|
|
const res = {
|
|
finished: false,
|
|
end () {
|
|
this.finished = true
|
|
}
|
|
}
|
|
const html = await context.app.renderToHTML({}, res, '/finish-response', {})
|
|
expect(html).toBeFalsy()
|
|
})
|
|
})
|
|
}
|