source: trip-planner-front/node_modules/@angular-devkit/build-angular/src/webpack/plugins/single-test-transform.d.ts

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
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 */
8import { logging } from '@angular-devkit/core';
9export interface SingleTestTransformLoaderOptions {
10 files?: string[];
11 logger?: logging.Logger;
12}
13export declare const SingleTestTransformLoader: string;
14/**
15 * This loader transforms the default test file to only run tests
16 * for some specs instead of all specs.
17 * It works by replacing the known content of the auto-generated test file:
18 * const context = require.context('./', true, /\.spec\.ts$/);
19 * context.keys().map(context);
20 * with:
21 * const context = { keys: () => ({ map: (_a) => { } }) };
22 * context.keys().map(context);
23 * So that it does nothing.
24 * Then it adds import statements for each file in the files options
25 * array to import them directly, and thus run the tests there.
26 */
27export default function loader(this: import('webpack').LoaderContext<SingleTestTransformLoaderOptions>, source: string): string;
Note: See TracBrowser for help on using the repository browser.