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

jest-preset-kyt-rtl

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-preset-kyt-rtl

Jest preset

  • 1.1.3-alpha.32
  • npm
  • Socket score

Version published
Weekly downloads
4.1K
decreased by-8.76%
Maintainers
4
Weekly downloads
 
Created
Source

jest-preset-kyt-rtl

Jest preset for React projects that use @testing-library/react to test.

Installation

$ yarn add --dev --exact jest @testing-library/react jest-preset-kyt-rtl

// or

$ npm i --save-dev --save-exact jest @testing-library/react jest-preset-kyt-rtl

Setup

In your local Jest config - for instance, jest.config.js:

{
  preset: 'jest-preset-kyt-rtl'
}

Features:

  • Installs and configures raf/polyfill, which is required by React >= 16.

  • Automatic moduleNameMapper entries/file-stubbing for files with these extensions:

    css|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico|md
    
  • Sets cacheDirectory to <rootDir>/.caches/jest, which allows you to build/restore Jest transforms in between CI/CD pipeline runs. Example: using drone/gcs-cache:

    steps:
      - name: restore_cache
        image: homerovalle/drone-gcs-cache:latest
        settings:
          bucket: your-custom-name
          restore: true
        environment:
          GCS_CACHE_JSON_KEY:
            from_secret: a_secret_set_by_you
    
      - name: test
        image: node:12.16.2
        commands:
          - yarn test-coverage-ci
    
      - name: rebuild_cache
        image: homerovalle/drone-gcs-cache:latest
        settings:
          bucket: your-custom-name
          mount:
            - .caches
            - coverage
          rebuild: true
        environment:
          GCS_CACHE_JSON_KEY:
            from_secret: a_secret_set_by_you
    

FAQs

Package last updated on 12 Apr 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