MCPcopy Index your code
hub / github.com/apache/echarts / testSortComparator

Function testSortComparator

test/ut/spec/data/dataValueHelper.test.ts:385–397  ·  view source on GitHub ↗
(order: Order, incomparable: Incomparable)

Source from the content-addressed store, hash-verified

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');

Callers 1

Calls 2

evaluateMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…