|
|
|
@ -63,12 +63,12 @@ describe('Test of the utilities functions', function() { |
|
|
|
|
//
|
|
|
|
|
it('checkAndMakeDir return true if path to the file already exists', ()=>{ |
|
|
|
|
let dir = path.join(uploadDir, 'testfile'); |
|
|
|
|
assert.equal(checkAndMakeDir({createParentPath: true}), dir, true); |
|
|
|
|
assert.equal(checkAndMakeDir({createParentPath: true}, dir), true); |
|
|
|
|
}); |
|
|
|
|
//
|
|
|
|
|
it('checkAndMakeDir creates a dir if path to the file not exists', ()=>{ |
|
|
|
|
let dir = path.join(uploadDir, 'testfolder', 'testfile'); |
|
|
|
|
assert.equal(checkAndMakeDir({createParentPath: true}), true); |
|
|
|
|
assert.equal(checkAndMakeDir({createParentPath: true}, dir), true); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
//saveBufferToFile tests
|
|
|
|
|