From a39f4e230162c160e4099c35b7c7d3f3f0739630 Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 17 May 2019 08:57:19 +0200 Subject: [PATCH] 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 --- packages/compiler-cli/src/ngtsc/path/test/types_spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-cli/src/ngtsc/path/test/types_spec.ts b/packages/compiler-cli/src/ngtsc/path/test/types_spec.ts index 41f7582987..18910ceaca 100644 --- a/packages/compiler-cli/src/ngtsc/path/test/types_spec.ts +++ b/packages/compiler-cli/src/ngtsc/path/test/types_spec.ts @@ -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',