UNPKG

workspace-tools

Version:

A collection of tools that are useful in a git-controlled monorepo that is managed by one of these software:

27 lines (26 loc) 884 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const setupFixture_1 = require("../helpers/setupFixture"); const git_1 = require("../git"); describe("getDefaultRemote()", () => { afterAll(() => { setupFixture_1.cleanupFixtures(); }); it("is origin in the default test repo", () => { // arrange const cwd = setupFixture_1.setupFixture("basic"); // act const remote = git_1.getDefaultRemote(cwd); // assert expect(remote).toBe("origin"); }); it("is myMain when default branch is different", () => { // arrange const cwd = setupFixture_1.setupFixture("basic"); setupFixture_1.setupLocalRemote(cwd, "myRemote", "basic"); // act const remote = git_1.getDefaultRemote(cwd); // assert expect(remote).toBe("myRemote"); }); });