1 | /**
|
2 | * @license
|
3 | * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
4 | * This code may only be used under the BSD style license found at
|
5 | * http://polymer.github.io/LICENSE.txt
|
6 | * The complete set of authors may be found at
|
7 | * http://polymer.github.io/AUTHORS.txt
|
8 | * The complete set of contributors may be found at
|
9 | * http://polymer.github.io/CONTRIBUTORS.txt
|
10 | * Code distributed by Google as part of the polymer project is also
|
11 | * subject to an additional IP rights grant found at
|
12 | * http://polymer.github.io/PATENTS.txt
|
13 | */
|
14 | /// <reference types="node" />
|
15 | import File = require('vinyl');
|
16 | export declare function getFlowingState(stream: NodeJS.ReadableStream): boolean;
|
17 | /**
|
18 | * This method makes it possible to `await` a map of paths to `File` objects
|
19 | * emitted by a stream. It returns a Promise that resolves with the map
|
20 | * where the paths in the map exclude the optional `root` prefix.
|
21 | */
|
22 | export declare function emittedFiles(stream: NodeJS.ReadableStream, root?: string): Promise<Map<string, File>>;
|
23 | /**
|
24 | * Assert that two strings are equal after collapsing their whitespace.
|
25 | */
|
26 | export declare const assertEqualIgnoringWhitespace: (actual: string, expected: string) => void;
|
27 | /**
|
28 | * Assert that two string maps are equal, where their values have had their
|
29 | * whitespace collapsed.
|
30 | */
|
31 | export declare const assertMapEqualIgnoringWhitespace: (actual: Map<string, string>, expected: Map<string, string>) => void;
|
32 | /**
|
33 | * Calls the given async function and captures all console.log and friends
|
34 | * output while until the returned Promise settles.
|
35 | *
|
36 | * Does not capture plylog, which doesn't seem to be very easy to intercept.
|
37 | *
|
38 | * TODO(rictic): this function is shared across many of our packages,
|
39 | * put it in a shared package instead.
|
40 | */
|
41 | export declare function interceptOutput(captured: () => Promise<void>): Promise<string>;
|