test: fix paths tests to work cross platform (#30472)

In Windows when `/test.txt` is resolved it will be resolved to `[DRIVE]:/test.txt`

PR Close #30472
This commit is contained in:
Alan 2019-05-17 08:57:19 +02:00 committed by Jason Aden
parent 8e2e9dcee6
commit a39f4e2301
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ import {AbsoluteFsPath} from '../src/types';
describe('path types', () => {
describe('AbsoluteFsPath', () => {
it('should not throw when creating one from an absolute path',
() => { expect(AbsoluteFsPath.from('/test.txt')).toEqual('/test.txt'); });
() => { expect(() => AbsoluteFsPath.from('/test.txt')).not.toThrow(); });
it('should not throw when creating one from a windows absolute path',
() => { expect(AbsoluteFsPath.from('C:\\test.txt')).toEqual('C:/test.txt'); });
it('should not throw when creating one from a windows absolute path with POSIX separators',