Skip to content

Commit

Permalink
fix: indent with spaces (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Aug 31, 2022
1 parent 5cc73dc commit 67e5f75
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export async function script(octokit, repository, options) {

renovateConfigObj.extends = newExtends;

return JSON.stringify(jsonFile, null, "\t");
return JSON.stringify(jsonFile, null, " ") + "\n";
},
message: "build: renovate setup",
});
Expand Down
26 changes: 13 additions & 13 deletions script.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,19 @@ test("preserves spacing for JSON files", async () => {
equal(
Buffer.from(body.content, "base64").toString(),
"{\n" +
'\t"name": "octoherd-cli",\n' +
'\t"version": "0.0.0",\n' +
'\t"description": "",\n' +
'\t"main": "index.js",\n' +
'\t"scripts": {\n' +
'\t\t"test": "echo \\"Error: no test specified\\" && exit 1"\n' +
"\t},\n" +
'\t"author": "",\n' +
'\t"license": "ISC",\n' +
'\t"extends": [\n' +
'\t\t"github>octoherd/.github"\n' +
"\t]\n" +
"}"
' "name": "octoherd-cli",\n' +
' "version": "0.0.0",\n' +
' "description": "",\n' +
' "main": "index.js",\n' +
' "scripts": {\n' +
' "test": "echo \\"Error: no test specified\\" && exit 1"\n' +
" },\n" +
' "author": "",\n' +
' "license": "ISC",\n' +
' "extends": [\n' +
' "github>octoherd/.github"\n' +
" ]\n" +
"}\n"
);

return true;
Expand Down

0 comments on commit 67e5f75

Please sign in to comment.