Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Reexports queries from dom-testing-library
lib.getByLabelText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType HTMLElement
lib.getByPlaceholderText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x}); // $ExpectType HTMLElement
lib.getByAltText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x}); // $ExpectType HTMLElement
lib.getByTitle(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x}); // $ExpectType HTMLElement
lib.getByDisplayValue(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x}); // $ExpectType HTMLElement
lib.getByRole(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x}); // $ExpectType HTMLElement
lib.getByTestId(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x}); // $ExpectType HTMLElement
lib.getByText(elem, "foo"); // $ExpectType HTMLElement
lib.getByText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType HTMLElement
lib.getAllByText(elem, "foo"); // $ExpectType HTMLElement[]
lib.getAllByText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType HTMLElement[]
lib.queryByText(elem, "foo"); // $ExpectType HTMLElement | null
lib.queryByText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType HTMLElement | null
lib.queryAllByText(elem, "foo"); // $ExpectType HTMLElement[]
lib.queryAllByText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType HTMLElement[]
lib.findByText(elem, "foo"); // $ExpectType Promise
lib.findByText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType Promise
lib.findAllByText(elem, "foo"); // $ExpectType Promise
lib.findAllByText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType Promise
// Reexports createEvent from dom-testing-library
lib.createEvent.click(elem); // $ExpectType Event
lib.createEvent.click(elem, {foo: "bar"}); // $ExpectType Event
lib.createEvent.keyDown(elem); // $ExpectType Event
lib.createEvent.mouseEnter(elem); // $ExpectType Event
// Changes fireEvent to be asynchronous
lib.fireEvent(elem, new Event('change')); // $ExpectType Promise
lib.fireEvent.click(elem); // $ExpectType Promise
lib.fireEvent.click(elem, {foo: "bar"}); // $ExpectType Promise
// Reexports queries from dom-testing-library
lib.getByLabelText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType HTMLElement
lib.getByPlaceholderText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x}); // $ExpectType HTMLElement
lib.getByAltText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x}); // $ExpectType HTMLElement
lib.getByTitle(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x}); // $ExpectType HTMLElement
lib.getByDisplayValue(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x}); // $ExpectType HTMLElement
lib.getByRole(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x}); // $ExpectType HTMLElement
lib.getByTestId(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x}); // $ExpectType HTMLElement
lib.getByText(elem, "foo"); // $ExpectType HTMLElement
lib.getByText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType HTMLElement
lib.getAllByText(elem, "foo"); // $ExpectType HTMLElement[]
lib.getAllByText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType HTMLElement[]
lib.queryByText(elem, "foo"); // $ExpectType HTMLElement | null
lib.queryByText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType HTMLElement | null
lib.queryAllByText(elem, "foo"); // $ExpectType HTMLElement[]
lib.queryAllByText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType HTMLElement[]
lib.findByText(elem, "foo"); // $ExpectType Promise
lib.findByText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType Promise
lib.findAllByText(elem, "foo"); // $ExpectType Promise
lib.findAllByText(elem, /some text/, {exact: true, trim: false, collapseWhitespace: true, normalizer: x => x, selector: '*'}); // $ExpectType Promise
// Reexports createEvent from dom-testing-library
lib.createEvent.click(elem); // $ExpectType Event
lib.createEvent.click(elem, {foo: "bar"}); // $ExpectType Event
lib.createEvent.keyDown(elem); // $ExpectType Event
lib.createEvent.mouseEnter(elem); // $ExpectType Event
// Changes fireEvent to be asynchronous
lib.fireEvent(elem, new Event('change')); // $ExpectType Promise
lib.fireEvent.click(elem); // $ExpectType Promise
lib.fireEvent.click(elem, {foo: "bar"}); // $ExpectType Promise
lib.fireEvent.keyDown(elem); // $ExpectType Promise