diff --git a/tests/path.test.ts b/tests/path.test.ts index f31ab4ed..a1cb9d85 100644 --- a/tests/path.test.ts +++ b/tests/path.test.ts @@ -4,31 +4,31 @@ import { basename, dirname, extname, join, normalize, resolve } from '../src/emu suite('Path emulation', () => { test('resolve', () => { - assert(resolve('somepath') === '/somepath'); - assert(resolve('/another', 'path') === '/another/path'); + assert.equal(resolve('somepath'), '/somepath'); + assert.equal(resolve('/another', 'path'), '/another/path'); }); test('join', () => { - assert(join('/path', 'to', 'file.txt') === '/path/to/file.txt'); - assert(join('/path/', 'to', '/file.txt') === '/path/to/file.txt'); + assert.equal(join('/path', 'to', 'file.txt'), '/path/to/file.txt'); + assert.equal(join('/path/', 'to', '/file.txt'), '/path/to/file.txt'); }); test('normalize', () => { - assert(normalize('/path/to/../file.txt') === '/path/file.txt'); - assert(normalize('/path/to/./file.txt') === '/path/to/file.txt'); + assert.equal(normalize('/path/to/../file.txt'), '/path/file.txt'); + assert.equal(normalize('/path/to/./file.txt'), '/path/to/file.txt'); }); test('basename', () => { - assert(basename('/path/to/file.txt') === 'file.txt'); - assert(basename('/path/to/file.txt', '.txt') === 'file'); + assert.equal(basename('/path/to/file.txt'), 'file.txt'); + assert.equal(basename('/path/to/file.txt', '.txt'), 'file'); }); test('dirname', () => { - assert(dirname('/path/to/file.txt') === '/path/to'); + assert.equal(dirname('/path/to/file.txt'), '/path/to'); }); test('extname', () => { - assert(extname('/path/to/file.txt') === '.txt'); - assert(extname('/path/to/file') === ''); + assert.equal(extname('/path/to/file.txt'), '.txt'); + assert.equal(extname('/path/to/file'), ''); }); });