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

@babel/helper-plugin-test-runner

Package Overview
Dependencies
Maintainers
6
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/helper-plugin-test-runner

Helper function to support test runner

  • 7.0.0-beta.42
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

@babel/helper-plugin-test-runner

NOTE: This is an internal Babel module and may not work outside. Use at your own risk.

Usage:

Check Babel for an example: https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-exponentiation-operator/test

  1. Inside a /test directory, add an index.js with the contents require("@babel/helper-plugin-test-runner")(__dirname);.
  2. Inside /test/fixtures, create a folder for each suite (eg; one suite for each feature of your plugin).
  3. Suite folders may contain files and folders. Files will be transformed and run; use expect() assertions to verify correct behavior. Folders may contain input.js, output.js, and/or exec.js. The output of transforming input.js will be checked to match the contents of output.js. exec.js, if it exists, will be transformed and run, as with a file in the suite folder.
  4. Install and run mocha.
  5. To run a specific test, run mocha --grep testName.

FAQs

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