diff --git a/test/development/basic/hmr.test.ts b/test/development/basic/hmr.test.ts
index 46776c0be016c..349fb1caab914 100644
--- a/test/development/basic/hmr.test.ts
+++ b/test/development/basic/hmr.test.ts
@@ -362,6 +362,37 @@ describe.each([[''], ['/docs']])(
}
}
})
+
+ it('should not full reload when nonlatin characters are used', async () => {
+ let browser = null
+ const pagePath = join('pages', 'hmr', 'nonlatin.js')
+ const originalContent = await next.readFile(pagePath)
+ try {
+ browser = await webdriver(next.url, basePath + '/hmr/nonlatin')
+ const timeOrigin = await browser.eval('performance.timeOrigin')
+ const editedContent = originalContent.replace(
+ '
テスト
',
+ 'テスト
'
+ )
+
+ // Change the page
+ await next.patchFile(pagePath, editedContent)
+
+ await browser.waitForElementByCss('.updated')
+
+ expect(await browser.eval('performance.timeOrigin')).toEqual(
+ timeOrigin
+ )
+ } finally {
+ // Finally is used so that we revert the content back to the original regardless of the test outcome
+ // restore the about page content.
+ await next.patchFile(pagePath, originalContent)
+
+ if (browser) {
+ await browser.close()
+ }
+ }
+ })
})
})
diff --git a/test/development/basic/hmr/pages/hmr/nonlatin.js b/test/development/basic/hmr/pages/hmr/nonlatin.js
new file mode 100644
index 0000000000000..3edaae9792cbd
--- /dev/null
+++ b/test/development/basic/hmr/pages/hmr/nonlatin.js
@@ -0,0 +1,3 @@
+export default function NonLatin(props) {
+ return テスト
+}