npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@commercetools-frontend/jest-preset-mc-app

v27.6.3

Published

Jest preset used by a MC application

Readme

@commercetools-frontend/jest-preset-mc-app

Jest preset used by Merchant Center customizations.

Install

$ npm install --save @commercetools-frontend/jest-preset-mc-app

Usage

module.exports = {
  preset: '@commercetools-frontend/jest-preset-mc-app',
};

Custom config

You can pass a custom config using one of the cosmiconfig format options. The config module name to use is jest-preset-mc-app. For example:

.jest-preset-mc-apprc
.jest-preset-mc-apprc.json
.jest-preset-mc-apprc.yaml
.jest-preset-mc-apprc.yml
.jest-preset-mc-apprc.js
jest-preset-mc-app.config.js

Supported options are:

  • silenceConsoleWarnings: a list of strings or RegEx to match against console logs. If the value matches, the log will be suppressed. This option only takes effect when the environment variable CI is defined.
  • notThrowWarnings: a list of strings or RegEx to match against console logs. If the value matches, no error will be thrown. This option only takes effect when the environment variable CI is defined.

TypeScript support

If you need to use the Jest preset with additional TypeScript support, you need to point to the @commercetools-frontend/jest-preset-mc-app/typescript preset in your Jest config.

For example:

module.exports = {
  preset: '@commercetools-frontend/jest-preset-mc-app/typescript',
};

Opt-in Enzyme support

This Jest preset does not ship with Enzyme support anymore (version >=20).

In case you still use Enzyme in your tests, you need to do a bit of extra configuration as described below:

Enzyme 16

  1. Install the necessary dependencies:
yarn add \
  @commercetools/enzyme-extensions \
  @commercetools/jest-enzyme-matchers \
  enzyme \
  enzyme-adapter-react-16 \
  enzyme-matchers \
  enzyme-to-json \
  jest-enzyme
  1. In your Jest config, instead of importing the preset @commercetools-frontend/jest-preset-mc-app you need to use the helper function @commercetools-frontend/jest-preset-mc-app/enzyme/apply-jest-preset-with-enzyme.js to merge one of the main presets with the opt-in Enzyme setup.

For example:

const jestPreset = require('@commercetools-frontend/jest-preset-mc-app');
const applyJestPresetWithEnzyme = require('@commercetools-frontend/jest-preset-mc-app/enzyme/apply-jest-preset-with-enzyme');

module.exports = {
  ...applyJestPresetWithEnzyme({
    enzymeAdapterVersion: 16,
    jestPreset,
  }),
};

Similarly, you can use the @commercetools-frontend/jest-preset-mc-app/typescript instead of the @commercetools-frontend/jest-preset-mc-app.

Enzyme 17

  1. Install the necessary dependencies:
yarn add \
  @commercetools/enzyme-extensions \
  @commercetools/jest-enzyme-matchers \
  @wojtekmaj/enzyme-adapter-react-17 \
  enzyme \
  enzyme-matchers \
  enzyme-to-json \
  jest-enzyme

NOTE that the @wojtekmaj/enzyme-adapter-react-17 is not the official supported package by Enzyme. Follow the progress on this PR to know when the official adapter is going to be released.

  1. In your Jest config, instead of importing the preset @commercetools-frontend/jest-preset-mc-app you need to use the helper function @commercetools-frontend/jest-preset-mc-app/enzyme/apply-jest-preset-with-enzyme.js to merge one of the main presets with the opt-in Enzyme setup.

For example:

const jestPreset = require('@commercetools-frontend/jest-preset-mc-app');
const applyJestPresetWithEnzyme = require('@commercetools-frontend/jest-preset-mc-app/enzyme/apply-jest-preset-with-enzyme');

module.exports = {
  ...applyJestPresetWithEnzyme({
    enzymeAdapterVersion: 17,
    jestPreset,
  }),
};

Similarly, you can use the @commercetools-frontend/jest-preset-mc-app/typescript instead of the @commercetools-frontend/jest-preset-mc-app.