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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cloudscape-design/jest-preset

v2.0.42

Published

This package contains [Jest presets](https://jestjs.io/docs/en/configuration#preset-string) used to test an application based on the [Cloudscape Design System](https://cloudscape.design/) React components.

Downloads

21,202

Readme

Jest presets for Cloudscape Design System

This package contains Jest presets used to test an application based on the Cloudscape Design System React components.

Cloudscape is an open source design system for building intuitive, engaging, and inclusive web cloud experiences at scale. It consists of an extensive set of guidelines to create user experiences, along with the design resources and front-end components to streamline implementation.

Cloudscape was built for and is used by Amazon Web Services (AWS) products and services. We created it in 2016 to improve the user experience across AWS web applications, and also to help teams implement those applications faster. Since then, we have continued enhancing the system based on customer feedback and research.

You can find documentation about testing in the Cloudscape documentation website.

Browse the components repository of Cloudscape Design System.

Getting help

You can create bug reports or feature requests, or start a discussion to ask a question. To minimize duplicates, we recommend that you search for existing bug reports, feature requests, or discussions before initiating a new thread.

Getting started

Install this package with the npm package manager of your choice, for example npm install --save-dev @cloudscape-design/jest-preset.

Make sure that you also have babel-jest installed.

And package.json along with its peer dependency babel-jest of the same version as the jest you are using:

"devDependencies": {
    "@cloudscape-design/jest-preset": "^2.0.0",
    "babel-jest": "{your jest version}"
}

In your jest.config.json:

{
  "preset": "@cloudscape-design/jest-preset"
}

Advanced usage

If you already have another preset in your configuration, you can use @cloudscape-design/jest-preset/merge helper to merge them together:

const mergePresets = require('@cloudscape-design/jest-preset/merge');
const tsPreset = require('ts-jest/jest-preset');
const cloudscapePreset = require('@cloudscape-design/jest-preset');

module.exports = mergePresets(tsPreset, cloudscapePreset, {
  // ... your config
});

Note that if multiple presets provide transformIgnorePatterns property, you need to merge it manually. By default, merge operation extends the ignore paths, you need to make sure that the modules defined in jest-preset.js remain unignored.

Troubleshooting

I added preset, but still seeing "Jest encountered an unexpected token" issue

It means that Jest preset could not apply the configuration properly.

  1. Check if you have transformIgnorePatterns defined in your custom configuration. If so, it requires a manual merge with configuration defined in jest-preset.js.
  2. Check if you are overwriting transform property. It should merge the new paths in, not replace. Check the "Advanced usage" section above for an example.

Contributing

The contribution guidelines contains information on how to contribute, as well as our support model and versioning strategy.

License

This project is licensed under the Apache 2.0 License.