Skip to content

Commit 16291bf

Browse files
committed
fix test error message
1 parent 716098a commit 16291bf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/react-router/__tests__/useNavigate-test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,31 +212,31 @@ describe("useNavigate", () => {
212212
renderer.root.findAllByType("button")[0].props.onClick();
213213
})
214214
).toThrowErrorMatchingInlineSnapshot(
215-
`"Cannot include a '?' character in a manually specified \`to.pathname\` field [{\\"pathname\\":\\"/about/thing?search\\"}]. Please separate it out to the \`to.search\` field. Alternatively you may provide the full path as a string and the router will parse it for you."`
215+
`"Cannot include a '?' character in a manually specified \`to.pathname\` field [{\\"pathname\\":\\"/about/thing?search\\"}]. Please separate it out to the \`to.search\` field. Alternatively you may provide the full path as a string in <Link to=\\"...\\"> and the router will parse it for you."`
216216
);
217217

218218
expect(() =>
219219
TestRenderer.act(() => {
220220
renderer.root.findAllByType("button")[1].props.onClick();
221221
})
222222
).toThrowErrorMatchingInlineSnapshot(
223-
`"Cannot include a '#' character in a manually specified \`to.pathname\` field [{\\"pathname\\":\\"/about/thing#hash\\"}]. Please separate it out to the \`to.hash\` field. Alternatively you may provide the full path as a string and the router will parse it for you."`
223+
`"Cannot include a '#' character in a manually specified \`to.pathname\` field [{\\"pathname\\":\\"/about/thing#hash\\"}]. Please separate it out to the \`to.hash\` field. Alternatively you may provide the full path as a string in <Link to=\\"...\\"> and the router will parse it for you."`
224224
);
225225

226226
expect(() =>
227227
TestRenderer.act(() => {
228228
renderer.root.findAllByType("button")[2].props.onClick();
229229
})
230230
).toThrowErrorMatchingInlineSnapshot(
231-
`"Cannot include a '?' character in a manually specified \`to.pathname\` field [{\\"pathname\\":\\"/about/thing?search#hash\\"}]. Please separate it out to the \`to.search\` field. Alternatively you may provide the full path as a string and the router will parse it for you."`
231+
`"Cannot include a '?' character in a manually specified \`to.pathname\` field [{\\"pathname\\":\\"/about/thing?search#hash\\"}]. Please separate it out to the \`to.search\` field. Alternatively you may provide the full path as a string in <Link to=\\"...\\"> and the router will parse it for you."`
232232
);
233233

234234
expect(() =>
235235
TestRenderer.act(() => {
236236
renderer.root.findAllByType("button")[3].props.onClick();
237237
})
238238
).toThrowErrorMatchingInlineSnapshot(
239-
`"Cannot include a '#' character in a manually specified \`to.search\` field [{\\"pathname\\":\\"/about/thing\\",\\"search\\":\\"?search#hash\\"}]. Please separate it out to the \`to.hash\` field. Alternatively you may provide the full path as a string and the router will parse it for you."`
239+
`"Cannot include a '#' character in a manually specified \`to.search\` field [{\\"pathname\\":\\"/about/thing\\",\\"search\\":\\"?search#hash\\"}]. Please separate it out to the \`to.hash\` field. Alternatively you may provide the full path as a string in <Link to=\\"...\\"> and the router will parse it for you."`
240240
);
241241
});
242242

0 commit comments

Comments
 (0)