Update test configs (#1417)

* chore(package.json): use latest babel core, remove bridge

* test(.babelrc): add test environment so that Jest can use ES6 imports

* test(usetable): fix import
This commit is contained in:
Larry Botha
2019-07-29 15:34:33 -05:00
committed by Tanner Linsley
parent 0375a7e7d5
commit 14a43b1a68
4 changed files with 1306 additions and 1975 deletions

View File

@@ -7,5 +7,12 @@
}
],
"@babel/react"
]
],
"env": {
"test": {
"presets": [
"@babel/preset-env"
]
}
}
}

3268
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -44,6 +44,7 @@
"react-dom": "^16.8.3"
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "^7.0.0",
@@ -52,7 +53,6 @@
"@testing-library/dom": "^5.6.0",
"@testing-library/jest-dom": "^4.0.0",
"@testing-library/react": "^8.0.7",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "9.x",
"commitizen": "^4.0.3",
"cross-env": "^5.2.0",

View File

@@ -4,7 +4,7 @@ import '@testing-library/jest-dom/extend-expect'
import React from 'react'
import { render } from '@testing-library/react'
import useTable from './useTable'
import { useTable } from '../useTable'
function Table({ columns, data }) {
// Use the state and functions returned from useTable to build your UI