Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cloudscape-design/jest-preset

Package Overview
Dependencies
Maintainers
0
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudscape-design/jest-preset

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.

  • 2.0.41
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

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 are already have another preset in your configuration, you can merge them together:

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

module.exports = merge.recursive(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 @cloudscape-design/components module remains 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 the preset.
  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.

FAQs

Package last updated on 21 Nov 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc