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 - npm Package Compare versions

Comparing version 1.22.0 to 1.23.0

lib/modules/helpers/env.d.ts

6

lib/bin/index.js

@@ -15,2 +15,3 @@ #! /usr/bin/env node

const kill_js_1 = require("../modules/helpers/kill.js");
const env_js_1 = require("../modules/helpers/env.js");
const map_tests_js_1 = require("../services/map-tests.js");

@@ -45,2 +46,3 @@ const watch_js_1 = require("../services/watch.js");

const watchMode = (0, get_arg_js_1.hasArg)('watch');
const hasEnvFile = (0, get_arg_js_1.hasArg)('env-file');
const concurrency = parallel

@@ -67,2 +69,6 @@ ? Number((0, get_arg_js_1.getArg)('concurrency')) || undefined

}
if (hasEnvFile) {
const envFilePath = (0, get_arg_js_1.getArg)('env-file');
tasks.push((0, env_js_1.envFile)(envFilePath));
}
const options = {

@@ -69,0 +75,0 @@ platform: (0, get_runtime_js_1.platformIsValid)(platform) ? platform : undefined,

1

lib/modules/index.d.ts

@@ -6,2 +6,3 @@ export { poku } from './essentials/poku.js';

export { it } from './helpers/it.js';
export { envFile } from './helpers/env.js';
export { skip } from './helpers/skip.js';

@@ -8,0 +9,0 @@ export { beforeEach, afterEach } from './helpers/each.js';

4

lib/modules/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.assertPromise = exports.listFiles = exports.log = exports.exit = exports.getPIDs = exports.kill = exports.sleep = exports.waitForPort = exports.waitForExpectedResult = exports.startService = exports.startScript = exports.docker = exports.afterEach = exports.beforeEach = exports.skip = exports.it = exports.describe = exports.test = exports.assert = exports.poku = void 0;
exports.assertPromise = exports.listFiles = exports.log = exports.exit = exports.getPIDs = exports.kill = exports.sleep = exports.waitForPort = exports.waitForExpectedResult = exports.startService = exports.startScript = exports.docker = exports.afterEach = exports.beforeEach = exports.skip = exports.envFile = exports.it = exports.describe = exports.test = exports.assert = exports.poku = void 0;
var poku_js_1 = require("./essentials/poku.js");

@@ -14,2 +14,4 @@ Object.defineProperty(exports, "poku", { enumerable: true, get: function () { return poku_js_1.poku; } });

Object.defineProperty(exports, "it", { enumerable: true, get: function () { return it_js_1.it; } });
var env_js_1 = require("./helpers/env.js");
Object.defineProperty(exports, "envFile", { enumerable: true, get: function () { return env_js_1.envFile; } });
var skip_js_1 = require("./helpers/skip.js");

@@ -16,0 +18,0 @@ Object.defineProperty(exports, "skip", { enumerable: true, get: function () { return skip_js_1.skip; } });

{
"name": "poku",
"version": "1.22.0",
"version": "1.23.0",
"description": "๐Ÿท Poku makes testing easy for Node.js, Bun, Deno, and you at the same time.",

@@ -62,3 +62,3 @@ "main": "./lib/modules/index.js",

"@biomejs/biome": "1.8.3",
"@types/node": "^20.14.9",
"@types/node": "^20.14.10",
"c8": "^10.1.2",

@@ -78,3 +78,2 @@ "packages-update": "^2.0.0",

"node",
"nodejs",
"bun",

@@ -84,9 +83,2 @@ "deno",

"tsx",
"concurrent",
"concurrency",
"parallel",
"parallelism",
"sequential",
"queue",
"queuing",
"run",

@@ -100,4 +92,2 @@ "cli",

"bdd",
"isolate",
"isolation",
"watch",

@@ -113,4 +103,4 @@ "jest",

"karma",
"urun",
"supertest",
"dotenv",
"filter",

@@ -120,2 +110,3 @@ "exclude",

"files",
"env",
"kill",

@@ -131,9 +122,7 @@ "container",

"mjs",
"expect",
"framework",
"tool",
"runtime",
"poku",
"pokujs"
"poku"
]
}

@@ -13,7 +13,7 @@ <div align="center">

