Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ci_osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ jobs:
! command -v node

- name: 🧪 Testing
run: set -o pipefail && deno task test:deno 2>&1 | tee test-output.log
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 2
command: set -o pipefail && deno task test:deno 2>&1 | tee test-output.log

- name: 📤 Upload test output
if: always()
Expand Down
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
"options": {
"trailingComma": "none"
}
},
{
"files": "*.coveragerc",
"options": {
"trailingComma": "none"
}
}
]
}
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @pokujs/coverage

The first code coverage package that targets Node.js (V8), Bun (JSC), and Deno (V8) simultaneously. Exclusive plugin for Poku, the only test runner that executes the same test suite natively on the three runtimes.
The first code coverage package that targets Node.js (V8), Bun (JSC), and Deno (V8) simultaneously.

> Notes to the agent:
>
Expand Down
52 changes: 49 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Enjoying **Poku**? [Give him a star to show your support](https://github.com/wel

---

☔️ **@pokujs/coverage** is a **Poku** plugin that unifies coverage collection across **Node.js**, **Deno**, and **Bun**.
☔️ **@pokujs/coverage** unifies coverage collection across **Node.js**, **Deno**, and **Bun**.

> [!TIP]
>
Expand All @@ -29,7 +29,6 @@ Enjoying **Poku**? [Give him a star to show your support](https://github.com/wel

## Why

- Move and combine entire test suites between **Node.js**, **Deno**, and **Bun** with zero configuration changes.
- Know exactly what is and isn't tested across each runtime using the same test suite.
- Whether it's **CommonJS**, **ES Modules**, **TypeScript**, or both, just install and use it.

Expand All @@ -43,7 +42,9 @@ Enjoying **Poku**? [Give him a star to show your support](https://github.com/wel
npm i -D @pokujs/coverage
```

### 🤹 Usage
### Usage

#### 🐷 Poku

```json
{
Expand All @@ -59,6 +60,51 @@ npm i -D @pokujs/coverage

---

#### ⚡️ Vitest

```ts
// vitest.config.ts
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
coverage: {
provider: 'custom',
customProviderModule: '@pokujs/coverage/vitest',
},
},
});
```

```json
{
"scripts": {
"test": "vitest run --coverage"
}
}
```

- **Node.js** only.

---

#### ⌨️ CLI

```json
{
"scripts": {
"test:node": "coverage node --test",
"test:ava": "coverage ava",
"test:mocha": "coverage mocha",
"test:deno": "coverage deno test"
}
}
```

- **Bun** _(built-in)_ isn't supported in **CLI** mode yet.

---

## Options

| Option | Type | Default | Node.js | Deno | Bun |
Expand Down
Loading
Loading