Files
Charon/.github/instructions/nodejs-javascript-vitest.instructions.md
GitHub Actions 3169b05156 fix: skip incomplete system log viewer tests
- Marked 12 tests as skip pending feature implementation
- Features tracked in GitHub issue #686 (system log viewer feature completion)
- Tests cover sorting by timestamp/level/method/URI/status, pagination controls, filtering by text/level, download functionality
- Unblocks Phase 2 at 91.7% pass rate to proceed to Phase 3 security enforcement validation
- TODO comments in code reference GitHub #686 for feature completion tracking
- Tests skipped: Pagination (3), Search/Filter (2), Download (2), Sorting (1), Log Display (4)
2026-02-09 21:55:55 +00:00

1.4 KiB

description, applyTo
description applyTo
Guidelines for writing Node.js and JavaScript code with Vitest testing **/*.js, **/*.mjs, **/*.cjs

Code Generation Guidelines

Coding standards

  • Use JavaScript with ES2022 features and Node.js (20+) ESM modules
  • Use Node.js built-in modules and avoid external dependencies where possible
  • Ask the user if you require any additional dependencies before adding them
  • Always use async/await for asynchronous code, and use 'node:util' promisify function to avoid callbacks
  • Keep the code simple and maintainable
  • Use descriptive variable and function names
  • Do not add comments unless absolutely necessary, the code should be self-explanatory
  • Never use null, always use undefined for optional values
  • Prefer functions over classes

Testing

  • Use Vitest for testing
  • Write tests for all new features and bug fixes
  • Ensure tests cover edge cases and error handling
  • NEVER change the original code to make it easier to test, instead, write tests that cover the original code as it is

Documentation

  • When adding new features or making significant changes, update the README.md file where necessary

User interactions

  • Ask questions if you are unsure about the implementation details, design choices, or need clarification on the requirements
  • Always answer in the same language as the question, but use english for the generated content like code, comments or docs