Skip to content

Commit

Permalink
Bump kcd-scripts to 10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jun 8, 2021
1 parent b9cd1e6 commit b6a7c70
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 32 deletions.
2 changes: 1 addition & 1 deletion package.json
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": "^9.1.0",
"kcd-scripts": "^10.1.1",
"npm-run-all": "^4.1.5",
"react": "^17.0.1",
"react-dom": "^17.0.1",
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/cleanup.js
Expand Up @@ -63,6 +63,7 @@ describe('fake timers and missing act warnings', () => {
let cancelled = false
setImmediate(() => {
microTaskSpy()
// eslint-disable-next-line jest/no-if -- false positive
if (!cancelled) {
setDeferredCounter(counter)
}
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/debug.js
Expand Up @@ -43,8 +43,8 @@ test('allows same arguments as prettyDOM', () => {
expect(console.log).toHaveBeenCalledTimes(1)
expect(console.log.mock.calls[0]).toMatchInlineSnapshot(`
Array [
"<div>
...",
<div>
...,
]
`)
})
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/new-act.js
Expand Up @@ -49,7 +49,7 @@ test('async act recovers from errors', async () => {
expect(console.error.mock.calls).toMatchInlineSnapshot(`
Array [
Array [
"call console.error",
call console.error,
],
]
`)
Expand All @@ -67,7 +67,7 @@ test('async act recovers from sync errors', async () => {
expect(console.error.mock.calls).toMatchInlineSnapshot(`
Array [
Array [
"call console.error",
call console.error,
],
]
`)
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/no-act.js
Expand Up @@ -53,7 +53,7 @@ test('async act recovers from errors', async () => {
expect(console.error.mock.calls).toMatchInlineSnapshot(`
Array [
Array [
"call console.error",
call console.error,
],
]
`)
Expand All @@ -71,7 +71,7 @@ test('async act recovers from sync errors', async () => {
expect(console.error.mock.calls).toMatchInlineSnapshot(`
Array [
Array [
"call console.error",
call console.error,
],
]
`)
Expand Down
34 changes: 17 additions & 17 deletions src/__tests__/old-act.js
Expand Up @@ -32,18 +32,18 @@ test('async act works even when the act is an old one', async () => {
console.error('sigil')
})
expect(console.error.mock.calls).toMatchInlineSnapshot(`
Array [
Array [
"sigil",
],
Array [
"It looks like you're using a version of react-dom that supports the \\"act\\" function, but not an awaitable version of \\"act\\" which you will need. Please upgrade to at least react-dom@16.9.0 to remove this warning.",
],
Array [
"sigil",
],
]
`)
Array [
Array [
sigil,
],
Array [
It looks like you're using a version of react-dom that supports the "act" function, but not an awaitable version of "act" which you will need. Please upgrade to at least react-dom@16.9.0 to remove this warning.,
],
Array [
sigil,
],
]
`)
expect(callback).toHaveBeenCalledTimes(1)

// and it doesn't warn you twice
Expand Down Expand Up @@ -71,10 +71,10 @@ test('async act recovers from async errors', async () => {
expect(console.error.mock.calls).toMatchInlineSnapshot(`
Array [
Array [
"It looks like you're using a version of react-dom that supports the \\"act\\" function, but not an awaitable version of \\"act\\" which you will need. Please upgrade to at least react-dom@16.9.0 to remove this warning.",
It looks like you're using a version of react-dom that supports the "act" function, but not an awaitable version of "act" which you will need. Please upgrade to at least react-dom@16.9.0 to remove this warning.,
],
Array [
"call console.error",
call console.error,
],
]
`)
Expand All @@ -92,7 +92,7 @@ test('async act recovers from sync errors', async () => {
expect(console.error.mock.calls).toMatchInlineSnapshot(`
Array [
Array [
"call console.error",
call console.error,
],
]
`)
Expand All @@ -109,11 +109,11 @@ test('async act can handle any sort of console.error', async () => {
Array [
Array [
Object {
"error": "some error",
error: some error,
},
],
Array [
"It looks like you're using a version of react-dom that supports the \\"act\\" function, but not an awaitable version of \\"act\\" which you will need. Please upgrade to at least react-dom@16.9.0 to remove this warning.",
It looks like you're using a version of react-dom that supports the "act" function, but not an awaitable version of "act" which you will need. Please upgrade to at least react-dom@16.9.0 to remove this warning.,
],
]
`)
Expand Down
16 changes: 8 additions & 8 deletions src/__tests__/render.js
Expand Up @@ -78,14 +78,14 @@ test('renders options.wrapper around node', () => {

expect(screen.getByTestId('wrapper')).toBeInTheDocument()
expect(container.firstChild).toMatchInlineSnapshot(`
<div
data-testid="wrapper"
>
<div
data-testid="inner"
/>
</div>
`)
<div
data-testid=wrapper
>
<div
data-testid=inner
/>
</div>
`)
})

test('flushes useEffect cleanup functions sync on unmount()', () => {
Expand Down

0 comments on commit b6a7c70

Please sign in to comment.