Skip to content

Commit 9c6e4e5

Browse files
committed
Test everything using React 16
1 parent db0314b commit 9c6e4e5

File tree

3 files changed

+39
-48
lines changed

3 files changed

+39
-48
lines changed

modules/__tests__/integration-test.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,3 @@ it("works", done => {
6767
div
6868
)
6969
})
70-
71-
it("throws an invariant violation when a subscriber is rendered outside of a broadcast", () => {
72-
const renderSubscriberOnly = () => {
73-
ReactDOM.render(
74-
<Subscriber channel="test">{() => null}</Subscriber>,
75-
document.createElement("div")
76-
)
77-
}
78-
79-
expect(renderSubscriberOnly).toThrow(/<Subscriber channel="test">.*<Broadcast channel="test".*/)
80-
})

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
"repository": "ReactTraining/react-broadcast",
66
"author": "Michael Jackson",
77
"license": "MIT",
8-
"files": [
9-
"cjs",
10-
"esm",
11-
"umd"
12-
],
8+
"files": ["cjs", "esm", "umd"],
139
"main": "cjs/react-broadcast.js",
1410
"module": "esm/react-broadcast.js",
1511
"unpkg": "umd/react-broadcast.js",
@@ -22,11 +18,11 @@
2218
"test": "jest"
2319
},
2420
"peerDependencies": {
25-
"react": ">=15 || ^16.0.0-rc"
21+
"react": ">=15 || ^16"
2622
},
2723
"dependencies": {
2824
"invariant": "^2.2.1",
29-
"prop-types": "^15.5.6"
25+
"prop-types": "^15.6.0"
3026
},
3127
"devDependencies": {
3228
"babel-core": "^6.17.0",
@@ -45,8 +41,9 @@
4541
"jest": "^21.0.2",
4642
"pascal-case": "^2.0.1",
4743
"pretty-bytes": "^4.0.0",
48-
"react": "^15.3.0",
49-
"react-dom": "^15.3.0",
44+
"raf": "^3.4.0",
45+
"react": "^16.2.0",
46+
"react-dom": "^16.2.0",
5047
"readline-sync": "^1.4.4",
5148
"rollup": "^0.49.3",
5249
"rollup-plugin-babel": "^3.0.2",
@@ -55,6 +52,9 @@
5552
"rollup-plugin-replace": "^2.0.0",
5653
"rollup-plugin-uglify": "^2.0.1"
5754
},
55+
"jest": {
56+
"setupFiles": ["raf/polyfill"]
57+
},
5858
"keywords": [
5959
"react",
6060
"context",

yarn.lock

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,14 +1258,6 @@ [email protected], core-util-is@~1.0.0:
12581258
version "1.0.2"
12591259
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
12601260

1261-
create-react-class@^15.6.0:
1262-
version "15.6.0"
1263-
resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.0.tgz#ab448497c26566e1e29413e883207d57cfe7bed4"
1264-
dependencies:
1265-
fbjs "^0.8.9"
1266-
loose-envify "^1.3.1"
1267-
object-assign "^4.1.1"
1268-
12691261
cross-spawn@^5.0.1:
12701262
version "5.1.0"
12711263
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
@@ -1704,9 +1696,9 @@ fb-watchman@^2.0.0:
17041696
dependencies:
17051697
bser "^2.0.0"
17061698

1707-
fbjs@^0.8.9:
1708-
version "0.8.15"
1709-
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.15.tgz#4f0695fdfcc16c37c0b07facec8cb4c4091685b9"
1699+
fbjs@^0.8.16:
1700+
version "0.8.16"
1701+
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db"
17101702
dependencies:
17111703
core-js "^1.0.0"
17121704
isomorphic-fetch "^2.1.1"
@@ -3059,6 +3051,10 @@ performance-now@^0.2.0:
30593051
version "0.2.0"
30603052
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5"
30613053

3054+
performance-now@^2.1.0:
3055+
version "2.1.0"
3056+
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
3057+
30623058
pify@^2.0.0:
30633059
version "2.3.0"
30643060
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
@@ -3124,12 +3120,13 @@ promise@^7.1.1:
31243120
dependencies:
31253121
asap "~2.0.3"
31263122

3127-
prop-types@^15.5.10, prop-types@^15.5.6:
3128-
version "15.5.10"
3129-
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154"
3123+
prop-types@^15.6.0:
3124+
version "15.6.0"
3125+
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856"
31303126
dependencies:
3131-
fbjs "^0.8.9"
3127+
fbjs "^0.8.16"
31323128
loose-envify "^1.3.1"
3129+
object-assign "^4.1.1"
31333130

31343131
prr@~0.0.0:
31353132
version "0.0.0"
@@ -3147,6 +3144,12 @@ qs@~6.4.0:
31473144
version "6.4.0"
31483145
resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
31493146

3147+
raf@^3.4.0:
3148+
version "3.4.0"
3149+
resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.0.tgz#a28876881b4bc2ca9117d4138163ddb80f781575"
3150+
dependencies:
3151+
performance-now "^2.1.0"
3152+
31503153
randomatic@^1.1.3:
31513154
version "1.1.7"
31523155
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
@@ -3163,24 +3166,23 @@ rc@^1.1.7:
31633166
minimist "^1.2.0"
31643167
strip-json-comments "~2.0.1"
31653168

3166-
react-dom@^15.3.0:
3167-
version "15.6.1"
3168-
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.1.tgz#2cb0ed4191038e53c209eb3a79a23e2a4cf99470"
3169+
react-dom@^16.2.0:
3170+
version "16.2.0"
3171+
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.2.0.tgz#69003178601c0ca19b709b33a83369fe6124c044"
31693172
dependencies:
3170-
fbjs "^0.8.9"
3173+
fbjs "^0.8.16"
31713174
loose-envify "^1.1.0"
3172-
object-assign "^4.1.0"
3173-
prop-types "^15.5.10"
3175+
object-assign "^4.1.1"
3176+
prop-types "^15.6.0"
31743177

3175-
react@^15.3.0:
3176-
version "15.6.1"
3177-
resolved "https://registry.yarnpkg.com/react/-/react-15.6.1.tgz#baa8434ec6780bde997cdc380b79cd33b96393df"
3178+
react@^16.2.0:
3179+
version "16.2.0"
3180+
resolved "https://registry.yarnpkg.com/react/-/react-16.2.0.tgz#a31bd2dab89bff65d42134fa187f24d054c273ba"
31783181
dependencies:
3179-
create-react-class "^15.6.0"
3180-
fbjs "^0.8.9"
3182+
fbjs "^0.8.16"
31813183
loose-envify "^1.1.0"
3182-
object-assign "^4.1.0"
3183-
prop-types "^15.5.10"
3184+
object-assign "^4.1.1"
3185+
prop-types "^15.6.0"
31843186

31853187
read-pkg-up@^1.0.1:
31863188
version "1.0.1"

0 commit comments

Comments
 (0)