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 have no axe violations", async () => {
const {container} = HTMLRender()
const results = await axe(container)
expect(results).toHaveNoViolations()
cleanup()
})
it('should have no axe violations', async () => {
const {container} = HTMLRender()
const results = await axe(container)
expect(results).toHaveNoViolations()
cleanup()
})
it("passes axe tests", async () => {
let html = mountedDataValidation().html();
expect(await axe(html)).toHaveNoViolations();
});
it('should have no accessibility violations', async () => {
const container = document.createElement('div');
document.body.append(container);
render(
item
,
container
);
const results = await axe(document.body);
expect(results).toHaveNoViolations();
});
it('should be accessible when both all options and the group have a label', async () => {
expect.assertions(1);
const html = ReactDOMServer.renderToString(
,
);
const results = await axe(html);
expect(results).toHaveNoViolations();
});
});
it('should be accessible when label is passed', async () => {
expect.assertions(1);
const html = ReactDOMServer.renderToString(
,
);
const results = await axe(html);
expect(results).toHaveNoViolations();
});
it('should be accessible when label is not passed', async () => {
test('Accessibility', async() => {
const html = ReactDOMServer.renderToString()
const results = await axe(html)
expect(results).toHaveNoViolations()
})
})
it('should have no axe violations', async () => {
const {container} = HTMLRender()
const results = await axe(container)
expect(results).toHaveNoViolations()
cleanup()
})
test("Axe doesn’t find any violations", async () => {
const wrapper = shallowMountComponent();
const html = wrapper.html();
expect(await axe(html)).toHaveNoViolations();
});
});
async function renderWithAxeResults(...args) {
const { container, ...rest } = await render(...args)
const axeResults = await axe(container.innerHTML)
return { axeResults, container, ...rest }
}