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

test-freq

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-freq

Outputs frequencies of test usages in a project

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

test-freq

A command-line utility that outputs some frequency data about your unit tests. You can save the output to CSV and then pull it in to your favourite graphing program (Excel, Numbers, ...).

It works under the following circumstances:

  • You are working with JavaScript or TypeScript files
  • You are using a function named it to describe your tests
  • You are using expect to write your expectations

(That's not to say it couldn't be expanded to do something else; see the Contributing section below.)

Right now it has two modes:

Descriptions

npx test-freq descriptions

Outputs frequencies of your test description starting verbs. Example:

it("calculates the value", ...)

In this case, the starting verb is calculates.

The tool has special handling for test descriptions starting with should, should not, does not.

Matchers

npx test-freq matchers

Outputs frequencies of the matchers used. Example:

expect(foo).toEqual(bar);

In this case, the matcher is toEqual.

Contributing

All contributions are welcome! PRs, issues, etc.

FAQs

Package last updated on 02 Dec 2022

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