@netdata/charts
Version:
Netdata frontend SDK and chart utilities
19 lines • 1.11 kB
JavaScript
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
import chartTitleByContextMap from "./chartTitleByContextMap";
describe("chartTitleByContextMap", function () {
it("exports an object with chart title mappings", function () {
expect(_typeof(chartTitleByContextMap)).toBe("object");
expect(chartTitleByContextMap).not.toBe(null);
});
it("contains fping context mappings", function () {
expect(chartTitleByContextMap["fping.latency"]).toBeDefined();
expect(chartTitleByContextMap["fping.packets"]).toBeDefined();
expect(chartTitleByContextMap["fping.quality"]).toBeDefined();
});
it("has string values for all mappings", function () {
Object.values(chartTitleByContextMap).forEach(function (value) {
expect(_typeof(value)).toBe("string");
expect(value.length).toBeGreaterThan(0);
});
});
});