feat: restore gateway HMR and add WRN formatting
This commit is contained in:
@@ -61,3 +61,35 @@ test("0.2.18 migration adds helpers to existing apps and is idempotent", () => {
|
||||
rmSync(root, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
test("0.2.19 migration adds VS Code formatting defaults without overwriting settings", () => {
|
||||
const root = mkdtempSync(join(tmpdir(), "wrnexus-update-"));
|
||||
mkdirSync(join(root, "app", "pages"), { recursive: true });
|
||||
mkdirSync(join(root, ".vscode"), { recursive: true });
|
||||
writeFileSync(
|
||||
join(root, "package.json"),
|
||||
JSON.stringify({ name: "editor-app", wrnexus: { version: "0.2.18" } }),
|
||||
);
|
||||
writeFileSync(join(root, ".gitignore"), ".vscode/\n");
|
||||
writeFileSync(join(root, ".prettierignore"), "node_modules/\n");
|
||||
writeFileSync(join(root, ".vscode", "settings.json"), '{"editor.tabSize":4}\n');
|
||||
|
||||
try {
|
||||
updateApp(root, "0.2.19", false);
|
||||
updateApp(root, "0.2.19", false);
|
||||
|
||||
expect(readFileSync(join(root, ".vscode", "settings.json"), "utf8")).toBe(
|
||||
'{"editor.tabSize":4}\n',
|
||||
);
|
||||
expect(readFileSync(join(root, ".vscode", "extensions.json"), "utf8")).toContain(
|
||||
"wrnexus.wrnexus",
|
||||
);
|
||||
expect(readFileSync(join(root, ".prettierignore"), "utf8")).toBe("node_modules/\nCLAUDE.md\n");
|
||||
const gitignore = readFileSync(join(root, ".gitignore"), "utf8");
|
||||
expect(gitignore).not.toContain(".vscode/\n");
|
||||
expect(gitignore).toContain("!.vscode/settings.json");
|
||||
expect(gitignore).toContain("!.vscode/extensions.json");
|
||||
} finally {
|
||||
rmSync(root, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user