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

@lwc/jest-resolver

Package Overview
Dependencies
Maintainers
11
Versions
228
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.33.13
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
45K
increased by33.15%
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

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