Skip to content

Commit

Permalink
test(dest): added test case for #26
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchentw committed Jun 26, 2014
1 parent 8bf8612 commit 595e96e
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/dest.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,23 @@ describe('dest stream', function() {

stream1.write(file);
stream1.end();
})
});

it('should emit end event', function(done) {
var srcPath = path.join(__dirname, './fixtures/test.coffee');
var stream = vfs.dest('./out-fixtures/', {cwd: __dirname});

stream.on('end', function() {
done();
});

var file = new File({
path: srcPath,
cwd: __dirname,
contents: new Buffer("1234567890")
});

stream.write(file);
stream.end();
});
});

0 comments on commit 595e96e

Please sign in to comment.