(actual: string, expected: string)
| 221 | } |
| 222 | |
| 223 | function isLikelyTabValue(actual: string, expected: string): boolean { |
| 224 | const normalizedActual = normalizeTabValue(actual); |
| 225 | const normalizedExpected = normalizeTabValue(expected); |
| 226 | return normalizedActual === normalizedExpected || getEditDistance(normalizedActual, normalizedExpected) <= 1; |
| 227 | } |
| 228 | |
| 229 | function normalizeTabValue(value: string): string { |
| 230 | return value.toLowerCase().replaceAll(/[\s_-]/g, ""); |
no test coverage detected