Skip to content

Commit 1938a50

Browse files
authored
chore: bump Jest, remove flaky inline snapshot (#150)
### Summary Bumping Jest to latest, removed inline snapshot as there's a pending bug with trailing whitespaces inside of it being removed by IDEs (solution is to make them regular snapshots, but in this case the test was just plain unnecessary) ### Test plan CI
1 parent 439db6c commit 1938a50

File tree

4 files changed

+585
-273
lines changed

4 files changed

+585
-273
lines changed

.prettierrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// added for Jest inline snapshots to not use default Prettier config
2+
module.exports = {
3+
singleQuote: true,
4+
trailingComma: "es5"
5+
}

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@
1111
"devDependencies": {
1212
"@babel/cli": "^7.1.2",
1313
"@babel/core": "^7.1.2",
14-
"@babel/runtime": "^7.1.2",
1514
"@callstack/eslint-config": "^4.0.1",
1615
"@types/react": "^16.7.11",
1716
"@types/react-test-renderer": "^16.0.3",
18-
"babel-jest": "^24.1.0",
17+
"babel-jest": "^24.7.1",
1918
"chalk": "^2.4.1",
2019
"conventional-changelog-cli": "^2.0.11",
2120
"dedent": "^0.7.0",
2221
"eslint": "^5.15.2",
2322
"flow-bin": "^0.97.0",
2423
"flow-copy-source": "^2.0.2",
25-
"jest": "^24.1.0",
24+
"jest": "^24.7.1",
2625
"metro-react-native-babel-preset": "^0.52.0",
2726
"react": "^16.8.3",
2827
"react-native": "^0.59.0",

src/__tests__/render.test.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,6 @@ test('getByText, queryByText with children as Array', () => {
150150

151151
const { getByText } = render(<BananaStore />);
152152

153-
const { toJSON } = render(<BananaCounter numBananas={3} />);
154-
expect(toJSON()).toMatchInlineSnapshot(`
155-
<Text>
156-
There are
157-
3
158-
bananas in the bunch
159-
</Text>
160-
`);
161-
162153
const threeBananaBunch = getByText('There are 3 bananas in the bunch');
163154
expect(threeBananaBunch.props.children).toEqual([
164155
'There are ',

0 commit comments

Comments
 (0)