-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use custom configuration (remove presets) (#168)
* feat(build-process): move babel preset to internal script * chore: use custom setup This drops the @commercetools-frontend's application-kit presets in favor of custom setup. The preset is great when working on MC apps, but it gets in the way when developing ui-kit. * chore: remove unused configuration * chore: fail CI in case of unhandled rejections
- Loading branch information
Showing
13 changed files
with
755 additions
and
658 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,33 @@ | ||
// Resolve the absolute path of the caller location. | ||
const rootPath = process.cwd(); | ||
|
||
module.exports = { | ||
preset: '@commercetools-frontend/jest-preset-mc-app', | ||
displayName: 'test', | ||
globals: { | ||
'process.env': { | ||
NODE_ENV: 'test', | ||
}, | ||
}, | ||
moduleDirectories: ['src', 'node_modules'], | ||
moduleNameMapper: { | ||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': | ||
'<rootDir>/test/transform-file.js', | ||
'\\.css$': 'identity-obj-proxy', | ||
}, | ||
rootDir: rootPath, | ||
setupFiles: [ | ||
'raf/polyfill', | ||
'<rootDir>/test/setup-tests.js', | ||
'jest-localstorage-mock', | ||
], | ||
setupTestFrameworkScriptFile: '<rootDir>/scripts/setup-test-framework.js', | ||
snapshotSerializers: ['enzyme-to-json/serializer'], | ||
testEnvironment: 'jsdom', | ||
testURL: 'https://mc.commercetools.com/', | ||
testPathIgnorePatterns: ['node_modules'], | ||
testRegex: '\\.spec\\.js$', | ||
transform: { | ||
'^.+\\.js$': '<rootDir>/test/transform-babel-jest.js', | ||
}, | ||
watchPlugins: ['jest-plugin-filename', 'jest-watch-master'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.