Skip to content

Commit

Permalink
Bump kcd-scripts to 9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jun 8, 2021
1 parent 0880f24 commit b9cd1e6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@testing-library/jest-dom": "^5.11.6",
"@types/react-dom": "^17.0.0",
"dotenv-cli": "^4.0.0",
"kcd-scripts": "^8.3.0",
"kcd-scripts": "^9.1.0",
"npm-run-all": "^4.1.5",
"react": "^17.0.1",
"react-dom": "^17.0.1",
Expand All @@ -68,7 +68,10 @@
"react/no-adjacent-inline-elements": "off",
"import/no-unassigned-import": "off",
"import/named": "off",
"testing-library/no-dom-import": "off"
"testing-library/no-container": "off",
"testing-library/no-dom-import": "off",
"testing-library/no-unnecessary-act": "off",
"testing-library/prefer-user-event": "off"
}
},
"eslintIgnore": [
Expand Down
32 changes: 16 additions & 16 deletions types/test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,39 @@ import {render, fireEvent, screen, waitFor} from '.'
import * as pure from './pure'

export async function testRender() {
const page = render(<button />)
const view = render(<button />)

// single queries
page.getByText('foo')
page.queryByText('foo')
await page.findByText('foo')
view.getByText('foo')
view.queryByText('foo')
await view.findByText('foo')

// multiple queries
page.getAllByText('bar')
page.queryAllByText('bar')
await page.findAllByText('bar')
view.getAllByText('bar')
view.queryAllByText('bar')
await view.findAllByText('bar')

// helpers
const {container, rerender, debug} = page
const {container, rerender, debug} = view
expectType<HTMLElement, typeof container>(container)
return {container, rerender, debug}
}

export async function testPureRender() {
const page = pure.render(<button />)
const view = pure.render(<button />)

// single queries
page.getByText('foo')
page.queryByText('foo')
await page.findByText('foo')
view.getByText('foo')
view.queryByText('foo')
await view.findByText('foo')

// multiple queries
page.getAllByText('bar')
page.queryAllByText('bar')
await page.findAllByText('bar')
view.getAllByText('bar')
view.queryAllByText('bar')
await view.findAllByText('bar')

// helpers
const {container, rerender, debug} = page
const {container, rerender, debug} = view
expectType<HTMLElement, typeof container>(container)
return {container, rerender, debug}
}
Expand Down

0 comments on commit b9cd1e6

Please sign in to comment.