Skip to content
Development
Command

/test-commands

:::info This document covers the testing commands for running, filtering, and measuring test coverage in the eIsland frontend. :::

From plugin
eisland
2797 skills7 commands
Install
$ npx -y skills add JNTMTMTM/eIsland --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/test-commands

Context preview

What this command does when you run it.

:::info This document covers the testing commands for running, filtering, and measuring test coverage in the eIsland frontend. :::

Command definition

test-commands.md
title: Testing Commands
icon: vial

Testing Commands

:::info This document covers the testing commands for running, filtering, and measuring test coverage in the eIsland frontend. :::

All commands are run from the `web/` directory:

cd web
npm run <script>

`npm run test`

Runs the full test suite once.

npm run test

**Configuration:** Vitest with:

  • `environment: 'node'`
  • `clearMocks: true` — mocks are cleared between tests
  • `restoreMocks: true` — mocks are restored to their original implementation
  • Test file pattern: `src/**/*.test.ts`

:::tip For iterative development, use `npx vitest` (without `run`) to start Vitest in **watch mode** — it re-runs affected tests on file save. :::

**When to use:**

  • Before committing code
  • In CI pipelines
  • After pulling new changes to verify nothing is broken

`npm run test:preload`

Runs only the preload bridge test file.

npm run test:preload

**Under the hood:** `vitest run src/preload/index.test.ts`

:::note This is a subset of `npm run test`. Use it when modifying preload code for faster feedback — it skips all other test files. :::

`npm run test:coverage`

Runs the full test suite with an Istanbul coverage report.

npm run test:coverage

**Output:** Coverage report in the terminal and `coverage/` directory with HTML reports.

**When to use:**

  • Before opening a PR to verify coverage thresholds
  • Periodically to audit test gaps
  • When adding new features to ensure they are tested

Troubleshooting

`npm run test` Fails After Pull

**Stale build artifacts:**

rm -rf out/ node_modules/
npm install
npm run test
Read more
Ships witheisland

eIsland - A sleek, Apple Dynamic Island inspired floating widget for Windows, built with Electron.

Get the whole plugin