/
githubmirror
/
angular-cli
Обзор
Документация
Войти
/
githubmirror
/
angular-cli
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/angular/build/src/builders/karma/find-tests.ts
32 строки
1 KB
Charles Lyding
fix(@angular/build): correctly handle absolute paths and casing in test discovery
07 ноя 2025, 14:25
07 ноя 2025, 14:25
683d0e0
Код
Авторство
О чём код?
/** * @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.dev/license */ import { findTests as findTestsBase } from '../unit-test/test-discovery'; // This file is a compatibility layer that re-exports the test discovery logic from its new location. // This is necessary to avoid breaking the Karma builder, which still depends on this file. export { getTestEntrypoints } from '../unit-test/test-discovery'; const removeLeadingSlash = (path: string): string => { return path.startsWith('/') ? path.substring(1) : path; }; export async function findTests( include: string[], exclude: string[], workspaceRoot: string, projectSourceRoot: string, ): Promise<string[]> { // Karma has legacy support for workspace "root-relative" file paths return findTestsBase( include.map(removeLeadingSlash), exclude.map(removeLeadingSlash), workspaceRoot, projectSourceRoot, ); }