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()
})
import { configureAxe, axe, toHaveNoViolations, JestAxe } from 'jest-axe';
expect.extend(toHaveNoViolations);
const newJestWithDefaults: JestAxe = configureAxe();
const newJestWithOptions: JestAxe = configureAxe({
elementRef: false,
iframes: false,
rules: {},
runOnly: {
type: 'rules',
values: [],
},
selectors: false,
});
const sameJest: JestAxe = axe;
expect('').toHaveNoViolations();
expect(document.body).toHaveNoViolations();
import { configureAxe, axe, toHaveNoViolations, JestAxe } from 'jest-axe';
expect.extend(toHaveNoViolations);
const newJestWithDefaults: JestAxe = configureAxe();
const newJestWithOptions: JestAxe = configureAxe({
elementRef: false,
iframes: false,
rules: {},
runOnly: {
type: 'rules',
values: [],
},
selectors: false,
});
const sameJest: JestAxe = axe;
expect('').toHaveNoViolations();
expect(document.body).toHaveNoViolations();
async () => {