Skip to content

Commit 051fbb1

Browse files
committed
fix stupid mess made by stupid bot
1 parent 747a05d commit 051fbb1

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

packages/@apphosting/common/src/index.spec.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,27 @@ import assert from "assert";
22
import fs from "fs";
33
import path from "path";
44
import os from "os";
5-
import { UpdateOrCreateGitignore } from "./index";
5+
import { updateOrCreateGitignore } from "./index";
66

77
describe("update or create .gitignore", () => {
88
let tmpDir: string;
9-
afterEach(() => {
10-
fs.rmSync(tmpDir, { recursive: true, force: true });
11-
});
9+
beforeEach(() => {
10+
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "test-gitignore"));
11+
});
12+
13+
afterEach(() => {
14+
fs.rmSync(tmpDir, { recursive: true, force: true });
15+
});
1216

1317
it(".gitignore file exists and is correctly updated with missing paths", async () => {
14-
const { updateOrCreateGitignore } = await importIndex;
1518
fs.writeFileSync(path.join(tmpDir, ".gitignore"), "existingpath/");
1619

1720
updateOrCreateGitignore(tmpDir, ["existingpath/", "newpath/"]);
1821

1922
const gitignoreContent = fs.readFileSync(path.join(tmpDir, ".gitignore"), "utf-8");
20-
assert.equal(`existingpath/\nnewpath/\n`, gitignoreContent);
23+
assert.equal(`existingpath/\nnewpath/`, gitignoreContent);
2124
});
2225
it(".gitignore file does not exist and is created", async () => {
23-
const { updateOrCreateGitignore } = await importIndex;
2426
updateOrCreateGitignore(tmpDir, ["chickenpath/", "newpath/"]);
2527
const gitignoreContent = fs.readFileSync(path.join(tmpDir, ".gitignore"), "utf-8");
2628
assert.equal(`chickenpath/\nnewpath/`, gitignoreContent);

packages/@apphosting/common/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { spawn } from "child_process";
22
import * as fs from "node:fs";
3+
import * as path from "node:path";
34

45
// Output bundle metadata specifications to be written to bundle.yaml
56
export interface OutputBundleConfig {

0 commit comments

Comments
 (0)