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

poku

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

poku

🐷 A flexible and easy-to-use Test Runner for parallel or sequential runs and high isolation level

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Poku

Logo

🖇️ A flexible and easy-to-use Test Runner for parallel or sequential runs and high isolation level.

NPM Version Node.js Version GitHub Workflow Status (with event) License


Why Poku?

🪄 Runs test files in an individual process, shows progress and exits.

  • Poku is designed to be highly intuitive.
  • Supports Node.js 6+ (ESM and CJS), TypeScript (no need to build) and Coverage tools.
  • Poku dive to the deepest depths to find tests in the specified directories.
  • No constraints or rules, code in your own signature style.
  • Zero configurations, except you want.
  • Allows both in-code and CLI usage.

  • Totally dependency-free.
  • Compatibility: Poku is tested across all Node 6+ versions.
  • Poku uses itself to test its own tests using process.exit at several depths on the same process node.

Install

npm install --save-dev poku

Basic Usage

In-code

import { poku } from 'poku';

await poku(['./a', './b']);

CLI

npx poku --include='./a,./b'

TypeScript

To run your tests without compile, just install tsx and it's done:

npm install --save-dev tsx

Documentation

poku

Include directories
poku('./targetDir');
poku(['./targetDirA', './targetDirB']);
npx poku --include='./targetDir'
npx poku --include='./targetDirA,./targetDirB'

filter

Filter by path using Regex to match only the files that should be performed.

  • in-code
/**
 * @default
 *
 * Testing all `*.test.*` files.
 */

poku(['...'], {
  filter: /\.test\./,
});
/**
 * Testing all `ts`, `js`, `mts` and `mjs` files
 */

poku(['...'], {
  filter: /\.(m)?(j|t)?s$/,
  // filter: /\.(js|ts|mjs|mts)$/,
});
  • CLI
# Testing only a specific file

npx poku --include='...' --filter='some-file'
# Testing only paths that contains "unit"

npx poku --include='...' --filter='unit'
  • Environment Variable

By using FILTER from Environment Variable, it will overwrite the filter option.

# Testing only a specific file

FILTER='some-file' npx poku --include='...'
# Testing only paths that contains "unit"

FILTER='unit' npx poku --include='...'

parallel

Determines the mode of test execution across parallelism or sequential modes.

/**
 * @default
 *
 * Sequential mode
 */

poku(['...'], {
  parallel: false,
});
/**
 * Parallel mode
 */

poku(['...'], {
  parallel: true,
});

Documentation in Progress

🧑🏻‍🎓 Soon documenting all options and Poku's usage variations.

Keywords

FAQs

Package last updated on 13 Feb 2024

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