diff --git a/website/versioned_docs/version-28.0/CLI.md b/website/versioned_docs/version-28.0/CLI.md index 694de03a17cb..4ea73b5a6562 100644 --- a/website/versioned_docs/version-28.0/CLI.md +++ b/website/versioned_docs/version-28.0/CLI.md @@ -204,7 +204,18 @@ Alias: `-e`. Use this flag to show full diffs and errors instead of a patch. ### `--filter=` -Path to a module exporting a filtering function. This method receives a list of tests which can be manipulated to exclude tests from running. Especially useful when used in conjunction with a testing infrastructure to filter known broken. +Path to a module exporting a filtering function. This asynchronous function receives a list of test paths which can be manipulated to exclude tests from running by returning an object with the "filtered" property. Especially useful when used in conjunction with a testing infrastructure to filter known broken, e.g. + +```javascript +// my-filter.js +module.exports = (testPaths) => { + const allowedPaths = testPaths.filter(filteringFunction) // ["path1.spec.js", "path2.spec.js", etc] + return { + filtered : allowedPaths, + } +} +``` + ### `--findRelatedTests `