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

jest-editor-support

Package Overview
Dependencies
Maintainers
7
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-editor-support

[![Build Status](https://travis-ci.com/jest-community/jest-editor-support.svg?branch=master)](https://travis-ci.com/jest-community/jest-editor-support) [![Coverage Status](https://coveralls.io/repos/github/jest-community/jest-editor-support/badge.svg?bran

  • 31.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24K
increased by7.15%
Maintainers
7
Weekly downloads
 
Created
Source

jest-editor-support

Build Status Coverage Status npm version

The engine that allows editors to build on top of Jest.

Usage

This is only useful if you are interested in building an editor integration for Jest.

API

parse(   
  filePath: string,   
  serializedData?: string,   
  options?: JESParserOptions
);

JESParserOptions = 
{
    plugins?: JESParserPluginOptions;
    strictMode?: boolean;
};

JESParserPluginOptions = 
{
  decorators?: 'legacy' | {
    decoratorsBeforeExport?: boolean;
    allowCallParenthesized?: boolean;
  }
}

Parse is a static Jest parser which uses Babel 7 and supports js,jsx,mjs,ts,tsx files.

Supported ECMAScript proposals

  • filePath = Path to the file you want to parse.
  • serializedData = Serialized data, will be used instead of the filePath if available (optional).
  • options:
    • strictMode = If this option is activated the parser throws an exception if the filetype is not detected, defaults to false.
    • pluginOptions = allow override for selected plugins options. Currently only support decorators.

examples:

parse('test.spec.ts');
parse('parameterDecorators.spec.ts', undefined, {plugins: {decorators: 'legacy'}})
parse('parameterDecorators.spec.ts', undefined, 
  {plugins: 
    {decorators: 
      {decoratorsBeforeExport: false}
    }
  })

Note

Since version 18.2.0 TypeScript is now a peer dependency. If you don't need to handle .tsx files then you can safely ignore the warning during installation.

FAQs

Package last updated on 15 Jan 2023

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