diff --git a/src/lib/ObjectWriter.ts b/src/lib/ObjectWriter.ts index 9b2689c0..a74b8701 100644 --- a/src/lib/ObjectWriter.ts +++ b/src/lib/ObjectWriter.ts @@ -38,9 +38,9 @@ export class ObjectWriter extends AbstractReadWriter { //tslint:disable:no-unbound-method no-magic-numbers switch (this.format) { case ObjectWriterFormat.YAML: - return YAML.stringify.bind(YAML); + return (v$: T) => YAML.stringify(v$, Number.MAX_VALUE, 2); default: - return (v: T) => JSON.stringify(v, null, 2); + return (v$: T) => JSON.stringify(v$, null, 2); } //tslint:enable:no-unbound-method no-magic-numbers } diff --git a/test/commands/copy-files.ts b/test/commands/copy-files.ts index 149cdf63..27daa9d5 100644 --- a/test/commands/copy-files.ts +++ b/test/commands/copy-files.ts @@ -115,7 +115,8 @@ describe('copy-files', () => { break; case '.yml': case '.yaml': - contents = YAML.stringify(cfg); + //tslint:disable-next-line:no-magic-numbers + contents = YAML.stringify(cfg, Number.MAX_VALUE, 2); break; default: throw new Error('Test error: invalid format');