Refactor code formatting for consistency in scaffold and update port registry scripts
This commit is contained in:
@@ -27,7 +27,9 @@ function readJson(filePath) {
|
||||
}
|
||||
|
||||
test("creates local snapshot and machine registry", () => {
|
||||
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "copilot-port-registry-"));
|
||||
const tempDir = fs.mkdtempSync(
|
||||
path.join(os.tmpdir(), "copilot-port-registry-"),
|
||||
);
|
||||
const stateDir = path.join(tempDir, "state");
|
||||
const projectPath = path.join(tempDir, "workspace-a");
|
||||
fs.mkdirSync(projectPath, { recursive: true });
|
||||
@@ -40,7 +42,11 @@ test("creates local snapshot and machine registry", () => {
|
||||
|
||||
assert.equal(result.status, 0, result.stderr);
|
||||
|
||||
const localSnapshotPath = path.join(projectPath, ".local", "project-ports.json");
|
||||
const localSnapshotPath = path.join(
|
||||
projectPath,
|
||||
".local",
|
||||
"project-ports.json",
|
||||
);
|
||||
assert.equal(fs.existsSync(localSnapshotPath), true);
|
||||
|
||||
const localSnapshot = readJson(localSnapshotPath);
|
||||
@@ -53,7 +59,9 @@ test("creates local snapshot and machine registry", () => {
|
||||
});
|
||||
|
||||
test("reports conflict and recommends changing newest project", () => {
|
||||
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "copilot-port-registry-"));
|
||||
const tempDir = fs.mkdtempSync(
|
||||
path.join(os.tmpdir(), "copilot-port-registry-"),
|
||||
);
|
||||
const stateDir = path.join(tempDir, "state");
|
||||
|
||||
const projectA = path.join(tempDir, "workspace-a");
|
||||
@@ -118,7 +126,9 @@ test("reports conflict and recommends changing newest project", () => {
|
||||
});
|
||||
|
||||
test("keeps firstSeenAt stable across re-sync", () => {
|
||||
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "copilot-port-registry-"));
|
||||
const tempDir = fs.mkdtempSync(
|
||||
path.join(os.tmpdir(), "copilot-port-registry-"),
|
||||
);
|
||||
const stateDir = path.join(tempDir, "state");
|
||||
const projectPath = path.join(tempDir, "workspace-a");
|
||||
fs.mkdirSync(path.join(projectPath, ".local"), { recursive: true });
|
||||
|
||||
Reference in New Issue
Block a user