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

Issue 456 #504

Closed
wants to merge 7 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/spec/fs.write.spec.js
Expand Up @@ -5,6 +5,18 @@ var expect = require('chai').expect;
describe('fs.write', function() {
beforeEach(util.setup);
afterEach(util.cleanup);

// if the file is undefined, it will create problems
//
it('should be a error',function(done){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move your comment above into the test message like this:

it('should error if the file name is undefined', function(done) {

var fs=util.fs();
fs.writeFile(undefined, 'data', function(error) {
expect(error).to.exist;
expect(error.code).to.equal('EINVAL');
done();
});
});


it('should be a function', function() {
var fs = util.fs();
Expand Down