Back to all reviewers

comprehensive test verification

denoland/deno
Based on 2 comments
Other

Write tests that comprehensively verify functionality by covering related scenarios and testing complete outputs rather than partial matches. This approach makes tests more resilient to code changes and ensures thorough validation.

Testing Other

Reviewer Prompt

Write tests that comprehensively verify functionality by covering related scenarios and testing complete outputs rather than partial matches. This approach makes tests more resilient to code changes and ensures thorough validation.

When testing a feature, consider testing related functionality that users might invoke in similar contexts. For example, if testing deno add --npm, also test deno install and related command variations.

Additionally, prefer testing complete outputs over partial matches using wildcards. Instead of testing only fragments, verify the full output to catch unintended changes:

// Less resilient - partial output testing
"output": "[WILDCARD]Found 1 problem"

// More resilient - complete output testing  
"output": "[WILDCARD]Found 1 problem\nChecked 1 file"

This ensures tests catch when fixes or messages are moved, modified, or when output format changes unexpectedly.

2
Comments Analyzed
Other
Primary Language
Testing
Category

Source Discussions