Transform 'var' in 'let'

This commit is contained in:
Étienne Boisseau-Sierra 2018-06-08 20:44:45 -04:00
parent b99fe58185
commit 3a9251d55e
27 changed files with 31 additions and 31 deletions

View file

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

View file

@ -1,4 +1,4 @@
var caesar = require('./caesar') let 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 @@
var calculator = require ('./calculator.js'); let 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 @@
var fibonacci = function() { let fibonacci = function() {
} }

View file

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

View file

@ -1,4 +1,4 @@
var <%= title %> = function() { let <%= title %> = function() {
} }

View file

@ -1,4 +1,4 @@
var <%= title %> = require('./<%=title%>') let <%= title %> = require('./<%=title%>')
describe('<%=title%>', function() { describe('<%=title%>', function() {
it('EDITME', function() { it('EDITME', 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
var helloWorld = require('./helloWorld'); let 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
var helloWorld = function() { let 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
var helloWorld = function() { let helloWorld = function() {
return 'Hello, World!' return 'Hello, World!'
} }

View file

@ -1,5 +1,5 @@
var helloWorld = function() { let helloWorld = function() {
return '' return ''
} }
module.exports = helloWorld module.exports = helloWorld

View file

@ -1,4 +1,4 @@
var helloWorld = require('./helloWorld'); let 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 @@
var leapYears = function() { let leapYears = function() {
} }

View file

@ -1,4 +1,4 @@
var leapYears = require('./leapYears') let 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 @@
var palindromes = function() { let palindromes = function() {
} }

View file

@ -1,4 +1,4 @@
var palindromes = require('./palindromes') let 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.
var pigLatin = require("./pigLatin.js"); let 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 @@
var removeFromArray = function() { let removeFromArray = function() {
} }

View file

@ -1,4 +1,4 @@
var removeFromArray = require('./removeFromArray') let 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 @@
var repeatString = function() { let repeatString = function() {
} }

View file

@ -1,4 +1,4 @@
var repeatString = require('./repeatString') let 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 @@
var reverseString = function() { let reverseString = function() {
} }

View file

@ -1,4 +1,4 @@
var reverseString = require('./reverseString') let 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 @@
var snakeCase = function() { let snakeCase = function() {
} }

View file

@ -1,4 +1,4 @@
var snakeCase = require('./snakeCase') let 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 @@
var sumAll = function() { let sumAll = function() {
} }

View file

@ -1,4 +1,4 @@
var sumAll = require('./sumAll') let 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 @@
var ftoc = function() { let ftoc = function() {
} }
var ctof = function() { let ctof = function() {
} }

View file

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