File tree Expand file tree Collapse file tree 4 files changed +9
-15
lines changed Expand file tree Collapse file tree 4 files changed +9
-15
lines changed Original file line number Diff line number Diff line change 4141 "author" : " Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)" ,
4242 "license" : " MIT" ,
4343 "dependencies" : {
44- "@babel/runtime" : " ^7.5.4 " ,
45- "@testing-library/dom" : " ^5.5.4 "
44+ "@babel/runtime" : " ^7.5.5 " ,
45+ "@testing-library/dom" : " ^5.6.1 "
4646 },
4747 "devDependencies" : {
4848 "@reach/router" : " ^1.2.1" ,
4949 "@testing-library/jest-dom" : " ^4.0.0" ,
50- "@types/react" : " ^16.8.23 " ,
51- "@types/react-dom" : " ^16.8.4 " ,
50+ "@types/react" : " ^16.8.25 " ,
51+ "@types/react-dom" : " ^16.8.5 " ,
5252 "kcd-scripts" : " ^1.5.2" ,
53- "react" : " ^16.8.6 " ,
54- "react-dom" : " ^16.8.6 "
53+ "react" : " ^16.9.0 " ,
54+ "react-dom" : " ^16.9.0 "
5555 },
5656 "peerDependencies" : {
5757 "react" : " *" ,
Original file line number Diff line number Diff line change @@ -10,10 +10,6 @@ afterEach(() => {
1010 console . error . mockRestore ( )
1111} )
1212
13- jest . mock ( '../react-dom-16.9.0-is-released' , ( ) => ( {
14- reactDomSixteenPointNineIsReleased : true ,
15- } ) )
16-
1713jest . mock ( 'react-dom/test-utils' , ( ) => ( {
1814 act : cb => {
1915 cb ( )
Original file line number Diff line number Diff line change 11import React from 'react'
22import ReactDOM from 'react-dom'
33import * as testUtils from 'react-dom/test-utils'
4- import { reactDomSixteenPointNineIsReleased } from './react-dom-16.9.0-is-released'
54
65const reactAct = testUtils . act
76const actSupported = reactAct !== undefined
@@ -28,6 +27,7 @@ function asyncAct(cb) {
2827 const originalConsoleError = console . error
2928 console . error = function error ( ...args ) {
3029 /* if console.error fired *with that specific message* */
30+ /* istanbul ignore next */
3131 if (
3232 args [ 0 ] . indexOf (
3333 'Warning: Do not await the result of calling ReactTestUtils.act' ,
@@ -75,8 +75,8 @@ function asyncAct(cb) {
7575
7676 if ( isAsyncActSupported === false ) {
7777 console . error = originalConsoleError
78- /* istanbul- ignore- next */
79- if ( ! youHaveBeenWarned && reactDomSixteenPointNineIsReleased ) {
78+ /* istanbul ignore next */
79+ if ( ! youHaveBeenWarned ) {
8080 // if act is supported and async act isn't and they're trying to use async
8181 // act, then they need to upgrade from 16.8 to 16.9.
8282 // This is a seemless upgrade, so we'll add a warning
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments