"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
require("mocha");
require("chai");
const chai_1 = require("chai");
const LocalOps_1 = require("../LocalOps");
const codiac_ops_common_1 = require("@codiac.io/codiac-ops-common");
const codiac_common_1 = require("@codiac.io/codiac-common");
const ops_1 = require("../../ops");
const data_1 = require("../data");
const inversify_1 = require("inversify");
describe("when versions are parsed", () => {
    let localOps;
    let logger;
    let ioc = new inversify_1.Container();
    let cliExec;
    before(() => {
        logger = new codiac_common_1.BetterConsoleLogger();
        cliExec = new codiac_ops_common_1.CliExec(logger);
        let uiPvd = new ops_1.ThrowingUserInputProvider(logger);
        let styler = new ops_1.NoStyleOutputStyler();
        let cliRoot = process.cwd(); // we're not using this for this test
        let projRoot = process.cwd();
        console.log(`projRoot: ${projRoot}`);
        let cfgRepo = new data_1.ProjectContextRepo({ projectRoot: projRoot });
        ioc.bind(data_1.ProjectContextRepo).toConstantValue(cfgRepo);
        localOps = new LocalOps_1.LocalOps(ioc); // , { cliConfigDir: cwd(), version: "0.0.0" }, { projectRoot: projRoot }, cfgRepo, uiPvd, styler, cliExec, logger);
    });
    it("then branch shall be recognized in prerelease.", () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
        return new Promise((resolve, reject) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
            try {
                let v1 = "1.2.3-branch-name.4";
                let newBranchName = "my-new.branchname";
                // let modified = localOps.addPrereleaseId(v1, newBranchName);
                // console.log(modified);
                // expect(modified).to.equal(`1.2.3-${newBranchName}.0`, "The version number was incorrect");
                chai_1.expect.fail();
                resolve();
            }
            catch (err) {
                reject(err);
            }
        }));
    }));
    it("then build number suffixes shall be supported in prerelease.", () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
        return new Promise((resolve, reject) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
            try {
                let v1 = "1.2.3-branch-name.4+8989";
                let newBranchName = "my-new.branch_name";
                // let modified = localOps.addPrereleaseId(v1, newBranchName);
                // console.log(modified);
                // expect(modified).to.equal(`1.2.3-my-new.branch-name.0`, "The version number was incorrect");
                chai_1.expect.fail();
                resolve();
            }
            catch (err) {
                reject(err);
            }
        }));
    }));
});
//# sourceMappingURL=when-versions-are-parsed.spec.js.map