Skip to content

Commit

Permalink
Unit Tests Update
Browse files Browse the repository at this point in the history
babel.config.js
  • Loading branch information
edoardo-bluframe committed Jun 6, 2019
1 parent 9f25dc1 commit dc3542b
Show file tree
Hide file tree
Showing 5 changed files with 856 additions and 1,135 deletions.
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

11 changes: 11 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* eslint-disable no-ternary */

module.exports = api => {
const plugins = ["@babel/plugin-transform-flow-strip-types"]

const presets = ["@babel/env", "@babel/react"]

api.cache(true)

return { plugins, presets }
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "react-router-scroll-top",
"description": "An easy scroll to top component based on the React Router Scroll Restoration Example",
"version": "0.1.1",
"main": "index.js",
"main": "dist/react-router-scroll-top.cjs.js",
"module": "dist/react-router-scroll-top.esm.js",
"author": "Edoardo L'Astorina",
Expand Down
24 changes: 2 additions & 22 deletions src/__snapshots__/ScrollToTop.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

exports[`ScrollToTop renders 1`] = `
ShallowWrapper {
"length": 1,
Symbol(enzyme.__root__): [Circular],
Symbol(enzyme.__unrendered__): <ScrollToTop />,
Symbol(enzyme.__renderer__): Object {
"batchedUpdates": [Function],
"getNode": [Function],
"render": [Function],
"simulateError": [Function],
"simulateEvent": [Function],
"unmount": [Function],
},
Expand Down Expand Up @@ -40,16 +40,6 @@ ShallowWrapper {
"adapter": ReactSixteenAdapter {
"options": Object {
"enableComponentDidUpdateOnSetState": true,
"lifecycles": Object {
"componentDidUpdate": Object {
"onSetState": true,
},
"getDerivedStateFromProps": true,
"getSnapshotBeforeUpdate": true,
"setState": Object {
"skipsComponentDidUpdateOnNullish": true,
},
},
},
},
},
Expand All @@ -58,6 +48,7 @@ ShallowWrapper {

exports[`ScrollToTop renders children 1`] = `
ShallowWrapper {
"length": 1,
Symbol(enzyme.__root__): [Circular],
Symbol(enzyme.__unrendered__): <ScrollToTop>
<UNDEFINED />
Expand All @@ -66,7 +57,6 @@ ShallowWrapper {
"batchedUpdates": [Function],
"getNode": [Function],
"render": [Function],
"simulateError": [Function],
"simulateEvent": [Function],
"unmount": [Function],
},
Expand Down Expand Up @@ -114,16 +104,6 @@ ShallowWrapper {
"adapter": ReactSixteenAdapter {
"options": Object {
"enableComponentDidUpdateOnSetState": true,
"lifecycles": Object {
"componentDidUpdate": Object {
"onSetState": true,
},
"getDerivedStateFromProps": true,
"getSnapshotBeforeUpdate": true,
"setState": Object {
"skipsComponentDidUpdateOnNullish": true,
},
},
},
},
},
Expand Down
Loading

0 comments on commit dc3542b

Please sign in to comment.