You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gristlabs_grist-core/test/common/getTableTitle.ts

16 lines
523 B

import {getTableTitle} from 'app/common/ActiveDocAPI';
import {assert} from 'chai';
describe('getTableTitle', function() {
it('should construct correct table titles', async function() {
function check(groupByColLabels: string[] | null, expected: string) {
assert.equal(getTableTitle({title: "My Table", groupByColLabels, colIds: []}), expected);
}
check(null, "My Table");
check([], "My Table [Totals]");
check(["A"], "My Table [by A]");
check(["A", "B"], "My Table [by A, B]");
});
});