Skip to content

Commit 3c8aef6

Browse files
committed
Merge branch 'master' into serverreIntegration
2 parents 1d5911c + 22880c3 commit 3c8aef6

File tree

6 files changed

+33
-11
lines changed

6 files changed

+33
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Download for [MacOS](https://github.com/team-reactype/ReacType/releases), [Windo
2929

3030
- **Linux users**: run the application as a super user in order to read and write files.
3131

32-
![Gif of adding](https://i.imgur.com/hdVTFcP.gif)
32+
![Gif of adding](https://i.imgur.com/nOeuuU6.gif)
3333

3434
### How to use
3535

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Enzyme testing suite renders snapshots, too 1`] = `
4+
<div>
5+
<h1>
6+
Hello, Enzyme!
7+
</h1>
8+
</div>
9+
`;

__tests__/enzyme.test.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { shallow } from 'enzyme';
2+
import React from 'react';
3+
4+
describe('Enzyme testing suite', () => {
5+
6+
it('renders snapshots, too', () => {
7+
const wrapper = shallow(<div>
8+
<h1>Hello, Enzyme!</h1>
9+
</div>)
10+
expect(wrapper).toMatchSnapshot()
11+
})
12+
})

app/setupTests.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { configure } from 'enzyme'
2+
import Adapter from 'enzyme-adapter-react-16'
3+
4+
configure({
5+
adapter: new Adapter(),
6+
})

app/src/setupTests.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@
7272
"diagnostics": false
7373
}
7474
},
75-
"testTimeout": 50000
75+
"setupFilesAfterEnv": ["<rootDir>/app/setupTests.ts"],
76+
"snapshotSerializers": ["enzyme-to-json/serializer"]
7677
},
7778
"bugs": {
7879
"url": "https://github.com/open-source-labs/ReacType/issues"
@@ -84,8 +85,6 @@
8485
"@material-ui/core": "^4.11.0",
8586
"@material-ui/icons": "^4.0.1",
8687
"@material-ui/styles": "^4.9.6",
87-
"@types/enzyme": "^3.10.5",
88-
"@types/enzyme-adapter-react-16": "^1.0.6",
8988
"@types/js-cookie": "^2.2.6",
9089
"@types/node": "^14.0.20",
9190
"@types/prettier": "^1.19.0",
@@ -125,6 +124,8 @@
125124
"@babel/preset-react": "^7.10.4",
126125
"@babel/preset-typescript": "^7.10.4",
127126
"@types/chai": "^4.2.11",
127+
"@types/enzyme": "^3.10.5",
128+
"@types/enzyme-adapter-react-16": "^1.0.6",
128129
"@types/jest": "^25.1.5",
129130
"babel-eslint": "^8.2.6",
130131
"babel-jest": "^25.2.4",
@@ -137,6 +138,7 @@
137138
"dotenv": "^8.2.0",
138139
"electron": "^9.1.0",
139140
"electron-builder": "^22.7.0",
141+
"enzyme-to-json": "^3.5.0",
140142
"eslint": "^4.19.1",
141143
"eslint-config-airbnb-base": "^13.0.0",
142144
"eslint-plugin-babel": "^5.3.1",

0 commit comments

Comments
 (0)