Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to IMA Testing Library #171

Merged
merged 13 commits into from
Sep 23, 2024
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
@@ -1,19 +1,18 @@
/**
* @type import('jest').Config

Check warning on line 2 in jest.config.base.js

View workflow job for this annotation

GitHub Actions / CI

Tag @type must have a type
*/
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 @@
'@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
Loading