refactor(): use const and let instead of var

This commit is contained in:
Joao Dias
2016-11-12 14:08:58 +01:00
committed by Victor Berchet
parent 73593d4bf3
commit 77ee27c59e
435 changed files with 4637 additions and 4663 deletions

View File

@ -12,7 +12,7 @@ import {BrowserDetection} from '../testing/browser_util';
export function main() {
describe('BrowserDetection', () => {
var browsers = [
const browsers = [
{
name: 'Chrome',
ua: 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36',
@ -225,7 +225,7 @@ export function main() {
browsers.forEach((browser: {[key: string]: any}) => {
it(`should detect ${browser[ 'name']}`, () => {
var bd = new BrowserDetection(<string>browser['ua']);
const bd = new BrowserDetection(<string>browser['ua']);
expect(bd.isFirefox).toBe(browser['isFirefox']);
expect(bd.isAndroid).toBe(browser['isAndroid']);
expect(bd.isEdge).toBe(browser['isEdge']);