[![GitHub Workflow Status (OSX)](https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_coverage-osx.yml?event=push&label=&branch=main&logo=apple&logoColor=white)](https://github.com/wellwelwel/poku/actions/workflows/ci_coverage-osx.yml?query=branch%3Amain)
[![GitHub Workflow Status (Windows)](https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_coverage-windows.yml?event=push&label=&branch=main&logo=windows&logoColor=white)](https://github.com/wellwelwel/poku/actions/workflows/ci_coverage-windows.yml?query=branch%3Amain)
[![GitHub Workflow Status (Windows)](https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_coverage-windows.yml?event=push&label=&branch=main&logo=iterm2&logoColor=white)](https://github.com/wellwelwel/poku/actions/workflows/ci_coverage-windows.yml?query=branch%3Amain)
---
๐Ÿท [Website](https://poku.io/)<span>&nbsp;&nbsp;โ€ข&nbsp;&nbsp;</span>๐Ÿ“’ [Documentation](https://poku.io/docs/category/documentation)<span>&nbsp;&nbsp;โ€ข&nbsp;&nbsp;</span>๐Ÿงช [Examples](https://poku.io/docs/category/examples)<span>&nbsp;&nbsp;โ€ข&nbsp;&nbsp;</span>๐Ÿง‘๐Ÿปโ€๐ŸŽ“ [Quick Tutorials](https://poku.io/docs/category/quick-tutorials)
๐Ÿท [Website](https://poku.io/)<span>&nbsp;&nbsp;โ€ข&nbsp;&nbsp;</span>๐Ÿ“˜ [Documentation](https://poku.io/docs/category/documentation)<span>&nbsp;&nbsp;โ€ข&nbsp;&nbsp;</span>๐Ÿงช [Examples](https://poku.io/docs/category/examples)<span>&nbsp;&nbsp;โ€ข&nbsp;&nbsp;</span>๐Ÿง‘๐Ÿปโ€๐ŸŽ“ [Quick Tutorials](https://poku.io/docs/category/quick-tutorials)

@@ -26,18 +26,15 @@ </div>

๐Ÿ’ก **Poku** makes testing easy and brings the [native **JavaScript** syntax back to tests](https://poku.io/docs/philosophy#javascript-essence-for-tests-), letting you to write tests intuitively โ€” _just like in real **JavaScript** code_.
๐Ÿ’ก **Poku** makes testing easy and brings the [native **JavaScript** syntax back to tests](https://poku.io/docs/philosophy#javascript-essence-for-tests-), letting you to write tests intuitively.
<img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> No configurations<br />
<img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> _No configurations_<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Auto detect **ESM**, **CJS**, and **TypeScript** files<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Run the same test suite for [**Node.js**][node-version-url], [**Bun**][bun-version-url], and [**Deno**][deno-version-url]<br />
<img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Easier and Less Verbose<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> [**Node.js**][node-version-url] familiar **API**<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Instantly re-run related tests in `watch` mode<br />
<img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> _Easier and Less Verbose_<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Run **CJS** (**CommonJS**) files directly with [**Deno**][deno-version-url]<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Easily handle **containers**, **servers**, **services**, **processes**, and **ports**<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Easily handle **containers**, **servers**, **processes**, and **ports**<br />
<img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Safety and Reliability<br />
<img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> _Safety and Reliability_<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> High **isolation** level per file<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> **Performant** and **lightweight**<br />
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Compatible with **coverage** tools

@@ -48,10 +45,10 @@ ---

### Install
### <img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Install
<table>
<tr>
<td><blockquote><b>Node.js</b</blockquote></td>
<td><blockquote><b>TypeScript + Node.js</b</blockquote></td>
<td><blockquote><b>Bun</b</blockquote></td>
<td><blockquote><b>Deno</b</blockquote></td>
<td><blockquote><i>Node.js</i></blockquote></td>
<td><blockquote><i>TypeScript (Node.js)</i></blockquote></td>
<td><blockquote><i>Bun</i></blockquote></td>
<td><blockquote><i>Deno</i></blockquote></td>
</tr>

@@ -90,4 +87,6 @@ <tr>

### Test
---
### <img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Test
<table>

@@ -112,9 +111,11 @@ <tr>

### Run
---
### <img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Run
<table>
<tr>
<td><blockquote><b>Node.js (and TypeScript)</b</blockquote></td>
<td><blockquote><b>Bun</b</blockquote></td>
<td><blockquote><b>Deno</b</blockquote></td>
<td><blockquote><i>Node.js (and TypeScript)</i></blockquote></td>
<td><blockquote><i>Bun</i></blockquote></td>
<td><blockquote><i>Deno</i></blockquote></td>
</tr>

@@ -146,32 +147,96 @@ <tr>

> Try the flag `--parallel` to run tests in parallel.
- That's it ๐ŸŽ‰
---
## Available Methods
## Features
### Essentials
- [**poku**](https://poku.io/docs/category/-poku) _(test runner)_
- [**assert**](https://poku.io/docs/documentation/assert) _(test assertion)_
<table>
<tr>
<th width="250">Name</th>
<th width="800">Description</th>
</tr>
<tr>
<td><a href="https://poku.io/docs/category/-poku">poku</a></td>
<td>๐Ÿงช Test runner.</td>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/assert">assert</a></td>
<td>๐Ÿ”ฌ Test assertion <i>(<strong>Node.js</strong> familiar <strong>API</strong>)</i>.</td>
</tr>
</table>
### Helpers
- [**test**](https://poku.io/docs/documentation/helpers/test), [**describe**](https://poku.io/docs/documentation/helpers/describe) and [**it**](https://poku.io/docs/documentation/helpers/it) _(organize, group, and isolate tests)_
- [**beforeEach**](https://poku.io/docs/category/-before-and-after-each) and [**afterEach**](https://poku.io/docs/category/-before-and-after-each) _(hooks for test setup and teardown)_
- [**docker**](https://poku.io/docs/documentation/helpers/containers) _(build, start, compose, stop, remove, and test containers)_
- [**startScript**](https://poku.io/docs/documentation/helpers/startScript) _(run **package.json** scripts in background)_
- [**startService**](https://poku.io/docs/documentation/helpers/startService) _(run files in background)_
- [**kill**](https://poku.io/docs/documentation/helpers/processes/kill) _(terminate ports, port ranges, and PIDs)_
- [**waitForPort**](https://poku.io/docs/documentation/helpers/processes/wait-for-port) _(wait for specified ports to become active)_
- [**waitForExpectedResult**](https://poku.io/docs/documentation/helpers/processes/wait-for-expected-result) _(retry until an expected result or times out)_
- [**getPIDs**](https://poku.io/docs/documentation/helpers/processes/get-pids) _(debug processes IDs using ports and port ranges)_
<table>
<tr>
<th width="250">Name</th>
<th width="800">Description</th>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/helpers/test">test</a> โ€ข <a href="https://poku.io/docs/documentation/helpers/describe">describe</a> โ€ข <a href="https://poku.io/docs/documentation/helpers/it">it</a></td>
<td>๐Ÿคน๐Ÿปโ€โ™€๏ธ Organize, group, and isolate tests.</td>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/helpers/env">envFile</a></td>
<td>โš™๏ธ Process an environment file <i>(out-of-box)</i>.</td>
</tr>
<tr>
<td><a href="https://poku.io/docs/category/-before-and-after-each">beforeEach</a> โ€ข <a href="https://poku.io/docs/category/-before-and-after-each">afterEach</a></td>
<td>๐Ÿƒ Hooks for test setup and teardown.</td>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/helpers/startScript">startScript</a></td>
<td>๐ŸŒ Run package.json scripts in background.</td>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/helpers/startService">startService</a></td>
<td>๐ŸŒ Run files in background.</td>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/helpers/containers">docker</a></td>
<td>๐Ÿณ Build, start, compose, stop, remove, and test containers.</td>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/helpers/processes/kill">kill</a></td>
<td>๐Ÿ”Œ Terminate ports, port ranges, and PIDs.</td>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/helpers/processes/wait-for-port">waitForPort</a></td>
<td>๐Ÿ˜ด Wait for specified ports to become active.</td>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/helpers/processes/wait-for-expected-result">waitForExpectedResult</a></td>
<td>๐Ÿฅฑ Retry until an expected result or times out.</td>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/helpers/skip">skip</a></td>
<td>โญ๏ธ Skip tests when necessary.</td>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/helpers/processes/get-pids">getPIDs</a></td>
<td>๐Ÿ•ต๐Ÿป Debug processes IDs using ports and port ranges.</td>
</tr>
</table>
### Common Options
- [**watch**](https://poku.io/docs/documentation/poku/options/watch) _(watch for changes and re-run related test files)_
- [**parallel**](https://poku.io/docs/documentation/poku/options/parallel) _(run tests in parallel)_
- [**debug**](https://poku.io/docs/documentation/poku/options/debug) _(shows all logs)_
<table>
<tr>
<th width="250">Name</th>
<th width="800">Description</th>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/poku/options/watch">watch</a></td>
<td>๐Ÿฟ Watch for changes and re-run related test files.</td>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/poku/options/parallel">parallel</a></td>
<td>๐Ÿƒ๐Ÿปโ€โ™€๏ธ Run tests in parallel.</td>
</tr>
<tr>
<td><a href="https://poku.io/docs/documentation/poku/options/debug">debug</a></td>
<td>๐Ÿ•ต๐Ÿป Shows all logs.</td>
</tr>
</table>

@@ -178,0 +243,0 @@ > _and much more_ ๐Ÿ‘‡๐Ÿป

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