chore: it's safe by default now, so we can remove the nesting

This commit is contained in:
blam
2021-01-04 11:39:22 +01:00
parent 7b3c6d9549
commit 5b38fd70d6
2 changed files with 4 additions and 4 deletions
@@ -303,7 +303,7 @@ describe('helpers', () => {
const updatedMkdocsYml = await fs.readFile('/mkdocs.yml');
expect(updatedMkdocsYml.toString()).toContain(
"repo_url: 'https://github.com/backstage/backstage'",
'repo_url: https://github.com/backstage/backstage',
);
});
@@ -322,10 +322,10 @@ describe('helpers', () => {
const updatedMkdocsYml = await fs.readFile('/mkdocs_with_repo_url.yml');
expect(updatedMkdocsYml.toString()).toContain(
"repo_url: 'https://github.com/backstage/backstage'",
'repo_url: https://github.com/backstage/backstage',
);
expect(updatedMkdocsYml.toString()).not.toContain(
"repo_url: 'https://github.com/neworg/newrepo'",
'repo_url: https://github.com/neworg/newrepo',
);
});
});
@@ -267,7 +267,7 @@ export const patchMkdocsYmlPreBuild = async (
}
try {
await fs.writeFile(mkdocsYmlPath, yaml.safeDump(mkdocsYml), 'utf8');
await fs.writeFile(mkdocsYmlPath, yaml.dump(mkdocsYml), 'utf8');
} catch (error) {
logger.warn(
`Could not write to ${mkdocsYmlPath} after updating it before running the generator. ${error.message}`,