push
3569 of 5289 branches covered (67.48%)
Branch coverage included in aggregate %.
4012 of 4012 new or added lines in 179 files covered. (100.0%)
6519 of 9082 relevant lines covered (71.78%)
304.77 hits per line
1 |
import type { Specificity } from './types'; |
|
2 |
|
|
|
export function compareSpecificity(a: Specificity, b: Specificity) {
|
3✔ |
|
if (a[0] < b[0]) { |
|
|
return -1; |
4✔ |
|
} else if (a[0] > b[0]) { |
|
|
return 1; |
1✔ |
|
} else if (a[1] < b[1]) { |
|
|
return -1; |
17✔ |
|
} else if (a[1] > b[1]) { |
|
|
return 1; |
32✔ |
|
} else if (a[2] < b[2]) { |
|
|
return -1; |
× |
|
} else if (a[2] > b[2]) { |
|
|
return 1; |
× |
16 |
} |
|
|
return 0; |
137✔ |
18 |
} |