Skip to content

Latest commit

History

History
49 lines (34 loc) 路 1.1 KB

File metadata and controls

49 lines (34 loc) 路 1.1 KB

vitest/consistent-test-filename

馃摑 Require test file pattern.

鈿狅笍 This rule warns in the 馃寪 all config.

Rule Details

Options

Name Description Type
allTestPattern Regex pattern used to identify all possible test files. String
pattern Regex pattern for files that should be treated as tests. String
{
  "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.