testing-observability

Test Cloudflare Workers observability features with Miniflare and vitest-pool-workers.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/eykd/vance-ts --skill testing-observability
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-observability
Source: https://github.com/eykd/vance-ts/tree/main/.claude/skills/testing-observability
Command: npx skills add https://github.com/eykd/vance-ts --skill testing-observability

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires miniflare, vitest-pool-workers, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill unit streamlines testing of logging and observability in Cloudflare Workers, simplifying the verification of logger behavior, redaction correctness, and Workers runtime integration.

Core Features & Use Cases

  • Logger Unit Testing: Comprehensive tests for console.log mocking and base field validation.
  • Redaction Function Testing: Validate PII and secret pattern detection, field redaction, and URL sanitization.
  • Workers Runtime Integration Testing: Integration testing with Miniflare and vitest-pool-workers for features like AsyncLocalStorage and environment bindings.

Quick Start

Activate the testing-observability skill and navigate to the reference documentation for the specific testing pattern you need, e.g., logger-unit-tests.

Frequently Asked Questions about testing-observability

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

FAQPage Schema
How do I test logging and observability in Cloudflare Workers?

Testing logging and observability in Cloudflare Workers requires verifying logger behavior, redaction correctness, and runtime integration. You can streamline this by running logger unit tests, redaction pattern validation, and integration tests using Miniflare and vitest-pool-workers.

How do I unit test console.log mocking and base field validation for a logger?

Unit testing console.log mocking and base field validation involves creating comprehensive tests to verify that the logger outputs the correct base fields. This ensures your logging behavior remains consistent and accurate across different runtime executions.

Can I test PII redaction and URL sanitization patterns in my Workers logger?

Testing PII redaction and URL sanitization patterns validates your redaction functions by checking secret pattern detection and field redaction. This ensures sensitive data is properly sanitized before logs are emitted from your Cloudflare Workers.

Do I need Miniflare and vitest-pool-workers for runtime-accurate Workers integration testing?

Yes, runtime-accurate Workers integration testing requires Miniflare and vitest-pool-workers. These dependencies provide the necessary runtime environment to test features like AsyncLocalStorage and environment bindings accurately within your Cloudflare Workers.

What is the best way to verify AsyncLocalStorage and environment bindings in a Workers test?

The best way to verify AsyncLocalStorage and environment bindings is through runtime integration testing. By utilizing Miniflare with vitest-pool-workers, you can validate that your Cloudflare Workers runtime features function correctly under realistic conditions.

How do I start testing observability features after activating the testing-observability skill?

To start testing observability features, activate the skill and navigate to the reference documentation for the specific testing pattern you need, such as logger-unit-tests. This provides targeted guidance for your specific logging, redaction, or integration testing requirements.