diff --git a/projects/testing-library/src/lib/testing-library.ts b/projects/testing-library/src/lib/testing-library.ts index 6d66e933..12d14fde 100644 --- a/projects/testing-library/src/lib/testing-library.ts +++ b/projects/testing-library/src/lib/testing-library.ts @@ -130,8 +130,14 @@ export async function render( const queryParams = params ? params.split('&').reduce((qp, q) => { const [key, value] = q.split('='); - // TODO(Breaking): group same keys qp[key] ? [...qp[key], value] : value - qp[key] = value; + const currentValue = qp[key]; + if (typeof currentValue === 'undefined') { + qp[key] = value; + } else if (Array.isArray(currentValue)) { + qp[key] = [...currentValue, value]; + } else { + qp[key] = [currentValue, value]; + } return qp; }, {}) : undefined;