File tree Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 55
55
"jest-dom" : " 3.1.3" ,
56
56
"jest-in-case" : " ^1.0.2" ,
57
57
"kcd-scripts" : " 1.1.2" ,
58
- "react" : " 16.9.0-alpha.0 " ,
59
- "react-dom" : " 16.9.0-alpha.0 " ,
58
+ "react" : " ^ 16.8.6 " ,
59
+ "react-dom" : " ^ 16.8.6 " ,
60
60
"react-intl" : " ^2.8.0" ,
61
61
"react-redux" : " 6.0.1" ,
62
62
"react-router" : " ^5.0.0" ,
Original file line number Diff line number Diff line change 1
1
import { asyncAct } from '../act-compat'
2
2
3
+ jest . mock ( '../react-dom-16.9.0-is-released' , ( ) => ( {
4
+ reactDomSixteenPointNineIsReleased : true ,
5
+ } ) )
6
+
3
7
jest . mock ( 'react-dom/test-utils' , ( ) => ( {
4
8
act : cb => {
5
9
const promise = cb ( )
Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
2
import ReactDOM from 'react-dom'
3
+ import { reactDomSixteenPointNineIsReleased } from './react-dom-16.9.0-is-released'
3
4
4
5
let reactAct
5
6
let actSupported = false
@@ -39,7 +40,11 @@ let youHaveBeenWarned = false
39
40
// state updates asynchronously, but at least we can tell people they need
40
41
// to upgrade to avoid the warnings.
41
42
async function asyncActPolyfill ( cb ) {
42
- if ( ! youHaveBeenWarned && actSupported ) {
43
+ if (
44
+ ! youHaveBeenWarned &&
45
+ actSupported &&
46
+ reactDomSixteenPointNineIsReleased
47
+ ) {
43
48
// if act is supported and async act isn't and they're trying to use async
44
49
// act, then they need to upgrade from 16.8 to 16.9.
45
50
// This is a seemless upgrade, so we'll add a warning
Original file line number Diff line number Diff line change
1
+ // we don't want to warn until react-dom@16.9.0 is actually released
2
+ export const reactDomSixteenPointNineIsReleased = false
You can’t perform that action at this time.
0 commit comments