Skip to content

Commit d71ef88

Browse files
committedJul 24, 2020
added jest snapshot tests
1 parent f7099e1 commit d71ef88

19 files changed

+2994
-73
lines changed
 

‎.babelrc

+9-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,13 @@
1111
}
1212
],
1313
"@babel/react"
14-
]
14+
],
15+
"env": {
16+
"test": {
17+
"presets": [
18+
"@babel/env",
19+
"@babel/react"
20+
]
21+
}
22+
}
1523
}

‎.eslintignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ dist
22

33
node_modules
44

5-
storybook-static
5+
storybook-static
6+
7+
coverage

‎.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
},
66
"extends": [
77
"plugin:react/recommended",
8+
"plugin:jest/recommended",
89
"standard",
910
"prettier"
1011
],

‎.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ dist
22

33
node_modules
44

5-
storybook-static
5+
storybook-static
6+
7+
coverage

‎.prettierignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44

55
*.html
66

7-
/storybook-static
7+
/storybook-static
8+
9+
/coverage

‎examples/ssr/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
const React = require('react')
22
const express = require('express')
3-
const { Loader1 } = require('react-spinner-css')
3+
const { Loader3 } = require('react-spinner-css')
44
const ReactDOM = require('react-dom/server')
55
const app = express()
66
const port = 3000
77

88
app.get('*', (req, res) => {
9-
const el = React.createElement(Loader1)
9+
const el = React.createElement(Loader3)
1010
const html = ReactDOM.renderToString(el)
1111
res.send(`<!DOCTYPE html>
1212
<html lang="en">

‎examples/ssr/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
"react-dom": "latest",
1414
"react-spinner-css": "file:../.."
1515
}
16-
}
16+
}

‎mocks/styles.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {}

0 commit comments

Comments
 (0)