未验证 提交 1a838f45 编写于 作者: J Jan Potoms 提交者: GitHub

Fix windows tests: snapshot backslash needs to be escaped (#14559)

Noticed while trying to get https://github.com/vercel/next.js/pull/14442 tests to pass. The backslash needs to be double escaped in snapshots. Forward slashes aren't escaped, maybe that was the assumption when this test was written?
上级 c8dbc7e5
......@@ -43,7 +43,7 @@ const runTests = (context, dev = false) => {
const errorSource = await getRedboxSource(browser)
expect(errorSource).toMatchInlineSnapshot(`
"pages${
process.platform === 'win32' ? '\\' : '/'
process.platform === 'win32' ? '\\\\' : '/'
}hello.js (52:14) @ onClick
50 | id=\\"trigger-error\\"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册