(cwd: string)
| 27 | }); |
| 28 | |
| 29 | async function setupRepoAndClone(cwd: string) { |
| 30 | await spawn("git", ["init"], { cwd }); |
| 31 | await add(".", cwd); |
| 32 | await commit("commit1", cwd); |
| 33 | |
| 34 | const mainBranch = await getCurrentBranch(cwd); |
| 35 | |
| 36 | // Make a 1-commit-deep shallow clone of this repo |
| 37 | let clone = tempdir(); |
| 38 | await spawn( |
| 39 | "git", |
| 40 | // Note: a file:// URL is needed in order to make a shallow clone of |
| 41 | // a local repo |
| 42 | ["clone", "--depth", "1", fileUrl(cwd), "."], |
| 43 | { |
| 44 | cwd: clone, |
| 45 | } |
| 46 | ); |
| 47 | await spawn("git", ["checkout", "-b", "some-other-branch"], { cwd }); |
| 48 | return { clone, mainBranch }; |
| 49 | } |
| 50 | |
| 51 | describe("version", () => { |
| 52 | it("returns the right changed packages and pushes to the remote", async () => { |
no test coverage detected