fix(build): report and fail on errors

tree benchmark was broken and we didn’t know it…

also changes reporting to not include messages from `console.time()`, …
This commit is contained in:
Tobias Bosch 2015-03-02 15:48:18 -08:00
parent 733915d99b
commit 81a5ae8f6e
3 changed files with 12 additions and 6 deletions

View File

@ -43,7 +43,7 @@ var _HTLM_DEFAULT_SCRIPTS_JS = [
{src: '../../extension-register.js', mimeType: 'text/javascript'},
{src: '../../runtime_paths.js', mimeType: 'text/javascript'},
{
inline: 'System.import(\'$MODULENAME$\').then(function(m) { m.main(); }, console.log.bind(console))',
inline: 'System.import(\'$MODULENAME$\').then(function(m) { m.main(); }, console.error.bind(console))',
mimeType: 'text/javascript'
}
];

View File

@ -17,7 +17,9 @@ function verifyNoBrowserErrors() {
browser.executeScript('1+1');
browser.manage().logs().get('browser').then(function(browserLog) {
var filteredLog = browserLog.filter(function(logEntry) {
console.log('>> ' + require('util').inspect(logEntry));
if (logEntry.level.value >= webdriver.logging.Level.INFO.value) {
console.log('>> ' + logEntry.message);
}
return logEntry.level.value > webdriver.logging.Level.WARNING.value;
});
expect(filteredLog.length).toEqual(0);

View File

@ -189,12 +189,20 @@ function setupReflector() {
});
}
var BASELINE_TREE_TEMPLATE;
var BASELINE_IF_TEMPLATE;
export function main() {
BrowserDomAdapter.makeCurrent();
var maxDepth = getIntParameter('depth');
setupReflector();
BASELINE_TREE_TEMPLATE = DOM.createTemplate(
'<span>_<template class="ng-binding"></template><template class="ng-binding"></template></span>');
BASELINE_IF_TEMPLATE = DOM.createTemplate(
'<span template="if"><tree></tree></span>');
var app;
var lifeCycle;
var baselineRootTreeComponent;
@ -306,10 +314,6 @@ function buildTree(maxDepth, values, curDepth) {
buildTree(maxDepth, values, curDepth+1));
}
var BASELINE_TREE_TEMPLATE = DOM.createTemplate(
'<span>_<template class="ng-binding"></template><template class="ng-binding"></template></span>');
var BASELINE_IF_TEMPLATE = DOM.createTemplate(
'<span template="if"><tree></tree></span>');
// http://jsperf.com/nextsibling-vs-childnodes
class BaseLineTreeComponent {