+ ...,
]
`)
})
diff --git a/src/__tests__/new-act.js b/src/__tests__/new-act.js
index 56ce4970..42552594 100644
--- a/src/__tests__/new-act.js
+++ b/src/__tests__/new-act.js
@@ -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,
],
]
`)
@@ -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,
],
]
`)
diff --git a/src/__tests__/no-act.js b/src/__tests__/no-act.js
index 039a79ae..686d78bb 100644
--- a/src/__tests__/no-act.js
+++ b/src/__tests__/no-act.js
@@ -2,7 +2,7 @@ let act, asyncAct
beforeEach(() => {
jest.resetModules()
- act = require('..').act
+ act = require('../pure').act
asyncAct = require('../act-compat').asyncAct
jest.spyOn(console, 'error').mockImplementation(() => {})
})
@@ -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,
],
]
`)
@@ -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,
],
]
`)
diff --git a/src/__tests__/old-act.js b/src/__tests__/old-act.js
index b3de9377..0153fea3 100644
--- a/src/__tests__/old-act.js
+++ b/src/__tests__/old-act.js
@@ -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
@@ -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,
],
]
`)
@@ -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,
],
]
`)
@@ -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.,
],
]
`)
diff --git a/src/__tests__/render.js b/src/__tests__/render.js
index fdc1ff4c..fea1a649 100644
--- a/src/__tests__/render.js
+++ b/src/__tests__/render.js
@@ -78,14 +78,14 @@ test('renders options.wrapper around node', () => {
expect(screen.getByTestId('wrapper')).toBeInTheDocument()
expect(container.firstChild).toMatchInlineSnapshot(`
-