![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@shopware-ag/jest-preset-sw6-admin
Advanced tools
Jest Test preset for Shopware 6 administration unit tests
Default Jest preset for Shopware 6 administration development.
npm install jest @shopware-ag/jest-preset-sw6-admin @babel/preset-env @babel/plugin-proposal-class-properties --save-dev
After installaing the necessary required packages, please create a file called babel.config.json
right next to your own package.json
with the following content:
{
"presets": ["@babel/preset-env"],
"plugins": ["@babel/plugin-proposal-class-properties"]
}
jest.config.js
Next up, create a file jest.config.js
which should contain the following content:
module.exports = {
preset: '@shopware-ag/jest-preset-sw6-admin',
globals: {
adminPath: '<file-path-to-sw6-administration>', // required, e.g. /www/sw6/platform/src/Administration/Resources/app/administration
}
}
collectCoverage
- Code coverage will be generated using the reporters listed under coverageReporters
coverageReporters
- The presets uses lcov
, text
& clover
as coverage reporterswatchPathIgnorePatterns
- Ignores the node_modules
folder for the watch mode of JestclearMocks
- Automatically clear mock calls and instances before every test.moduleFileExtensions
- File with the extension js
will automatically used as extensions your module use.moduleNameMapper
- All css
, less
& scss
files will be mocked and relative paths to src
are getting mapped to the correct src directorytransform
- Transforms js
files using babel-jest and twig
files are transformed using a custom twig transformer which we use in the administration as wellmodulePathIgnorePatterns
- Ignores e2e test specs by defaultsetupFilesAfterEnv
- Provides a polyfill for Webpack' require.context
and sets up the global Shopware third-party interface for every test. The object can be accessed using global.Shopware
in test files.testMatch
- Matches all files containing .spec.js
in the test directory[v6.0.0] - 2025-02-06
require.context
support for Webpack code.import.meta.glob
for Vite code.FAQs
Jest Test preset for Shopware 6 administration unit tests
The npm package @shopware-ag/jest-preset-sw6-admin receives a total of 12,136 weekly downloads. As such, @shopware-ag/jest-preset-sw6-admin popularity was classified as popular.
We found that @shopware-ag/jest-preset-sw6-admin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.