Skip to main content

is_test_path

Function is_test_path 

Source
pub fn is_test_path(path: &Path) -> bool
Expand description

True if path is under a test directory or named like a test file.

Recognized patterns:

  • segment match: tests/, test/, __tests__/, __mocks__/, spec/, specs/
  • filename: starts with test_ / ends with _test, .test, .spec, _spec