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
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudscape-design/jest-preset

## ⚠️ This is a generated artifact package and should be treated as **READ-ONLY**. Do not commit directly to this package!

  • 2.0.15
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4K
decreased by-9.79%
Maintainers
1
Weekly downloads
 
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 that you do not have transformIgnorePatterns in your custom configuration. If you do, it needs to not ignore the @cloudscape-design/* path.
  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 29 Jun 2023

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