Transform 'let' in 'const' where needs be

This commit is contained in:
Étienne Boisseau-Sierra 2018-08-07 11:23:28 +01:00
parent deb698c09e
commit 00407bdee5
25 changed files with 34 additions and 34 deletions

View File

@ -1,4 +1,4 @@
let caesar = function() { const caesar = function() {
} }

View File

@ -1,4 +1,4 @@
let caesar = require('./caesar') const caesar = require('./caesar')
describe('caesar', function() { describe('caesar', function() {
it('works with single letters', function() { it('works with single letters', function() {

View File

@ -1,4 +1,4 @@
let calculator = require ('./calculator.js'); const calculator = require ('./calculator.js');
describe('add', function() { describe('add', function() {
it('adds 0 and 0', function() { it('adds 0 and 0', function() {

View File

@ -1,4 +1,4 @@
let fibonacci = function() { const fibonacci = function() {
} }

View File

@ -1,4 +1,4 @@
let fibonacci = require('./fibonacci') const fibonacci = require('./fibonacci')
describe('fibonacci', function() { describe('fibonacci', function() {
it('works', function() { it('works', function() {

View File

@ -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: Let's look at the spec file first:
```javascript ```javascript
let helloWorld = require('./helloWorld'); const helloWorld = require('./helloWorld');
describe('Hello World', function() { describe('Hello World', function() {
it('says 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: so let's look at the javascript file:
```javascript ```javascript
let helloWorld = function() { const helloWorld = function() {
return '' 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: this is what the final function should look like:
```javascript ```javascript
let helloWorld = function() { const helloWorld = function() {
return 'Hello, World!' return 'Hello, World!'
} }

View File

@ -1,4 +1,4 @@
let helloWorld = function() { const helloWorld = function() {
return '' return ''
} }

View File

@ -1,4 +1,4 @@
let helloWorld = require('./helloWorld'); const helloWorld = require('./helloWorld');
describe('Hello World', function() { describe('Hello World', function() {
it('says hello world', function() { it('says hello world', function() {

View File

@ -1,4 +1,4 @@
let leapYears = function() { const leapYears = function() {
} }

View File

@ -1,4 +1,4 @@
let leapYears = require('./leapYears') const leapYears = require('./leapYears')
describe('leapYears', function() { describe('leapYears', function() {
it('works with non century years', function() { it('works with non century years', function() {

View File

@ -1,4 +1,4 @@
let palindromes = function() { const palindromes = function() {
} }

View File

@ -1,4 +1,4 @@
let palindromes = require('./palindromes') const palindromes = require('./palindromes')
describe('palindromes', function() { describe('palindromes', function() {
it('works with single words', function() { it('works with single words', function() {

View File

@ -15,7 +15,7 @@
// See https://en.wikipedia.org/wiki/Pig_Latin for more details. // See https://en.wikipedia.org/wiki/Pig_Latin for more details.
let pigLatin = require("./pigLatin.js"); const pigLatin = require("./pigLatin.js");
describe('#translate', function() { describe('#translate', function() {
it('translates a word beginning with a vowel', function() { it('translates a word beginning with a vowel', function() {

View File

@ -1,4 +1,4 @@
let removeFromArray = function() { const removeFromArray = function() {
} }

View File

@ -1,4 +1,4 @@
let removeFromArray = require('./removeFromArray') const removeFromArray = require('./removeFromArray')
describe('removeFromArray', function() { describe('removeFromArray', function() {
it('removes a single value', function() { it('removes a single value', function() {

View File

@ -1,4 +1,4 @@
let repeatString = function() { const repeatString = function() {
} }

View File

@ -1,4 +1,4 @@
let repeatString = require('./repeatString') const repeatString = require('./repeatString')
describe('repeatString', function() { describe('repeatString', function() {
it('repeats the string', function() { it('repeats the string', function() {

View File

@ -1,4 +1,4 @@
let reverseString = function() { const reverseString = function() {
} }

View File

@ -1,4 +1,4 @@
let reverseString = require('./reverseString') const reverseString = require('./reverseString')
describe('reverseString', function() { describe('reverseString', function() {
it('reverses single word', function() { it('reverses single word', function() {

View File

@ -1,4 +1,4 @@
let snakeCase = function() { const snakeCase = function() {
} }

View File

@ -1,4 +1,4 @@
let snakeCase = require('./snakeCase') const snakeCase = require('./snakeCase')
describe('snakeCase', function() { describe('snakeCase', function() {
it('works with simple lowercased phrases', function() { it('works with simple lowercased phrases', function() {

View File

@ -1,4 +1,4 @@
let sumAll = function() { const sumAll = function() {
} }

View File

@ -1,4 +1,4 @@
let sumAll = require('./sumAll') const sumAll = require('./sumAll')
describe('sumAll', function() { describe('sumAll', function() {
it('sums numbers within the range', function() { it('sums numbers within the range', function() {

View File

@ -1,8 +1,8 @@
let ftoc = function() { const ftoc = function() {
} }
let ctof = function() { const ctof = function() {
} }

View File

@ -1,4 +1,4 @@
let {ftoc, ctof} = require('./tempConversion') const {ftoc, ctof} = require('./tempConversion')
describe('ftoc', function() { describe('ftoc', function() {
it('works', function() { it('works', function() {