refactor(docs-infra): use mockable logger (#25671)

Related discussion:
https://github.com/angular/angular/pull/23576#discussion_r187925949.

PR Close #25671
This commit is contained in:
George Kalpakas
2018-08-27 18:07:25 +03:00
committed by Kara Erickson
parent 182c08bee1
commit fc0a7959a4
13 changed files with 142 additions and 49 deletions

View File

@ -2,7 +2,7 @@
import * as nock from 'nock';
import * as tar from 'tar-stream';
import {gzipSync} from 'zlib';
import {createLogger, getEnvVar} from '../common/utils';
import {getEnvVar, Logger} from '../common/utils';
import {BuildNums, PrNums, SHA} from './constants';
// We are using the `nock` library to fake responses from REST requests, when testing.
@ -14,7 +14,7 @@ import {BuildNums, PrNums, SHA} from './constants';
// below and return a suitable response. This is quite complicated to setup since the
// response from, say, CircleCI will affect what request is made to, say, Github.
const logger = createLogger('NOCK');
const logger = new Logger('mock-external-apis');
const log = (...args: any[]) => {
// Filter out non-matching URL checks