fix: join command crash (#367)

* fix: resolve $ref and inline it into the resulting definition
* chore: tests updates
This commit is contained in:
Oleksii Horbachevskyi
2021-09-20 11:48:17 +03:00
committed by GitHub
parent 7f213f5ed3
commit b53e9e4acb
200 changed files with 1173 additions and 844 deletions

View File

@@ -135,7 +135,13 @@ export function readYaml(filename: string) {
}
export function writeYaml(data: any, filename: string, noRefs = false) {
return fs.writeFileSync(filename, yaml.safeDump(data, { noRefs }));
const content = yaml.safeDump(data, { noRefs });
if (process.env.NODE_ENV === 'test') {
process.stderr.write(content);
return;
}
fs.writeFileSync(filename, content);
}
export function pluralize(label: string, num: number) {