Skip to content

Commit

Permalink
Merge 42c2528 into 9ce3213
Browse files Browse the repository at this point in the history
  • Loading branch information
zemccartney committed Apr 25, 2021
2 parents 9ce3213 + 42c2528 commit f2efc57
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 19 deletions.
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,31 @@
"peerDependencies": {
"redux": ">=3 <5",
"redux-thunk": "2.x.x",
"immer": ">=1 <7",
"immer": ">=1 <10",
"normalizr": "3.x.x",
"react": ">=16.8.x <17"
"react": ">=16.8.x <18"
},
"devDependencies": {
"@babel/core": "7.x.x",
"@babel/preset-env": "7.x.x",
"@hapi/code": "8.x.x",
"@hapi/lab": "22.x.x",
"@rollup/plugin-node-resolve": "7.x.x",
"@testing-library/react-hooks": "3.x.x",
"@hapi/lab": "24.x.x",
"@rollup/plugin-babel": "5.x.x",
"@rollup/plugin-node-resolve": "11.x.x",
"@testing-library/react-hooks": "5.x.x",
"coveralls": "3.x.x",
"immer": "6.x.x",
"immer": "9.x.x",
"normalizr": "3.x.x",
"npm-run-all": "4.x.x",
"react": "^16.8.x",
"react-test-renderer": "^16.8.x",
"react": "17.x.x",
"react-test-renderer": "17.x.x",
"redux": "4.x.x",
"redux-thunk": "2.x.x",
"rimraf": "3.x.x",
"rollup": "2.x.x",
"rollup-plugin-babel": "4.x.x",
"rollup-plugin-cjs-es": "1.x.x",
"rollup-plugin-filesize": "7.x.x",
"rollup-plugin-filesize": "9.x.x",
"rollup-plugin-peer-deps-external": "2.x.x",
"rollup-plugin-terser": "5.x.x"
"rollup-plugin-terser": "7.x.x"
}
}
12 changes: 6 additions & 6 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

const PeerDepsExternal = require('rollup-plugin-peer-deps-external');
const Resolve = require('@rollup/plugin-node-resolve');
const { nodeResolve: NodeResolve } = require('@rollup/plugin-node-resolve');
const Commonjs = require('rollup-plugin-cjs-es');
const Babel = require('rollup-plugin-babel');
const { babel: Babel } = require('@rollup/plugin-babel');
const { terser: Terser } = require('rollup-plugin-terser');
const Filesize = require('rollup-plugin-filesize');

Expand All @@ -26,9 +26,9 @@ module.exports = [
],
plugins: [
PeerDepsExternal(),
Resolve(),
NodeResolve(),
Commonjs(),
Babel({ exclude: ['node_modules/**'] }),
Babel({ exclude: ['node_modules/**'], babelHelpers: 'bundled' }),
Filesize()
]
},
Expand All @@ -51,9 +51,9 @@ module.exports = [
},
plugins: [
PeerDepsExternal(),
Resolve(),
NodeResolve(),
Commonjs(),
Babel({ exclude: ['node_modules/**'] }),
Babel({ exclude: ['node_modules/**'], babelHelpers: 'bundled' }),
Terser(),
Filesize()
]
Expand Down
14 changes: 12 additions & 2 deletions test/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ const Code = require('@hapi/code');
const Lab = require('@hapi/lab');
const React = require('react');
const Redux = require('redux');
const TestingHooks = require('@testing-library/react-hooks');
const TestingHooks = require('@testing-library/react-hooks/pure');
const TestRenderer = require('react-test-renderer');
const MiddleEnd = require('../lib');

const { describe, it } = exports.lab = Lab.script();
const { after, before, describe, it } = exports.lab = Lab.script();
const expect = Code.expect;

const createMiddleEnd = (init = true, initialState = 0) => {
Expand Down Expand Up @@ -42,6 +42,16 @@ const createMiddleEnd = (init = true, initialState = 0) => {

describe('React', () => {

let restoreConsole;
before(() => {

restoreConsole = TestingHooks.suppressErrorOutput();
});
after(() => {

restoreConsole();
});

describe('useMiddleEnd', () => {

it('throws if user does not provide a middle-end.', (flags) => {
Expand Down

0 comments on commit f2efc57

Please sign in to comment.