UNPKG

lml-main

Version:

This is now a mono repository published into many standalone packages.

38 lines 1.29 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var ts_utils_1 = require("@lml/ts-utils"); var moment = require("moment"); exports.TEST_JOB_LABEL = 'T1'; exports.mockJobStatuses = function (length, status) { if (length === void 0) { length = 5; } if (status === void 0) { status = 'live'; } var res = []; for (var i = 0; i < length; i++) { res.push(exports.mockJobStatus(status)); } return res; }; exports.mockJobStatus = function (status) { if (status === void 0) { status = 'live'; } return ({ label: exports.TEST_JOB_LABEL, lastAction: '', pickupBy: Date.now() + 1000, refId: "justeat::raj::jobn::" + ts_utils_1.getRandomIntOfLength(10), status: 'live', timestamp: moment().subtract(3, 'hours').toISOString(), updatedAt: moment().subtract(2, 'hours').toISOString(), }); }; exports.mockJobSearchParams = function (status) { if (status === void 0) { status = 'live'; } return ({ statuses: [status], labels: [exports.TEST_JOB_LABEL], order: 'asc', start: moment().subtract(12, 'hours').toISOString(), end: moment().add(12, 'hours').toISOString(), lastKeys: {}, }); }; //# sourceMappingURL=status.js.map