Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 681 Bytes

consistent-test-filename.md

File metadata and controls

38 lines (27 loc) · 681 Bytes

Require .spec test file pattern (vitest/consistent-test-filename)

⚠️ This rule warns in the 🌐 all config.

Rule Details

Options

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "pattern": {
      "format": "regex",
      "default": ".*\\.test\\.[tj]sx?$"
    },
    "allTestPattern": {
      "format": "",
      "default": ".*\\.(test|spec)\\.[tj]sx?$"
    }
  }
}
allTestPattern

regex pattern for all tests files

Decides whether a file is a testing file.

pattern

required testing pattern

pattern doesn't have a default value, you must provide one.