Skip to content

Commit

Permalink
chore: update deps and fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Jun 23, 2020
1 parent d10a13d commit a72fb39
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -69,7 +69,8 @@
"react/prop-types": "off",
"react/no-adjacent-inline-elements": "off",
"import/no-unassigned-import": "off",
"import/named": "off"
"import/named": "off",
"testing-library/no-dom-import": "off"
}
},
"eslintIgnore": [
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/auto-cleanup.js
Expand Up @@ -9,5 +9,5 @@ test('first', () => {
})

test('second', () => {
expect(document.body.innerHTML).toEqual('')
expect(document.body).toBeEmpty()
})
2 changes: 1 addition & 1 deletion src/__tests__/cleanup.js
Expand Up @@ -18,7 +18,7 @@ test('cleans up the document', async () => {

render(<Test />)
await cleanup()
expect(document.body.innerHTML).toBe('')
expect(document.body).toBeEmpty()
expect(spy).toHaveBeenCalledTimes(1)
})

Expand Down
6 changes: 5 additions & 1 deletion src/__tests__/debug.js
Expand Up @@ -49,4 +49,8 @@ test('allows same arguments as prettyDOM', () => {
`)
})

/* eslint no-console:0 */
/*
eslint
no-console: "off",
testing-library/no-debug: "off",
*/
6 changes: 6 additions & 0 deletions src/__tests__/multi-base.js
Expand Up @@ -37,3 +37,9 @@ test('baseElement isolates trees from one another', () => {
'Unable to find an element with the text: Hyde.',
)
})

// https://github.com/testing-library/eslint-plugin-testing-library/issues/188
/*
eslint
testing-library/prefer-screen-queries: "off",
*/
2 changes: 1 addition & 1 deletion src/__tests__/stopwatch.js
Expand Up @@ -47,7 +47,7 @@ test('unmounts a component', async () => {
// hey there reader! You don't need to have an assertion like this one
// this is just me making sure that the unmount function works.
// You don't need to do this in your apps. Just rely on the fact that this works.
expect(container.innerHTML).toBe('')
expect(container).toBeEmpty()
// just wait to see if the interval is cleared or not
// if it's not, then we'll call setState on an unmounted component
// and get an error.
Expand Down

0 comments on commit a72fb39

Please sign in to comment.