Browse Source

adding testing

Tomi Cvetic 5 years ago
parent
commit
8d6980fa06
3 changed files with 768 additions and 4 deletions
  1. 9 0
      frontend/components/training.js
  2. 757 3
      frontend/package-lock.json
  3. 2 1
      frontend/package.json

+ 9 - 0
frontend/components/training.js

@@ -1,4 +1,5 @@
 import theme from '../styles/theme'
+import PropTypes from 'prop-types'
 
 import TrainingBlock from './trainingBlock'
 
@@ -112,4 +113,12 @@ const Training = props => (
   </article>
 )
 
+Training.propTypes = {
+  title: PropTypes.string.isRequired,
+  type: PropTypes.shape({
+    name: PropTypes.string.isRequired,
+    description: PropTypes.string
+  })
+}
+
 export default Training

File diff suppressed because it is too large
+ 757 - 3
frontend/package-lock.json


+ 2 - 1
frontend/package.json

@@ -33,7 +33,8 @@
     "yup": "^0.27.0"
   },
   "devDependencies": {
-    "babel-eslint": "^10.0.3"
+    "babel-eslint": "^10.0.3",
+    "jest": "^24.9.0"
   },
   "standard": {
     "parser": "babel-eslint"

Some files were not shown because too many files changed in this diff