diff --git a/projects/testing-library/src/lib/testing-library.ts b/projects/testing-library/src/lib/testing-library.ts index 6d66e933..1a517aa2 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; @@ -382,9 +388,7 @@ if (typeof process === 'undefined' || !process.env?.ATL_SKIP_AUTO_CLEANUP) { } } -// TODO: rename to `atl-wrapper-component` -// eslint-disable-next-line @angular-eslint/component-selector -@Component({ selector: 'wrapper-component', template: '' }) +@Component({ selector: 'atl-wrapper-component', template: '' }) class WrapperComponent {} /**