Tests for untildify

This commit is contained in:
Angelos Chalaris
2018-02-09 13:23:46 +02:00
parent 2150ef1337
commit 11fd6822c7
2 changed files with 11 additions and 4 deletions

View File

@ -5,9 +5,12 @@ test('Testing untildify', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof untildify === 'function', 'untildify is a Function');
t.true(untildify('~/test/dir/file.f').indexOf('~') === -1, 'Contains no tildes');
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');
//t.deepEqual(untildify(args..), 'Expected');
//t.equal(untildify(args..), 'Expected');
//t.false(untildify(args..), 'Expected');
//t.throws(untildify(args..), 'Expected');
t.end();
});
});