Skip to content

Commit

Permalink
test: use default fallback configuration for ITL
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipoliko committed Sep 3, 2024
1 parent 313ebc7 commit e9cecb5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 19 deletions.
Binary file modified itl.tgz
Binary file not shown.
4 changes: 1 addition & 3 deletions jest.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ module.exports = {
rootDir: '.',
testRegex: '(/__tests__/).*Spec\\.jsx?$',
modulePaths: ['<rootDir>/'],
transformIgnorePatterns: [
'node_modules/(?!(@ima/core|@ima/react-page-renderer)/)',
],
setupFilesAfterEnv: ['<rootDir>/../../jest.setup.js'],
transform: {
'^.+\\.(js|jsx)$': [
'@swc/jest',
Expand Down
14 changes: 0 additions & 14 deletions jest.config.itl.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
const {
setImaTestingLibraryServerConfig,
FALLBACK_APP_MAIN_PATH,
FALLBACK_APPLICATION_FOLDER,
} = require('@ima/testing-library/server');

const base = require('./jest.config.base.js');

setImaTestingLibraryServerConfig({
applicationFolder: FALLBACK_APPLICATION_FOLDER,
});

module.exports = {
...base,
preset: '@ima/testing-library',
moduleNameMapper: {
'app/main': FALLBACK_APP_MAIN_PATH,
},
setupFiles: ['<rootDir>/src/main.ts'], // To ensure that pluginLoader is called
};
6 changes: 6 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Load the main plugin file to trigger the pluginLoader registration.
*/
beforeAll(async () => {
await import('src/main.ts');

Check warning on line 5 in jest.setup.js

View workflow job for this annotation

GitHub Actions / CI

Unable to resolve path to module 'src/main.ts'
});
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e9cecb5

Please sign in to comment.