(pattern?: string, context?: string)
| 77 | } |
| 78 | |
| 79 | function createFilter(pattern?: string, context?: string) { |
| 80 | try { |
| 81 | const regex = pattern ? new RegExp(pattern) : undefined; |
| 82 | return (s: string) => !regex || regex.test(s); |
| 83 | } catch (ex) { |
| 84 | if (ex instanceof SyntaxError) { |
| 85 | const errMsg = context ? `Invalid ${context} regex: ${pattern}` : `Invalid regex: ${pattern}`; |
| 86 | throw new FirebaseError(errMsg, { original: getError(ex) }); |
| 87 | } |
| 88 | throw ex; |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | interface TestCaseFile { |
| 93 | path: string; |
no test coverage detected
searching dependent graphs…