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
2 changes: 1 addition & 1 deletion .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: poku-react-testing-codeql
name: pokujs-react-codeql
queries:
- uses: security-extended
- uses: security-and-quality
2 changes: 1 addition & 1 deletion .github/workflows/cd_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: poku-react-testing
package-name: '@pokujs/react'

- name: ➕ Actions - Checkout
uses: actions/checkout@v4
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<div align="center">
<img height="180" alt="Poku's Logo" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/poku.svg">

# poku-react-testing
# @pokujs/react

Enjoying **Poku**? [Give him a star to show your support](https://github.com/wellwelwel/poku) 🌟

---

📘 [**Documentation**](https://github.com/Lojhan/poku-react-testing#readme)
📘 [**Documentation**](https://github.com/pokujs/react#readme)

</div>

---

🧪 [**poku-react-testing**](https://github.com/Lojhan/poku-react-testing) is a **Poku** plugin for React component testing with DOM adapters.
🧪 [**@pokujs/react**](https://github.com/pokujs/react) is a **Poku** plugin for React component testing with DOM adapters.

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

```bash
# Node.js
npm i -D poku-react-testing
npm i -D @pokujs/react
```

</td>
<td width="225">

```bash
# Bun
bun add -d poku-react-testing
bun add -d @pokujs/react
```

</td>
<td width="225">

```bash
# Deno (optional)
deno add npm:poku-react-testing
deno add npm:@pokujs/react
```

</td>
Expand Down Expand Up @@ -83,7 +83,7 @@ npm i -D jsdom
```js
// poku.config.js
import { defineConfig } from 'poku';
import { reactTestingPlugin } from 'poku-react-testing/plugin';
import { reactTestingPlugin } from '@pokujs/react/plugin';

export default defineConfig({
plugins: [
Expand All @@ -99,7 +99,7 @@ export default defineConfig({
```tsx
// tests/my-component.test.tsx
import { afterEach, assert, test } from 'poku';
import { cleanup, render, screen } from 'poku-react-testing';
import { cleanup, render, screen } from '@pokujs/react';

afterEach(cleanup);

Expand Down
6 changes: 3 additions & 3 deletions benchmark/REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Each scenario runs the **same 9 React tests** across 5 test files:

| Combination | DOM layer | Assertion style |
| --------------------------------- | ------------------------------ | -------------------- |
| poku + poku-react-testing | happy-dom | `assert.strictEqual` |
| poku + poku-react-testing | jsdom | `assert.strictEqual` |
| poku + @pokujs/react | happy-dom | `assert.strictEqual` |
| poku + @pokujs/react | jsdom | `assert.strictEqual` |
| jest 29 + @testing-library/react | jsdom (jest-environment-jsdom) | `expect().toBe()` |
| vitest 3 + @testing-library/react | jsdom | `expect().toBe()` |
| vitest 3 + @testing-library/react | happy-dom | `expect().toBe()` |
Expand Down Expand Up @@ -94,7 +94,7 @@ Each scenario runs the **same 9 React tests** across 5 test files:

### Interpretation

**poku + poku-react-testing** avoids the multi-process or bundler startup that jest (babel transform
**poku + @pokujs/react** avoids the multi-process or bundler startup that jest (babel transform
pipeline) and vitest (Vite + module graph) require. Its architecture — isolated per-file Node.js
processes with minimal bootstrap — means cold-start overhead is proportional to the number of test
files, not to the framework's own initialization.
Expand Down
Loading
Loading