(order: Order, incomparable: Incomparable)
| 383 | describe('sort_relational_comparison', function () { |
| 384 | |
| 385 | function testSortComparator(order: Order, incomparable: Incomparable) { |
| 386 | const key = order + '_incmpr' + incomparable; |
| 387 | const SortOrderComparator = dataValueHelper.SortOrderComparator; |
| 388 | const sortOrderComparator = new SortOrderComparator(order, incomparable); |
| 389 | it(key + '_sort_comparator', () => { |
| 390 | eachRelationalComparisonCase((lval, rval, caseTag) => { |
| 391 | expect(sortResultMap.hasOwnProperty(caseTag)); |
| 392 | expect(sortResultMap[caseTag].hasOwnProperty(key)); |
| 393 | const expectedResult = (sortResultMap[caseTag] as any)[key]; |
| 394 | expect(sortOrderComparator.evaluate(lval, rval)).toEqual(expectedResult); |
| 395 | }); |
| 396 | }); |
| 397 | } |
| 398 | testSortComparator('asc', 'min'); |
| 399 | testSortComparator('asc', 'max'); |
| 400 | testSortComparator('desc', 'min'); |
no test coverage detected
searching dependent graphs…