vitest-error-analysis

Extract error summaries and diffs from Vitest test output using grep and awk.

1|Updated Oct 13, 2022
One-click install
npx skills add https://github.com/kryota-dev/dotfiles --skill vitest-error-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vitest-error-analysis
Source: https://github.com/kryota-dev/dotfiles/tree/main/.bin/.claude/skills/vitest-error-analysis
Command: npx skills add https://github.com/kryota-dev/dotfiles --skill vitest-error-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Vitest の長い出力からエラー情報を効率的に抽出・分析する作業を大幅に短縮します。テスト失敗時にエラーの要点を素早く把握し、原因追究を容易にします。

Core Features & Use Cases

  • エラーサマリーの抽出: 失敗したテストの概要を即座に把握
  • 詳細差分の抽出: Expected/Received の差分を確認
  • 一時ファイル活用: タイムスタンプ付きの保存で履歴を追跡
  • Use Case: 大規模な Vitest 出力から「AssertionError」や「Test Files」情報を抽出して修正を優先

Quick Start

Save the Vitest output to a timestamped file and use grep/awk to extract error details for quick triage.

Frequently Asked Questions about vitest-error-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract error details from a massive Vitest output log?

You can extract Vitest error summaries by saving test output to a timestamped file and running a Bash workflow with grep and awk. This isolates failed tests and error traces, helping you quickly identify AssertionError details for debugging.

What is the best way to debug failed Vitest tests in a monorepo?

Debugging failed Vitest tests in a monorepo is easier when you extract the error summary and Expected/Received diffs. Using a Bash-based workflow to parse large multi-file test suite logs isolates specific failures and speeds up triage.

Can I use Bash and awk to parse Vitest test output streams?

Yes, you can use Bash with grep and awk to parse Vitest-style output streams. This command-line approach filters large test suite results and extracts specific error traces and AssertionError details directly from the terminal or saved logs.

How do I identify AssertionError and Test Files information when a Vitest CI run fails?

To identify AssertionError and Test Files information from a failed Vitest CI run, parse the saved output file using a Bash workflow. grep and awk extract the error summary and detailed Expected/Received diffs, enabling prioritized fixes.

Does this approach work for extracting Expected and Received diffs from local Vitest runs?

Yes, extracting Expected and Received diffs works for local Vitest runs. By saving the output to a timestamped file and parsing it with Bash tools like grep and awk, you focus on exact failure details without scrolling through the entire log.

What are the limitations of using Bash and awk for Vitest error analysis?

A limitation of using Bash and awk for Vitest error analysis is the requirement to save output to a timestamped file first. This workflow parses static log text rather than interacting with live test streams in real time during the test run.