Testing reach router with react-testing library
问题 Going through using react testing library with reach-router https://testing-library.com/docs/example-reach-router function renderWithRouter( ui, { route = '/', history = createHistory(createMemorySource(route)) } = {} ) Second argument to the function , suspect is an object, {} . But '=' is used instead of ':' means its not a name-value pair. So what is it? Also, what is the purpose of the assignment operator between two objects { route = '/', history = createHistory(createMemorySource(route)