Skip to content

Commit 97e6fb6

Browse files
committed
fix(benchmarks): wait for end of benchmarks
1 parent 14a7b9f commit 97e6fb6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

modules/angular2/src/test_lib/perf_util.es6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function runBenchmark(config) {
3333
}
3434
var url = encodeURI(config.url + '?' + urlParams.join('&'));
3535
return browser.get(url).then(function() {
36-
benchpressRunner.sample({
36+
return benchpressRunner.sample({
3737
id: config.id,
3838
execute: config.work,
3939
prepare: config.prepare,

modules/benchmarks/e2e_test/largetable_perf.es6

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('ng2 largetable benchmark', function () {
1818
'interpolationAttr',
1919
'interpolationFn'
2020
].forEach(function(benchmarkType) {
21-
it('should log the ng stats with: ' + benchmarkType, function() {
21+
it('should log the ng stats with: ' + benchmarkType, function(done) {
2222
console.log('executing for type', benchmarkType);
2323
perfUtil.runClickBenchmark({
2424
url: URL,
@@ -36,12 +36,12 @@ describe('ng2 largetable benchmark', function () {
3636
name: 'benchmarkType',
3737
value: benchmarkType
3838
}]
39-
});
39+
}).then(done, done.fail);
4040
});
4141
});
4242

4343

44-
it('should log the baseline stats', function() {
44+
it('should log the baseline stats', function(done) {
4545
perfUtil.runClickBenchmark({
4646
url: URL,
4747
buttons: ['#baselineDestroyDom', '#baselineCreateDom'],
@@ -58,7 +58,7 @@ describe('ng2 largetable benchmark', function () {
5858
name: 'benchmarkType',
5959
value: 'baseline'
6060
}]
61-
});
61+
}).then(done, done.fail);;
6262
});
6363

6464
});

0 commit comments

Comments
 (0)