1 /** 2 * @license 3 * Copyright Google LLC All Rights Reserved. 4 * 5 * Use of this source code is governed by an MIT-style license that can be 6 * found in the LICENSE file at https://angular.io/license 7 */ 8 9 import * as ts from 'typescript/lib/tsserverlibrary'; 10 11 import {LSParseConfigHost} from '../src/adapters'; 12 13 describe('LSParseConfigHost.resolve()', () => { 14 it('should collapse absolute paths', () => { 15 const p1 = '/foo/bar/baz'; 16 const p2 = '/foo/bar/baz/tsconfig.json'; 17 const host = new LSParseConfigHost(ts.sys as ts.server.ServerHost); 18 const resolved = host.resolve(p1, p2); 19 expect(resolved).toBe('/foo/bar/baz/tsconfig.json'); 20 }); 21 });