"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const uvu_1 = require("uvu");
const assert = __importStar(require("uvu/assert"));
const ProjectIndexer_1 = require("./ProjectIndexer");
function minute(x) {
    return x * 60 * 1000;
}
function second(x) {
    return x * 1000;
}
(0, uvu_1.test)('prettyMilliseconds', () => {
    assert.is((0, ProjectIndexer_1.prettyMilliseconds)(0), '0ms');
    assert.is((0, ProjectIndexer_1.prettyMilliseconds)(1), '1ms');
    assert.is((0, ProjectIndexer_1.prettyMilliseconds)(second(1)), '1s 0ms');
    assert.is((0, ProjectIndexer_1.prettyMilliseconds)(second(1) + 300), '1s 300ms');
    assert.is((0, ProjectIndexer_1.prettyMilliseconds)(second(2)), '2s 0ms');
    assert.is((0, ProjectIndexer_1.prettyMilliseconds)(second(5)), '5s 0ms');
    assert.is((0, ProjectIndexer_1.prettyMilliseconds)(minute(1)), '1m 0s 0ms');
    assert.is((0, ProjectIndexer_1.prettyMilliseconds)(minute(2)), '2m 0s 0ms');
    assert.is((0, ProjectIndexer_1.prettyMilliseconds)(minute(5)), '5m 0s 0ms');
    assert.is((0, ProjectIndexer_1.prettyMilliseconds)(minute(60)), '60m 0s 0ms');
    assert.is((0, ProjectIndexer_1.prettyMilliseconds)(minute(5) + second(8) + 999), '5m 8s 999ms');
});
uvu_1.test.run();
