Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use CaptureFile to append to file instead of truncate? #130

Open
vageeshb opened this issue Jan 5, 2017 · 0 comments
Open

Use CaptureFile to append to file instead of truncate? #130

vageeshb opened this issue Jan 5, 2017 · 0 comments

Comments

@vageeshb
Copy link

vageeshb commented Jan 5, 2017

Currently, the task opens the file in write mode, which clears the content of an existing file.

 fd = fs.openSync(captureFile, 'w');

My use-case involves using this plugin to continuously test the code and use the JSON reporter for monitoring logs for mocha output. I propose to:

  • Either, provide an option for write vs append, like:
options: {
  captureFile: 'result.txt',
  captureFileMode: 'a'
}
  • Or, always open the file in append mode (might not be useful for other reporters), like:
 fd = fs.openSync(captureFile, 'a');

Feedback will be appreciated

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant