Keep console.log
that are not called during compilation.
This commit is contained in:

committed by
Alex Rickabaugh

parent
ff56da554f
commit
e39e16ae6a
@ -6,6 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-console */
|
||||
import {browser} from 'protractor';
|
||||
|
||||
const assertEventsContainsName = function(events: any[], eventName: string) {
|
||||
@ -27,7 +28,9 @@ describe('firefox extension', function() {
|
||||
|
||||
browser.driver.get(TEST_URL);
|
||||
|
||||
browser.executeScript('window.startProfiler()');
|
||||
browser.executeScript('window.startProfiler()').then(function() {
|
||||
console.log('started measuring perf');
|
||||
});
|
||||
|
||||
browser.executeAsyncScript('setTimeout(arguments[0], 1000);');
|
||||
browser.executeScript('window.forceGC()');
|
||||
|
@ -5,6 +5,7 @@
|
||||
* 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
|
||||
*/
|
||||
/* tslint:disable:no-console */
|
||||
import * as webdriver from 'selenium-webdriver';
|
||||
declare var browser: any;
|
||||
declare var expect: any;
|
||||
@ -15,6 +16,7 @@ export function verifyNoBrowserErrors() {
|
||||
const errors: any[] = [];
|
||||
browserLog.filter(logEntry => {
|
||||
const msg = logEntry.message;
|
||||
console.log('>> ' + msg);
|
||||
if (logEntry.level.value >= webdriver.logging.Level.INFO.value) {
|
||||
errors.push(msg);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-console */
|
||||
urlParamsToForm();
|
||||
|
||||
export function getIntParameter(name: string) {
|
||||
@ -51,6 +52,7 @@ export function profile(create: () => void, destroy: () => void, name: string) {
|
||||
destroy();
|
||||
}
|
||||
window.console.profileEnd();
|
||||
window.console.log(`Iterations: ${count}; time: ${duration / count} ms / iteration`);
|
||||
|
||||
window.console.profile(name + ' w/o GC');
|
||||
duration = 0;
|
||||
@ -62,6 +64,7 @@ export function profile(create: () => void, destroy: () => void, name: string) {
|
||||
destroy();
|
||||
}
|
||||
window.console.profileEnd();
|
||||
window.console.log(`Iterations: ${count}; time: ${duration / count} ms / iteration`);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
/* tslint:disable:no-console */
|
||||
import {browser} from 'protractor';
|
||||
|
||||
const yargs = require('yargs');
|
||||
@ -59,7 +60,7 @@ export function verifyNoBrowserErrors() {
|
||||
browser.manage().logs().get('browser').then(function(browserLog: any) {
|
||||
const filteredLog = browserLog.filter(function(logEntry: any) {
|
||||
if (logEntry.level.value >= webdriver.logging.Level.INFO.value) {
|
||||
console.error('>> ' + logEntry.message);
|
||||
console.log('>> ' + logEntry.message);
|
||||
}
|
||||
return logEntry.level.value > webdriver.logging.Level.WARNING.value;
|
||||
});
|
||||
|
Reference in New Issue
Block a user