@ornikar/jest-config-react-native 3.2.0-alpha.0 → 3.2.0

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,12 +3,12 @@
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
- # [3.2.0-alpha.0](https://github.com/ornikar/shared-configs/compare/@ornikar/jest-config-react-native@3.1.4...@ornikar/jest-config-react-native@3.2.0-alpha.0) (2022-01-17)
6
+ # [3.2.0](https://github.com/ornikar/shared-configs/compare/@ornikar/jest-config-react-native@3.1.4...@ornikar/jest-config-react-native@3.2.0) (2022-01-18)
7
7
 
8
8
 
9
9
  ### Features
10
10
 
11
- * jest-config native and web improvements ([d1f9624](https://github.com/ornikar/shared-configs/commit/d1f9624fe4d1c454ce07be566aee9a177553a85f))
11
+ * jest-config native and web improvements [no issue] ([#630](https://github.com/ornikar/shared-configs/issues/630)) ([0e00bf2](https://github.com/ornikar/shared-configs/commit/0e00bf2ac1fa6d40e9d4063a3c94c18385060dcd))
12
12
 
13
13
 
14
14
 
package/jest-preset.js CHANGED
@@ -14,15 +14,23 @@ function customizer(objValue, srcValue) {
14
14
 
15
15
  const basePreset = mergeWith(expoPreset, jestPreset, customizer);
16
16
 
17
- module.exports = mergeWith(
18
- basePreset,
19
- {
20
- testMatch: ['<rootDir>/src/**/stories.{ts,tsx}', '<rootDir>/src/**/*.stories.{ts,tsx}'],
21
- moduleNameMapper: {
22
- '^@storybook/addon-actions$': require.resolve('./__mocks__/@storybook/addon-actions.js'),
23
- '@storybook/react-native$': require.resolve('./__mocks__/@storybook/react-native.jsx'),
24
- '^@storybook/react-native$': require.resolve('./__mocks__/@storybook/react-native.jsx'),
25
- },
17
+ module.exports = {
18
+ ...basePreset,
19
+ testMatch: [...basePreset.testMatch, '<rootDir>/src/**/stories.{ts,tsx}', '<rootDir>/src/**/*.stories.{ts,tsx}'],
20
+ moduleNameMapper: {
21
+ ...basePreset.moduleNameMapper,
22
+ '^@storybook/addon-actions$': require.resolve('./__mocks__/@storybook/addon-actions.js'),
23
+ '@storybook/react-native$': require.resolve('./__mocks__/@storybook/react-native.jsx'),
24
+ '^@storybook/react-native$': require.resolve('./__mocks__/@storybook/react-native.jsx'),
26
25
  },
27
- customizer,
28
- );
26
+ transform: {
27
+ // remove svg asset transformer from expo config, as we configure svg with custom metro transformer
28
+ ...Object.fromEntries(
29
+ Object.entries(basePreset.transform).map((key, value) => {
30
+ if (key.includes('|svg|')) return [key.replace('|svg|', '|'), value];
31
+ return [key, value];
32
+ }),
33
+ ),
34
+ '\\.svg$': '@ornikar/jest-config-react-native/svg-transformer',
35
+ },
36
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ornikar/jest-config-react-native",
3
- "version": "3.2.0-alpha.0",
3
+ "version": "3.2.0",
4
4
  "description": "jest config",
5
5
  "repository": "ornikar/shared-configs",
6
6
  "main": "jest-preset.js",
@@ -29,5 +29,5 @@
29
29
  "jest-expo": "44.0.1",
30
30
  "react": "17.0.2"
31
31
  },
32
- "gitHead": "d1f9624fe4d1c454ce07be566aee9a177553a85f"
32
+ "gitHead": "d27b3d1e2257b5a31923277c60ef26858bd4b59d"
33
33
  }