Skip to content

Commit

Permalink
Update: Add test for cloning of the history property
Browse files Browse the repository at this point in the history
  • Loading branch information
popomore authored and phated committed Sep 27, 2016
1 parent 2988c51 commit 6c558f8
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/File.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,34 @@ describe('File', function() {

done();
});

it('should copy history', function(done) {
var options = {
cwd: '/',
base: '/test/',
path: '/test/test.coffee',
contents: null
};

var file = new File(options);
file.path = '/test/test.js';
file.path = '/test/test-938di2s.js';
var file2 = file.clone();

file2.history.should.eql([
'/test/test.coffee',
'/test/test.js',
'/test/test-938di2s.js'
]);
file2.history.should.not.equal([
'/test/test.coffee',
'/test/test.js',
'/test/test-938di2s.js'
]);
file2.path.should.eql('/test/test-938di2s.js');

done();
});
});

describe('pipe()', function() {
Expand Down

0 comments on commit 6c558f8

Please sign in to comment.