Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('renders an empty-set message', () => {
const data = { products: { filters: [], items: [] } };
useQuery.mockReturnValueOnce([
{ data, error: null, loading: false },
queryApi
]);
const { root } = createTestInstance(
<form>
);
expect(root.findByProps({ className: 'message' }).children).toContain(
'No results were found.'
);
});
</form>