Skip to content

Commit fec8527

Browse files
authored
Merge pull request #171 from seznam/itl
Migrate to IMA Testing Library
2 parents d136fbd + 0ca901a commit fec8527

File tree

21 files changed

+784
-961
lines changed

21 files changed

+784
-961
lines changed

.changeset/moody-rats-yell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ima/plugin-atoms": minor
3+
---
4+
5+
Add default oc binding of `$UIComponentHelper`. If you are calling `oc.bind('$UIComponentHelper', UIComponentHelper);` in your project, you can remove it.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
.eslintcache
1010
*.tgz
1111
**/.turbo
12+
.swc/

jest.config.base.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33
*/
44
module.exports = {
55
rootDir: '.',
6-
testEnvironment: 'node',
76
testRegex: '(/__tests__/).*Spec\\.jsx?$',
87
modulePaths: ['<rootDir>/'],
9-
transformIgnorePatterns: [
10-
'node_modules/(?!(@ima/core|@ima/react-page-renderer)/)',
11-
],
128
transform: {
139
'^.+\\.(js|jsx)$': [
1410
'@swc/jest',
1511
{
1612
jsc: {
13+
experimental: {
14+
plugins: [['swc_mut_cjs_exports', {}]],
15+
},
1716
target: 'es2022',
1817
parser: {
1918
syntax: 'ecmascript',
@@ -31,6 +30,9 @@ module.exports = {
3130
'@swc/jest',
3231
{
3332
jsc: {
33+
experimental: {
34+
plugins: [['swc_mut_cjs_exports', {}]],
35+
},
3436
target: 'es2022',
3537
parser: {
3638
syntax: 'typescript',

jest.config.itl.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const base = require('./jest.config.base.js');
2+
3+
module.exports = {
4+
...base,
5+
preset: '@ima/testing-library',
6+
moduleNameMapper: {
7+
'^app/main$': '<rootDir>/../../utils/integration/main.js',
8+
},
9+
};

0 commit comments

Comments
 (0)