@ornikar/jest-config-react 11.2.0 → 11.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [11.3.1](https://github.com/ornikar/shared-configs/compare/@ornikar/jest-config-react@11.3.0...@ornikar/jest-config-react@11.3.1) (2023-09-14)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * storybook mocks should be in testSetupAfterEnv to make sure testing-library is cleanup properly [no issue] ([#969](https://github.com/ornikar/shared-configs/issues/969)) ([10ed164](https://github.com/ornikar/shared-configs/commit/10ed164f69c3003e9ee87c8b1c2cdfeb154a7ffe))
12
+
13
+
14
+
15
+ ## [11.3.0](https://github.com/ornikar/shared-configs/compare/@ornikar/jest-config-react@11.2.0...@ornikar/jest-config-react@11.3.0) (2023-08-28)
16
+
17
+
18
+ ### Features
19
+
20
+ * silence warnings linked to react-native-web 19 INS-2508 ([#958](https://github.com/ornikar/shared-configs/issues/958)) ([4c3356a](https://github.com/ornikar/shared-configs/commit/4c3356a254ed9be32d27c894274e9560caf87040))
21
+
22
+
23
+
6
24
  ## [11.2.0](https://github.com/ornikar/shared-configs/compare/@ornikar/jest-config-react@11.1.1...@ornikar/jest-config-react@11.2.0) (2023-08-01)
7
25
 
8
26
 
@@ -2,6 +2,12 @@
2
2
 
3
3
  'use strict';
4
4
 
5
+ if (!global.afterAll) {
6
+ throw new Error(
7
+ 'Missing afterAll global in mock @storybook/react. Please check your jest test-setup and make sure you use testSetupAfterEnv.',
8
+ );
9
+ }
10
+
5
11
  const decorateStory = (storyFn, decorators) =>
6
12
  // eslint-disable-next-line unicorn/no-array-reduce
7
13
  decorators.reduce(
@@ -76,12 +82,11 @@ exports.storiesOf = (groupName) => {
76
82
  : ({ children }) => decorateStory(() => children, [...localDecorators, ...globalDecorators])(context);
77
83
 
78
84
  const rtlApi = render(story(context), { wrapper: wrappingComponent });
79
- const { unmount, asFragment } = rtlApi;
85
+ const { asFragment } = rtlApi;
80
86
  if (waitForExpectation) {
81
87
  await waitFor(() => waitForExpectation(rtlApi, expect, { parameters }));
82
88
  }
83
89
  expect(asFragment()).toMatchSnapshot();
84
- unmount();
85
90
  });
86
91
  });
87
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ornikar/jest-config-react",
3
- "version": "11.2.0",
3
+ "version": "11.3.1",
4
4
  "description": "✅⚛️ jest config for react",
5
5
  "repository": {
6
6
  "directory": "@ornikar/jest-config-react",
@@ -36,5 +36,5 @@
36
36
  "scripts": {
37
37
  "lint:eslint": "yarn ../.. eslint --report-unused-disable-directives --quiet @ornikar/jest-config-react"
38
38
  },
39
- "gitHead": "01764f2390821f7c2f47ebbe61ec5d51b978b310"
39
+ "gitHead": "e52ed8a41bef5753f9509544435321a88430e2c2"
40
40
  }
@@ -33,6 +33,14 @@ failOnConsole({
33
33
  return true;
34
34
  }
35
35
 
36
+ // Native base is setting these props, which are deprecated by react-native-web
37
+ if (message.startsWith('"shadow*" style props are deprecated. Use "boxShadow"')) return true;
38
+ if (message.startsWith('accessibilityLabel is deprecated. Use aria-label.')) return true;
39
+ if (message.startsWith('editable is deprecated. Use readOnly.')) return true;
40
+ if (message.startsWith('props.pointerEvents is deprecated. Use style.pointerEvents')) return true;
41
+ // Native base does not support role prop and needs accessibilityRole which is deprecated by react-native-web
42
+ if (message.startsWith('accessibilityRole is deprecated. Use role.')) return true;
43
+
36
44
  return false;
37
45
  },
38
46
  });