angular/packages/language-service/test/adapters_spec.ts
Andrew Scott 670cd10e30 refactor(language-service): Move language service code out of ivy/ folder (#44064)
This commit moves code in the language service package out of the ivy
subfolder. Ivy is the _only_ engine supported in v13+ so there's no need
to have a name for it.

PR Close #44064
2021-11-10 01:20:04 +00:00

21 lines
663 B
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as ts from 'typescript/lib/tsserverlibrary';
import {LSParseConfigHost} from '../src/adapters';
describe('LSParseConfigHost.resolve()', () => {
it('should collapse absolute paths', () => {
const p1 = '/foo/bar/baz';
const p2 = '/foo/bar/baz/tsconfig.json';
const host = new LSParseConfigHost(ts.sys as ts.server.ServerHost);
const resolved = host.resolve(p1, p2);
expect(resolved).toBe('/foo/bar/baz/tsconfig.json');
});
});