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

@lwc/jest-transformer

Package Overview
Dependencies
Maintainers
0
Versions
227
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lwc/jest-transformer

Jest transformer for LWC and engine

  • 18.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
77K
increased by9.03%
Maintainers
0
Weekly downloads
 
Created
Source

@lwc/jest-transformer

Compile Lightning web components for Jest tests.

About Jest Transformers

Jest transformers modify source files in preparation for tests based on regular expressions. See Jest docs for more information.

The transformer modules in this package allow LWC developers to test components that reference @salesforce modules by transforming those import statements into assignment statements that work outside of a Salesforce application container.

Installation

yarn add -D @lwc/jest-transformer

Usage

Update your jest config to point the transformer to this package:

{
    "jest": {
        "moduleFileExtensions": ["js", "html"],
        "transform": {
            "^.+\\.(js|html|css)$": "@lwc/jest-transformer"
        }
    }
}

Keywords

FAQs

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