refactor(): use const and let instead of var
This commit is contained in:

committed by
Victor Berchet

parent
73593d4bf3
commit
77ee27c59e
@ -11,7 +11,7 @@ import {runBenchmark} from '@angular/testing/src/perf_util';
|
||||
|
||||
describe('ng2 compiler benchmark', function() {
|
||||
|
||||
var URL = 'benchmarks/src/compiler/compiler_benchmark.html';
|
||||
const URL = 'benchmarks/src/compiler/compiler_benchmark.html';
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
|
@ -11,10 +11,10 @@ import {runClickBenchmark} from '@angular/testing/src/perf_util';
|
||||
|
||||
describe('ng2 cost benchmark', function() {
|
||||
|
||||
var URL = 'benchmarks/src/costs/index.html';
|
||||
const URL = 'benchmarks/src/costs/index.html';
|
||||
|
||||
// Number of components to create in a single iteration
|
||||
var benchmarkSize = 200;
|
||||
const benchmarkSize = 200;
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
|
@ -11,7 +11,7 @@ import {runClickBenchmark} from '@angular/testing/src/perf_util';
|
||||
|
||||
describe('ng2 di benchmark', function() {
|
||||
|
||||
var URL = 'benchmarks/src/di/di_benchmark.html';
|
||||
const URL = 'benchmarks/src/di/di_benchmark.html';
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
|
@ -11,7 +11,7 @@ import {runClickBenchmark} from '@angular/testing/src/perf_util';
|
||||
|
||||
describe('ng2 largetable benchmark', function() {
|
||||
|
||||
var URL = 'benchmarks/src/largetable/largetable_benchmark.html';
|
||||
const URL = 'benchmarks/src/largetable/largetable_benchmark.html';
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
|
@ -11,7 +11,7 @@ import {runBenchmark} from '@angular/testing/src/perf_util';
|
||||
|
||||
describe('ng2 naive infinite scroll benchmark', function() {
|
||||
|
||||
var URL = 'benchmarks/src/naive_infinite_scroll/index.html';
|
||||
const URL = 'benchmarks/src/naive_infinite_scroll/index.html';
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
|
@ -11,29 +11,29 @@ import {runClickBenchmark} from '@angular/testing/src/perf_util';
|
||||
|
||||
describe('ng2 naive infinite scroll benchmark', function() {
|
||||
|
||||
var URL = 'benchmarks/src/naive_infinite_scroll/index.html?appSize=3';
|
||||
const URL = 'benchmarks/src/naive_infinite_scroll/index.html?appSize=3';
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
it('should not throw errors', function() {
|
||||
browser.get(URL);
|
||||
var expectedRowCount = 18;
|
||||
var expectedCellsPerRow = 27;
|
||||
var allScrollItems = 'scroll-app #testArea scroll-item';
|
||||
var cells = `${ allScrollItems } .row *`;
|
||||
var stageButtons = `${ allScrollItems } .row stage-buttons button`;
|
||||
const expectedRowCount = 18;
|
||||
const expectedCellsPerRow = 27;
|
||||
const allScrollItems = 'scroll-app #testArea scroll-item';
|
||||
const cells = `${ allScrollItems } .row *`;
|
||||
const stageButtons = `${ allScrollItems } .row stage-buttons button`;
|
||||
|
||||
var count = function(selector) {
|
||||
const count = function(selector) {
|
||||
return browser.executeScript(
|
||||
`return ` +
|
||||
`document.querySelectorAll("${ selector }").length;`);
|
||||
};
|
||||
|
||||
var clickFirstOf = function(selector) {
|
||||
const clickFirstOf = function(selector) {
|
||||
return browser.executeScript(`document.querySelector("${ selector }").click();`);
|
||||
};
|
||||
|
||||
var firstTextOf = function(selector) {
|
||||
const firstTextOf = function(selector) {
|
||||
return browser.executeScript(
|
||||
`return ` +
|
||||
`document.querySelector("${ selector }").innerText;`);
|
||||
|
@ -10,8 +10,8 @@ import {verifyNoBrowserErrors} from 'angular2/src/testing/perf_util';
|
||||
|
||||
describe('ng2 largetable benchmark', function() {
|
||||
|
||||
var URL = 'benchmarks/src/page_load/page_load.html';
|
||||
var runner = global['benchpressRunner'];
|
||||
const URL = 'benchmarks/src/page_load/page_load.html';
|
||||
const runner = global['benchpressRunner'];
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
|
@ -11,7 +11,7 @@ import {runClickBenchmark} from '@angular/testing/src/perf_util';
|
||||
|
||||
describe('ng2 selector benchmark', function() {
|
||||
|
||||
var URL = 'benchmarks/src/compiler/selector_benchmark.html';
|
||||
const URL = 'benchmarks/src/compiler/selector_benchmark.html';
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
|
@ -11,7 +11,7 @@ import {runClickBenchmark} from '@angular/testing/src/perf_util';
|
||||
|
||||
describe('ng2 static tree benchmark', function() {
|
||||
|
||||
var URL = 'benchmarks/src/static_tree/tree_benchmark.html';
|
||||
const URL = 'benchmarks/src/static_tree/tree_benchmark.html';
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
|
Reference in New Issue
Block a user