New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lwc/jest-transformer

Package Overview
Dependencies
Maintainers
11
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

  • 0.33.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
64K
decreased by-21.08%
Maintainers
11
Weekly downloads
 
Created
Source

lwc-jest-transformer

Compile LWC and engine for Jest tests

Requirements

  • Node 8.x
  • NPM 5.x
  • Yarn >= 1.0.0
  • lwc-compiler >= 0.17.0

Prerequisites

  • lwc-compiler must be installed in the project.

  • You may also want to install jest globally to run tests directly from the command line:

    yarn global add jest

Installation

yarn add -D lwc-jest-transformer

Usage

  1. Update your jest config to point the transformer to this package.
{
  "jest": {
    "moduleFileExtensions": [
      "js",
      "html"
    ],
    "transform": {
      "^.+\\.(js|html)$": "lwc-jest-transformer"
    }
  }
}
  1. Update moduleNameMapper to point to where your LWC modules reside in the project.
  2. Follow steps 4 through 6 of Option A.

Keywords

FAQs

Package last updated on 12 Dec 2018

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