Unverified Commit 1a838f45 authored by Jan Potoms's avatar Jan Potoms Committed by 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?
parent c8dbc7e5
...@@ -43,7 +43,7 @@ const runTests = (context, dev = false) => { ...@@ -43,7 +43,7 @@ const runTests = (context, dev = false) => {
const errorSource = await getRedboxSource(browser) const errorSource = await getRedboxSource(browser)
expect(errorSource).toMatchInlineSnapshot(` expect(errorSource).toMatchInlineSnapshot(`
"pages${ "pages${
process.platform === 'win32' ? '\\' : '/' process.platform === 'win32' ? '\\\\' : '/'
}hello.js (52:14) @ onClick }hello.js (52:14) @ onClick
50 | id=\\"trigger-error\\" 50 | id=\\"trigger-error\\"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment