From 650d7b73d46526e163332d7d7af89df13c3a35a4 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Tue, 21 Mar 2017 15:23:47 -0700 Subject: [PATCH] Update: Add test from floridoo/gulp-sourcemaps#157 --- test/write.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/write.js b/test/write.js index 2606fd0..2784da0 100644 --- a/test/write.js +++ b/test/write.js @@ -461,4 +461,12 @@ describe('write', function() { done(err); }); }); + + it('should create shortest path to file in sourceMap#file', function(done) { + var file = makeNestedFile(); + sourcemaps.write(file, { path: 'dir1/maps' }, function(err, updatedFile) { + expect(updatedFile.sourceMap.file).toEqual('../../../dir2/helloworld.js'); + done(err); + }); + }); });