Test cleanup and fixes [a-b]

This commit is contained in:
Angelos Chalaris
2018-06-18 15:54:48 +03:00
parent a78f5db260
commit 026c65a5e6
151 changed files with 753 additions and 373 deletions

View File

@ -8,7 +8,11 @@ const untildify = require('./untildify.js');
test('Contains no tildes', () => {
expect(untildify('~/test/dir/file.f').indexOf('~') === -1).toBeTruthy();
});
t.equal(untildify('~/test/dir/file.f').slice(-16), '/test/dir/file.f', 'Does not alter the rest of the path');
t.equal(untildify('test/dir/file.f'), 'test/dir/file.f', 'Does not alter paths without tildes');
test('Does not alter the rest of the path', () => {
expect(untildify('~/test/dir/file.f').slice(-16), '/test/dir/file.f').toBe()
});
test('Does not alter paths without tildes', () => {
expect(untildify('test/dir/file.f'), 'test/dir/file.f').toBe()
});