From 00407bdee5b27e69c568c036f2fad871ffe84ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Boisseau-Sierra?= Date: Tue, 7 Aug 2018 11:23:28 +0100 Subject: [PATCH] Transform 'let' in 'const' where needs be --- caesar/caesar.js | 2 +- caesar/caesar.spec.js | 2 +- calculator/calculator.spec.js | 2 +- fibonacci/fibonacci.js | 2 +- fibonacci/fibonacci.spec.js | 2 +- helloWorld/README.md | 6 +++--- helloWorld/helloWorld.js | 2 +- helloWorld/helloWorld.spec.js | 4 ++-- leapYears/leapYears.js | 2 +- leapYears/leapYears.spec.js | 2 +- palindromes/palindromes.js | 2 +- palindromes/palindromes.spec.js | 2 +- pig_latin/pigLatin.spec.js | 4 ++-- removeFromArray/removeFromArray.js | 2 +- removeFromArray/removeFromArray.spec.js | 2 +- repeatString/repeatString.js | 2 +- repeatString/repeatString.spec.js | 2 +- reverseString/reverseString.js | 4 ++-- reverseString/reverseString.spec.js | 4 ++-- snakeCase/snakeCase.js | 2 +- snakeCase/snakeCase.spec.js | 2 +- sumAll/sumAll.js | 2 +- sumAll/sumAll.spec.js | 2 +- tempConversion/tempConversion.js | 8 ++++---- tempConversion/tempConversion.spec.js | 2 +- 25 files changed, 34 insertions(+), 34 deletions(-) diff --git a/caesar/caesar.js b/caesar/caesar.js index 6096f24..f4d6a25 100644 --- a/caesar/caesar.js +++ b/caesar/caesar.js @@ -1,4 +1,4 @@ -let caesar = function() { +const caesar = function() { } diff --git a/caesar/caesar.spec.js b/caesar/caesar.spec.js index 3c98420..49fe254 100644 --- a/caesar/caesar.spec.js +++ b/caesar/caesar.spec.js @@ -1,4 +1,4 @@ -let caesar = require('./caesar') +const caesar = require('./caesar') describe('caesar', function() { it('works with single letters', function() { diff --git a/calculator/calculator.spec.js b/calculator/calculator.spec.js index 859266d..150a0aa 100644 --- a/calculator/calculator.spec.js +++ b/calculator/calculator.spec.js @@ -1,4 +1,4 @@ -let calculator = require ('./calculator.js'); +const calculator = require ('./calculator.js'); describe('add', function() { it('adds 0 and 0', function() { diff --git a/fibonacci/fibonacci.js b/fibonacci/fibonacci.js index f93a757..fd597f9 100644 --- a/fibonacci/fibonacci.js +++ b/fibonacci/fibonacci.js @@ -1,4 +1,4 @@ -let fibonacci = function() { +const fibonacci = function() { } diff --git a/fibonacci/fibonacci.spec.js b/fibonacci/fibonacci.spec.js index 26a6a5d..d7adebe 100644 --- a/fibonacci/fibonacci.spec.js +++ b/fibonacci/fibonacci.spec.js @@ -1,4 +1,4 @@ -let fibonacci = require('./fibonacci') +const fibonacci = require('./fibonacci') describe('fibonacci', function() { it('works', function() { diff --git a/helloWorld/README.md b/helloWorld/README.md index 6832799..cb5114c 100644 --- a/helloWorld/README.md +++ b/helloWorld/README.md @@ -10,7 +10,7 @@ This setup should be the same for all of the exercises. The plain javascript fi Let's look at the spec file first: ```javascript -let helloWorld = require('./helloWorld'); +const helloWorld = require('./helloWorld'); describe('Hello World', function() { it('says hello world', function() { @@ -26,7 +26,7 @@ For now you do not need to worry about how to write tests, but you should try to so let's look at the javascript file: ```javascript -let helloWorld = function() { +const helloWorld = function() { return '' } @@ -40,7 +40,7 @@ Just to make sure, in case you're confused at this point, the test is telling yo this is what the final function should look like: ```javascript -let helloWorld = function() { +const helloWorld = function() { return 'Hello, World!' } diff --git a/helloWorld/helloWorld.js b/helloWorld/helloWorld.js index 38bd3ee..a41264d 100644 --- a/helloWorld/helloWorld.js +++ b/helloWorld/helloWorld.js @@ -1,4 +1,4 @@ -let helloWorld = function() { +const helloWorld = function() { return '' } diff --git a/helloWorld/helloWorld.spec.js b/helloWorld/helloWorld.spec.js index df66165..c98e534 100644 --- a/helloWorld/helloWorld.spec.js +++ b/helloWorld/helloWorld.spec.js @@ -1,7 +1,7 @@ -let helloWorld = require('./helloWorld'); +const helloWorld = require('./helloWorld'); describe('Hello World', function() { it('says hello world', function() { expect(helloWorld()).toEqual('Hello, World!'); }); -}); \ No newline at end of file +}); diff --git a/leapYears/leapYears.js b/leapYears/leapYears.js index 1a130cd..ac786a2 100644 --- a/leapYears/leapYears.js +++ b/leapYears/leapYears.js @@ -1,4 +1,4 @@ -let leapYears = function() { +const leapYears = function() { } diff --git a/leapYears/leapYears.spec.js b/leapYears/leapYears.spec.js index 18449bc..0d4d7d4 100644 --- a/leapYears/leapYears.spec.js +++ b/leapYears/leapYears.spec.js @@ -1,4 +1,4 @@ -let leapYears = require('./leapYears') +const leapYears = require('./leapYears') describe('leapYears', function() { it('works with non century years', function() { diff --git a/palindromes/palindromes.js b/palindromes/palindromes.js index 8e715b2..ccfda4b 100644 --- a/palindromes/palindromes.js +++ b/palindromes/palindromes.js @@ -1,4 +1,4 @@ -let palindromes = function() { +const palindromes = function() { } diff --git a/palindromes/palindromes.spec.js b/palindromes/palindromes.spec.js index d3815d8..1b24286 100644 --- a/palindromes/palindromes.spec.js +++ b/palindromes/palindromes.spec.js @@ -1,4 +1,4 @@ -let palindromes = require('./palindromes') +const palindromes = require('./palindromes') describe('palindromes', function() { it('works with single words', function() { diff --git a/pig_latin/pigLatin.spec.js b/pig_latin/pigLatin.spec.js index 018936b..bbc8463 100644 --- a/pig_latin/pigLatin.spec.js +++ b/pig_latin/pigLatin.spec.js @@ -15,7 +15,7 @@ // See https://en.wikipedia.org/wiki/Pig_Latin for more details. -let pigLatin = require("./pigLatin.js"); +const pigLatin = require("./pigLatin.js"); describe('#translate', function() { it('translates a word beginning with a vowel', function() { @@ -61,4 +61,4 @@ describe('#translate', function() { s = pigLatin.translate("the quick brown fox"); expect(s).toEqual("ethay ickquay ownbray oxfay"); }); -}); \ No newline at end of file +}); diff --git a/removeFromArray/removeFromArray.js b/removeFromArray/removeFromArray.js index 7f66319..11efd5c 100644 --- a/removeFromArray/removeFromArray.js +++ b/removeFromArray/removeFromArray.js @@ -1,4 +1,4 @@ -let removeFromArray = function() { +const removeFromArray = function() { } diff --git a/removeFromArray/removeFromArray.spec.js b/removeFromArray/removeFromArray.spec.js index 9088df1..28c744c 100644 --- a/removeFromArray/removeFromArray.spec.js +++ b/removeFromArray/removeFromArray.spec.js @@ -1,4 +1,4 @@ -let removeFromArray = require('./removeFromArray') +const removeFromArray = require('./removeFromArray') describe('removeFromArray', function() { it('removes a single value', function() { diff --git a/repeatString/repeatString.js b/repeatString/repeatString.js index dfd3be0..770119a 100644 --- a/repeatString/repeatString.js +++ b/repeatString/repeatString.js @@ -1,4 +1,4 @@ -let repeatString = function() { +const repeatString = function() { } diff --git a/repeatString/repeatString.spec.js b/repeatString/repeatString.spec.js index f787081..931b437 100644 --- a/repeatString/repeatString.spec.js +++ b/repeatString/repeatString.spec.js @@ -1,4 +1,4 @@ -let repeatString = require('./repeatString') +const repeatString = require('./repeatString') describe('repeatString', function() { it('repeats the string', function() { diff --git a/reverseString/reverseString.js b/reverseString/reverseString.js index df8d3fd..febb577 100644 --- a/reverseString/reverseString.js +++ b/reverseString/reverseString.js @@ -1,5 +1,5 @@ -let reverseString = function() { +const reverseString = function() { } -module.exports = reverseString \ No newline at end of file +module.exports = reverseString diff --git a/reverseString/reverseString.spec.js b/reverseString/reverseString.spec.js index 4512add..e48840c 100644 --- a/reverseString/reverseString.spec.js +++ b/reverseString/reverseString.spec.js @@ -1,4 +1,4 @@ -let reverseString = require('./reverseString') +const reverseString = require('./reverseString') describe('reverseString', function() { it('reverses single word', function() { @@ -12,4 +12,4 @@ describe('reverseString', function() { xit('works with numbers and punctuation', function() { expect(reverseString('123! abc!')).toEqual('!cba !321') }) -}); \ No newline at end of file +}); diff --git a/snakeCase/snakeCase.js b/snakeCase/snakeCase.js index 3117d70..c948201 100644 --- a/snakeCase/snakeCase.js +++ b/snakeCase/snakeCase.js @@ -1,4 +1,4 @@ -let snakeCase = function() { +const snakeCase = function() { } diff --git a/snakeCase/snakeCase.spec.js b/snakeCase/snakeCase.spec.js index 44d2c3e..cce17d2 100644 --- a/snakeCase/snakeCase.spec.js +++ b/snakeCase/snakeCase.spec.js @@ -1,4 +1,4 @@ -let snakeCase = require('./snakeCase') +const snakeCase = require('./snakeCase') describe('snakeCase', function() { it('works with simple lowercased phrases', function() { diff --git a/sumAll/sumAll.js b/sumAll/sumAll.js index 820caaa..4030fe8 100644 --- a/sumAll/sumAll.js +++ b/sumAll/sumAll.js @@ -1,4 +1,4 @@ -let sumAll = function() { +const sumAll = function() { } diff --git a/sumAll/sumAll.spec.js b/sumAll/sumAll.spec.js index 5677526..520adc1 100644 --- a/sumAll/sumAll.spec.js +++ b/sumAll/sumAll.spec.js @@ -1,4 +1,4 @@ -let sumAll = require('./sumAll') +const sumAll = require('./sumAll') describe('sumAll', function() { it('sums numbers within the range', function() { diff --git a/tempConversion/tempConversion.js b/tempConversion/tempConversion.js index 0cb6e29..4fa21ee 100644 --- a/tempConversion/tempConversion.js +++ b/tempConversion/tempConversion.js @@ -1,9 +1,9 @@ -let ftoc = function() { - +const ftoc = function() { + } -let ctof = function() { - +const ctof = function() { + } module.exports = { diff --git a/tempConversion/tempConversion.spec.js b/tempConversion/tempConversion.spec.js index d1a4071..0dc9168 100644 --- a/tempConversion/tempConversion.spec.js +++ b/tempConversion/tempConversion.spec.js @@ -1,4 +1,4 @@ -let {ftoc, ctof} = require('./tempConversion') +const {ftoc, ctof} = require('./tempConversion') describe('ftoc', function() { it('works', function() {