Compare commits
1 commit
19e7bf6c7f
...
adb8a00c1f
Author | SHA1 | Date | |
---|---|---|---|
adb8a00c1f |
2 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@ export default class CliHelper {
|
|||
const output = OutputHelper.GenerateOutput(response, options);
|
||||
|
||||
if (options.o) {
|
||||
writeFileSync(options.o, output);
|
||||
writeFileSync(options.o, `${output}\n`);
|
||||
} else {
|
||||
console.log(output);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ describe("Endpoint", () => {
|
|||
expect(OutputHelper.GenerateOutput).toHaveBeenCalledWith(response, options);
|
||||
|
||||
expect(fs.writeFileSync).toHaveBeenCalledTimes(1);
|
||||
expect(fs.writeFileSync).toHaveBeenCalledWith("file.txt", "test output");
|
||||
expect(fs.writeFileSync).toHaveBeenCalledWith("file.txt", "test output\n");
|
||||
|
||||
expect(console.log).not.toHaveBeenCalled();
|
||||
|
||||
|
|
Loading…
Reference in a new issue