🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@lwc/jest-resolver

Package Overview
Dependencies
Maintainers
11
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lwc/jest-resolver

Jest resolver to resolve LWC specific packages

0.35.6-alpha1
Source
npm
Version published
Weekly downloads
90K
3.07%
Maintainers
11
Weekly downloads
 
Created
Source

lwc-jest-resolver

The default Jest resolver for finding lwc-* modules. This project leverages lwc-npm-resolver to allow LWC components to import modules by their shorthand. For example, lwc-engine can be imported simply as engine.

For more info on resolvers see the Jest doc.

Requirements

  • Node 8.x
  • NPM 5.x
  • Yarn >= 1.0.0
  • Jest >= 21.x

Usage

This resolver will be included as part of LWCs preset Jest configuration. Follow directions on the official doc to use the presets. For example:

{
  "jest": {
    "preset": "lwc-jest-preset"
  }
}

Alternatively, you can directly set the resolver in your config. For example:

{
  "jest": {
    "resolver": "lwc-jest-resolver"
  }
}

If you are writing your own custom resolver, you can point Jest to your resolver and then delegate to this resolver directly, which in turn delegates to the Jest default resolver.

Keywords

Jest

FAQs

Package last updated on 29 Jan 2019

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