* Tests whether a file should be skipped based on exclusion and inclusion patterns. * * @param {object} file - The file to be tested. * @param {string} file.path - The relative URL of the file. * @returns {boolean} - Returns true if the file should be skipped, false otherwise.
(file)
| 283 | * @returns {boolean} - Returns true if the file should be skipped, false otherwise. |
| 284 | */ |
| 285 | function test(file) { |
| 286 | if (!file.path) return false; |
| 287 | if (isBinaryFile(file)) return true; |
| 288 | const match = (pattern) => |
| 289 | picomatch.isMatch(file.path, pattern, { matchBase: true }); |
| 290 | return excludeFiles.some(match) || !includeFiles.some(match); |
| 291 | } |
| 292 | |
| 293 | return { |
| 294 | test, |
nothing calls this directly
no test coverage detected