You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@PriyankaCodes99 OK, it's all yours. Here's how I would recommend you approach this.
First, you need a way to trigger this particular failure. Essentially, we want to have our test hit the code to deal with an invalid flag being passed. You can see the docs for appendFile, and they state that a flag is only valid if it's one of the strings in this list.
So we should be able to cause it if we do something like this (NOTE: I did this in node.js):
Now we need to turn that snippet of code into a test case that we can run. The file where you want to do this is tests/spec/fs.appendFile.spec.js. So you want to add another it() test to this file that tries to pass an invalid flag to appendFile and make sure we get back an error.
Let me know if you have questions about this, and I can say more.
We have a code path not being hit by our tests in
fs.appendFile
: https://codecov.io/gh/filerjs/filer/src/master/src/filesystem/implementation.js#L1895. To hit it, we need to:fs.appendFile
that pass invalid flags tooptions.flags
(i.e., doesn't includea
).The text was updated successfully, but these errors were encountered: