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() {
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() {
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() {
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:
```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!'
}

View File

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

View File

@ -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!');
});
});
});

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() {
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() {
it('works with single words', function() {

View File

@ -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");
});
});
});

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() {
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() {
it('repeats the string', function() {

View File

@ -1,5 +1,5 @@
let reverseString = function() {
const reverseString = function() {
}
module.exports = reverseString
module.exports = reverseString

View File

@ -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')
})
});
});

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() {
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() {
it('sums numbers within the range', function() {

View File

@ -1,9 +1,9 @@
let ftoc = function() {
const ftoc = function() {
}
let ctof = function() {
const ctof = function() {
}
module.exports = {

View File

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