Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add test for fsPromises.open() when the path does not exist #419

Closed
struong9 opened this issue Sep 20, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@struong9
Copy link
Contributor

commented Sep 20, 2018

The following could be used with fsPromises.open() to test when the path given does not exist.

it('should return an error if the parent path does not exist', function(done) {
    var fs = util.fs();

    fs.open('/tmp/myfile', 'w+', function(error, result) {
      expect(error).to.exist;
      expect(error.code).to.equal('ENOENT');
      expect(result).not.to.exist;
      done();
    });
  });

I'd like to work on this issue and add the change to the file if it's okay.

@humphd

This comment has been minimized.

Copy link
Contributor

commented Sep 21, 2018

Sounds good @struong9, go for it.

struong9 added a commit to struong9/filer that referenced this issue Sep 23, 2018

struong9 added a commit to struong9/filer that referenced this issue Sep 26, 2018

Fix filerjs#419: Add test for fsPromises.open() when the path does no…
…t exist

Removed some unnecessary code based on reviews

@humphd humphd closed this in 934ef8b Oct 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.