Skip to content

Commit

Permalink
Replace jest-axe with axe-core directly
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerJDev committed May 13, 2024
1 parent 024124a commit 87a7796
Show file tree
Hide file tree
Showing 61 changed files with 143 additions and 366 deletions.
247 changes: 2 additions & 245 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@
"@testing-library/react": "14.2.1",
"@testing-library/react-hooks": "7.0.2",
"@testing-library/user-event": "^14.3.0",
"@types/jest-axe": "3.5.5",
"@types/lodash.groupby": "4.6.7",
"@types/lodash.isempty": "4.4.9",
"@types/lodash.isobject": "3.0.9",
Expand Down Expand Up @@ -183,7 +182,6 @@
"filesize": "10.1.0",
"front-matter": "4.0.2",
"gzip-size": "6.0.0",
"jest-axe": "7.0.1",
"jest-css-modules": "2.1.0",
"jest-environment-jsdom": "29.7.0",
"jest-fail-on-console": "3.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/ActionList/ActionList.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {render as HTMLRender, waitFor, fireEvent} from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import {axe} from 'jest-axe'
import axe from 'axe-core'
import React from 'react'
import theme from '../theme'
import {ActionList} from '.'
Expand Down Expand Up @@ -78,7 +78,7 @@ describe('ActionList', () => {

it('should have no axe violations', async () => {
const {container} = HTMLRender(<SimpleActionList />)
const results = await axe(container)
const results = await axe.run(container)
expect(results).toHaveNoViolations()
})

Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/BranchName/__tests__/BranchName.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import BranchName from '../BranchName'
import {render, behavesAsComponent, checkExports} from '../../utils/testing'
import {render as HTMLRender} from '@testing-library/react'
import {axe} from 'jest-axe'
import axe from 'axe-core'

describe('BranchName', () => {
behavesAsComponent({Component: BranchName})
Expand All @@ -13,7 +13,7 @@ describe('BranchName', () => {

it('should have no axe violations', async () => {
const {container} = HTMLRender(<BranchName />)
const results = await axe(container)
const results = await axe.run(container)
expect(results).toHaveNoViolations()
})

Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/Breadcrumbs/__tests__/Breadcrumbs.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import Breadcrumbs, {Breadcrumb} from '..'
import {render, behavesAsComponent, checkExports} from '../../utils/testing'
import {render as HTMLRender} from '@testing-library/react'
import {axe} from 'jest-axe'
import axe from 'axe-core'

describe('Breadcrumbs', () => {
behavesAsComponent({Component: Breadcrumbs, options: {skipAs: true}})
Expand All @@ -14,7 +14,7 @@ describe('Breadcrumbs', () => {

it('should have no axe violations', async () => {
const {container} = HTMLRender(<Breadcrumbs />)
const results = await axe(container)
const results = await axe.run(container)
expect(results).toHaveNoViolations()
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {render as HTMLRender} from '@testing-library/react'
import {axe} from 'jest-axe'
import axe from 'axe-core'
import React from 'react'
import Breadcrumbs from '..'
import {behavesAsComponent, render} from '../../utils/testing'
Expand All @@ -13,7 +13,7 @@ describe('Breadcrumbs.Item', () => {

it('should have no axe violations', async () => {
const {container} = HTMLRender(<Breadcrumbs.Item />)
const results = await axe(container)
const results = await axe.run(container)
expect(results).toHaveNoViolations()
})

Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/Button/__tests__/Button.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {SearchIcon, HeartIcon} from '@primer/octicons-react'
import {render, screen, fireEvent} from '@testing-library/react'
import {axe} from 'jest-axe'
import axe from 'axe-core'
import React from 'react'
import {IconButton, Button} from '../../Button'
import {behavesAsComponent} from '../../utils/testing'
Expand All @@ -16,7 +16,7 @@ describe('Button', () => {

it('should have no axe violations', async () => {
const {container} = render(<Button>Click here</Button>)
const results = await axe(container)
const results = await axe.run(container)
expect(results).toHaveNoViolations()
})

Expand Down
Loading

0 comments on commit 87a7796

Please sign in to comment.