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

Issue497 Add test for fs.chmod when the path is invalid #525

Merged
merged 2 commits into from Oct 9, 2018

Conversation

Projects
None yet
3 participants
@yuzhouChen
Copy link
Contributor

commented Sep 26, 2018

Added a function to test the fs.chomd, when people passed the invalid path as the argument, they will get the error code 'ENOENT'. All tests are passed.

@MuchtarSalimov
Copy link

left a comment

Good work. I suggested some minor changes but other than that it seems ready to go.

@@ -39,6 +39,16 @@ describe('fs.chmod, fs.fchmod', function() {
});
});

it('should be an error when the path is invalid', function(done){

This comment has been minimized.

Copy link
@MuchtarSalimov

MuchtarSalimov Sep 26, 2018

I think the wording here should be more about the method doing something rather than being something. Perhaps something like "it should throw an error" would be better?

Having taken a look at existing tests, there is a lot of variation on how people have chosen to title the tests. I've seen both "it should fail" and "it should return an error" in various places.

expect(err.code).to.equal('ENOENT');
done();
});

This comment has been minimized.

Copy link
@MuchtarSalimov

MuchtarSalimov Sep 26, 2018

Nitpick: Extra line of whitespace here doesn't match other tests.

@humphd humphd merged commit 8504cc7 into filerjs:master Oct 9, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
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.