Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should fail on invalid inputs', () => {
// $ExpectError
waitForElement(1);
// $ExpectError
waitForElement(() => {}, 1);
});
it('should fail on invalid inputs', () => {
// $ExpectError
waitForElement(1);
// $ExpectError
waitForElement(() => {}, 1);
});
export async function getRenderedHref(Component: React.FC, location: Location) {
const el = render(
);
await tick();
await waitForElement(() => el.container.querySelector('a'));
const a = el.container.querySelector('a');
return a ? a.getAttribute('href') : '';
}