Skip to content

Commit

Permalink
Merge pull request #171 from seznam/itl
Browse files Browse the repository at this point in the history
Migrate to IMA Testing Library
  • Loading branch information
Filipoliko authored Sep 23, 2024
2 parents d136fbd + 0ca901a commit fec8527
Show file tree
Hide file tree
Showing 21 changed files with 784 additions and 961 deletions.
5 changes: 5 additions & 0 deletions .changeset/moody-rats-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ima/plugin-atoms": minor
---

Add default oc binding of `$UIComponentHelper`. If you are calling `oc.bind('$UIComponentHelper', UIComponentHelper);` in your project, you can remove it.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
.eslintcache
*.tgz
**/.turbo
.swc/
10 changes: 6 additions & 4 deletions jest.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
*/
module.exports = {
rootDir: '.',
testEnvironment: 'node',
testRegex: '(/__tests__/).*Spec\\.jsx?$',
modulePaths: ['<rootDir>/'],
transformIgnorePatterns: [
'node_modules/(?!(@ima/core|@ima/react-page-renderer)/)',
],
transform: {
'^.+\\.(js|jsx)$': [
'@swc/jest',
{
jsc: {
experimental: {
plugins: [['swc_mut_cjs_exports', {}]],
},
target: 'es2022',
parser: {
syntax: 'ecmascript',
Expand All @@ -31,6 +30,9 @@ module.exports = {
'@swc/jest',
{
jsc: {
experimental: {
plugins: [['swc_mut_cjs_exports', {}]],
},
target: 'es2022',
parser: {
syntax: 'typescript',
Expand Down
9 changes: 9 additions & 0 deletions jest.config.itl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const base = require('./jest.config.base.js');

module.exports = {
...base,
preset: '@ima/testing-library',
moduleNameMapper: {
'^app/main$': '<rootDir>/../../utils/integration/main.js',
},
};
Loading

0 comments on commit fec8527

Please sign in to comment.