Skip to content

Commit

Permalink
add test for the boolean (true) source-map option
Browse files Browse the repository at this point in the history
  • Loading branch information
chocolateboy authored and phated committed Nov 27, 2017
1 parent 8739899 commit ddcbe8e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/dest.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,31 @@ describe('dest stream', function() {
}
});

it('should not explode if the sourcemap option is true', function(done) {
var inputPath = path.join(__dirname, './fixtures/test.coffee');

var expectedFile = new File({
base: __dirname,
cwd: __dirname,
path: inputPath,
contents: null
});

var onEnd = function(){
buffered.length.should.equal(1);
buffered[0].should.equal(expectedFile);
done();
};

var stream = vfs.dest(path.join(__dirname, './out-fixtures/'), { sourcemaps: true });

var buffered = [];
var bufferStream = through.obj(dataWrap(buffered.push.bind(buffered)), onEnd);
stream.pipe(bufferStream);
stream.write(expectedFile);
stream.end();
});

it('should pass through writes with cwd', function(done) {
var inputPath = path.join(__dirname, './fixtures/test.coffee');

Expand Down

0 comments on commit ddcbe8e

Please sign in to comment.