Comparing version 1.6.0 to 1.6.1
@@ -20,3 +20,4 @@ "use strict"; | ||
if (!line.includes(basePath)) { | ||
const match = line.match(/at\s(\/.+|file:\/\/\/.+)/i); | ||
const match = line.match(/at\s(\/.+|file:.+)|^(\s+)at\smodule\scode\s\((\/.+|file:.+)\)/i); | ||
// Node and Deno | ||
if (match && match[1]) { | ||
@@ -26,2 +27,7 @@ file = match[1]; | ||
} | ||
// Bun | ||
if (match && match[3]) { | ||
file = match[3]; | ||
break; | ||
} | ||
} | ||
@@ -48,3 +54,3 @@ } | ||
const { code, actual, expected, operator } = error; | ||
const absoultePath = findFile(error); | ||
const absoultePath = findFile(error).replace(/file:/, ''); | ||
const file = node_path_1.default.relative(node_path_1.default.resolve(node_process_1.default.cwd()), absoultePath); | ||
@@ -51,0 +57,0 @@ let message = ''; |
{ | ||
"name": "poku", | ||
"version": "1.6.0", | ||
"description": "๐ท Poku brings human-friendly testing and assertion to Node.js, Bun & Deno at the same time.", | ||
"version": "1.6.1", | ||
"description": "๐ท Poku makes testing easy for Node.js, Bun & Deno at the same time.", | ||
"main": "./lib/index.js", | ||
"scripts": { | ||
"test": "npx tsx --tsconfig ./tsconfig.test.json ./test/run.test.ts", | ||
"pretest:coverage": "npm run build", | ||
"test:coverage": "docker compose -f test/docker/docker-compose.coverage.yml up", | ||
"test:ci": "tsx ./test/ci.test.ts", | ||
@@ -99,2 +101,3 @@ "test:node": "FILTER='node-' npm run test:ci", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"nyc": "^15.1.0", | ||
"packages-update": "^1.2.1", | ||
@@ -101,0 +104,0 @@ "prettier": "^3.2.5", |
170
README.md
@@ -12,3 +12,3 @@ [node-version-url]: https://github.com/nodejs/node | ||
[ql-url]: https://github.com/wellwelwel/poku/actions/workflows/codeql.yml?query=branch%3Amain | ||
[ql-image]: https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/codeql.yml?event=push&style=flat&label=Code%20QL&branch=main | ||
[ql-image]: https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci-codeql.yml?event=push&style=flat&label=Code%20QL&branch=main | ||
[license-url]: https://github.com/wellwelwel/poku/blob/main/LICENSE | ||
@@ -23,6 +23,4 @@ [license-image]: https://img.shields.io/npm/l/poku.svg?maxAge=2592000&color=9c88ff&label=License | ||
**Poku** is your test runner pet for [**Node.js**][node-version-url], [**Bun**][bun-version-url] and [**Deno**][deno-version-url] combining **flexibility**, **parallel** and **sequential** runs, **human-friendly assertion errors** and **high isolation level**. | ||
**Poku** is your Test Runner Pet for [**Node.js**][node-version-url], [**Bun**][bun-version-url] and [**Deno**][deno-version-url]. | ||
> By creating **Poku**, my aim is to show that testing can be simpler. | ||
[![Node.js Version][node-version-image]][node-version-url] | ||
@@ -41,3 +39,3 @@ [![Bun Version][bun-version-image]][bun-version-url] | ||
๐ท [**Documentation Website**](https://poku.dev) โข ๐ฌ [**Compare Poku with the Most Popular Test Runners**](https://poku.dev/docs/comparing) โข ๐งช [**Examples**](https://poku.dev/docs/category/examples) | ||
๐ท [**Documentation**](https://poku.dev) โข ๐งช [**Examples**](https://poku.dev/docs/category/examples) โข ๐ฌ [**Compare the Most Popular Test Runners**](https://poku.dev/docs/comparing) | ||
@@ -48,59 +46,32 @@ --- | ||
Let's make `describe`, `beforeEach` and everything else easier ๐ <br/> | ||
By creating **Poku**, my aim is to show that testing can be simpler ๐ฑ | ||
- No configurations | ||
- Supports **ESM** and **CJS** | ||
- High **isolation** level per file | ||
- Zero external dependencies | ||
- **Parallel** and **Sequential** runs | ||
- Designed to be highly intuitive | ||
- Compatible with **Coverage** tools | ||
- [**Node.js**][node-version-url], [**Bun**][bun-version-url] and [**Deno**][deno-version-url] compatibility | ||
- Zero configurations, except you want | ||
- Allows both **API (_in-code_)** and **CLI** usage | ||
- Poku adapts to your test, not the other way around | ||
- You can use **Poku**'s `assert` with every test runner you want | ||
- [**And much more!**](https://poku.dev) | ||
- You don't need to learn it all at once to get started ๐ง๐ปโ๐ | ||
--- | ||
> _Poku adapts to your test, not the other way around._ | ||
- [![Install Size](https://packagephobia.com/badge?p=poku)](https://packagephobia.com/result?p=poku) | ||
- **Zero** external dependencies ๐ฑ | ||
--- | ||
## Documentation | ||
## Install | ||
- See detailed usage in [**Documentation**](https://poku.dev/docs/category/documentation) section for **Poku**'s **CLI**, **API (_in-code_)** and **assert**, advanced concepts and much more. | ||
[![Install Size](https://packagephobia.com/badge?p=poku)](https://packagephobia.com/result?p=poku) | ||
--- | ||
<table> | ||
<tr> | ||
<th><img src=".github/assets/readme/node-js.svg" width="24" /></th> | ||
<th><img src=".github/assets/readme/node-js.svg" width="24" /> <img src=".github/assets/readme/plus.svg" width="24" /> <img src=".github/assets/readme/typescript.svg" width="24" /></th> | ||
<th><img src=".github/assets/readme/bun.svg" width="24" /></th> | ||
<th><img src=".github/assets/readme/deno.svg" width="24" /></th> | ||
</tr> | ||
<tr> | ||
<td width="400"> | ||
## Examples | ||
- See real example usages in [**Examples**](https://poku.dev/docs/category/examples) section for **Poku**'s + **Mock**, **Virutal DOM** and more. | ||
--- | ||
## Overview | ||
### `poku` | ||
| Sequential | Concurrent | | ||
| -------------------------------------------------- | ------------------------------------------------ | | ||
| <img src=".github/assets/readme/sequential.png" /> | <img src=".github/assets/readme/parallel.png" /> | | ||
> [**See the complete `poku` documentation**](https://poku.dev/docs/category/poku). | ||
--- | ||
### `assert` | ||
| Using `poku` | Using `node` | | ||
| --------------------------------------------------- | --------------------------------------------------- | | ||
| <img src=".github/assets/readme/assert-poku.png" /> | <img src=".github/assets/readme/assert-node.png" /> | | ||
> [**See the complete assert's documentation**](https://poku.dev/docs/documentation/assert). | ||
--- | ||
## Install | ||
### **Node.js** | ||
```bash | ||
@@ -110,3 +81,4 @@ npm i -D poku | ||
### TypeScript (Node.js) | ||
</td> | ||
<td width="400"> | ||
@@ -117,3 +89,4 @@ ```bash | ||
### Bun | ||
</td> | ||
<td width="400"> | ||
@@ -124,3 +97,4 @@ ```bash | ||
### **Deno** | ||
</td> | ||
<td width="400"> | ||
@@ -131,2 +105,6 @@ ```ts | ||
</td> | ||
</tr> | ||
</table> | ||
--- | ||
@@ -136,53 +114,80 @@ | ||
### `poku` | ||
### Test it ๐ฌ | ||
#### CLI | ||
_`test/file.test.js`_ | ||
> Try to set the flag `--parallel` before the target path ๐ | ||
```ts | ||
import { assert } from 'poku'; | ||
> <img src=".github/assets/readme/node-js.svg" width="24" /> | ||
assert(true, 'Poku will describe it ๐'); | ||
``` | ||
[**See the complete assert's documentation**](https://poku.dev/docs/documentation/assert). | ||
### Run it ๐ | ||
<table> | ||
<tr> | ||
<th><img src=".github/assets/readme/node-js.svg" width="24" /></th> | ||
<th><img src=".github/assets/readme/bun.svg" width="24" /></th> | ||
<th><img src=".github/assets/readme/deno.svg" width="24" /></th> | ||
</tr> | ||
<tr> | ||
<td width="400"> | ||
```bash | ||
npx poku targetPath | ||
npx poku targetPathA,targetPathB | ||
npx poku | ||
``` | ||
> <img src=".github/assets/readme/bun.svg" width="24" /> | ||
</td> | ||
<td width="400"> | ||
```bash | ||
bun poku targetPath | ||
bun poku targetPathA,targetPathB | ||
bun poku | ||
``` | ||
> <img src=".github/assets/readme/deno.svg" width="24" /> | ||
</td> | ||
<td width="400"> | ||
```bash | ||
deno run npm:poku targetPath | ||
deno run npm:poku targetPathA,targetPathB | ||
deno run npm:poku | ||
``` | ||
#### API (_In-code_) | ||
</td> | ||
</tr> | ||
</table> | ||
##### Node.js, TypeScript (Node.js) and Bun | ||
[**See the complete `poku` documentation**](https://poku.dev/docs/category/poku). | ||
```ts | ||
import { poku } from 'poku'; | ||
### That's it ๐ | ||
await poku(['targetPath']); | ||
``` | ||
--- | ||
##### Deno | ||
## Overview | ||
```ts | ||
import { poku } from 'npm:poku'; | ||
### `poku` | ||
await poku(['targetPath']); | ||
``` | ||
| Sequential | Concurrent | | ||
| -------------------------------------------------- | ------------------------------------------------ | | ||
| <img src=".github/assets/readme/sequential.png" /> | <img src=".github/assets/readme/parallel.png" /> | | ||
> [**See the complete `poku` documentation**](https://poku.dev/docs/category/poku). | ||
--- | ||
### `assert` | ||
Use it exactly as it's for **Node.js** ๐ | ||
- ๐ Use it exactly as it's for **Node.js** | ||
- ๐ท **Node.js**, **Bun** and **Deno** compatibility. | ||
| Using `poku` | Using `node` | | ||
| --------------------------------------------------- | --------------------------------------------------- | | ||
| <img src=".github/assets/readme/assert-poku.png" /> | <img src=".github/assets/readme/assert-node.png" /> | | ||
> [**See the complete assert's documentation**](https://poku.dev/docs/documentation/assert). | ||
--- | ||
## Documentation and Examples | ||
To see the detailed documentation, please visit the [**Documentation**](https://poku.dev/docs/category/documentation) and [**Examples**](https://poku.dev/docs/category/examples) sections in the [**Poku**'s website](https://poku.dev). | ||
@@ -200,4 +205,6 @@ | ||
- [**Contributors**](https://github.com/wellwelwel/poku/graphs/contributors). | ||
[![Contributors](https://img.shields.io/github/contributors/wellwelwel/poku)](https://github.com/wellwelwel/poku/graphs/contributors) | ||
[![Contributors](https://contrib.rocks/image?repo=wellwelwel/poku)](https://github.com/wellwelwel/poku/graphs/contributors) | ||
--- | ||
@@ -220,1 +227,8 @@ | ||
Please check the [**SECURITY.md**](./SECURITY.md) and the section [**Is Poku Safe?**](https://poku.dev/docs/security) from Documentation. | ||
--- | ||
## Author | ||
| [![wellwelwel](https://avatars.githubusercontent.com/u/46850407?v=4?v=3&s=115)<br><sub>@wellwelwel</sub>](https://github.com/wellwelwel) | | ||
| :--------------------------------------------------------------------------------------------------------------------------------------: | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86055
1746
224
13