"Fossies" - the Fresh Open Source Software Archive

Member "angular-13.3.10/packages/language-service/test/adapters_spec.ts" (25 May 2022, 663 Bytes) of package /linux/www/angular-13.3.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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 });