New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

flow-tap

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flow-tap

Run tap on files with flow types.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

flow-tap

Run tap on files with flow types.

Allows you to run tap on files with flow static types annotations. This module makes use of flow-remove-types which is lighter weight and faster than babel-node.

Install

npm install flow-tap --save-dev

In your package.json file: "scripts": { "test": "flow-tap test/**/*.js" } Then you can run npm run test.

Usage

//@flow
'use strict';

const tap = require('tap');

function numToString(num:number):string{
	return num.toString();
}

tap.equal(numToString(3), "3");

Use both tap and flow the way you usually do. If your tests don't use static types, but your modules do, I suggest using //@flow at the top of your test anyways. This will catch any improper usage of your modules and obviate the need to test unexpected arguments. NOTE: This won't check types, only remove them so tests work as expected. Continue using flow to check your types.

I wrote a blog post about the creation of flow-tap.

Keywords

flow

FAQs

Package last updated on 31 Jul 2017

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