-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update tests to browser based (learn-co-students#5)
* update tests to browser based * fixed arrow functions
- Loading branch information
1 parent
904fa34
commit b74eb05
Showing
9 changed files
with
13,544 additions
and
45 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Mocha</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" href="mocha.css" /> | ||
</head> | ||
<body> | ||
<div id="mocha"></div> | ||
<script src="mocha.js"></script> | ||
<script src="../node_modules/expect/umd/expect.min.js"></script> | ||
<script>mocha.setup('bdd');</script> | ||
<script src="../index.js"></script> | ||
<script src="index-test.js"></script> | ||
<script> | ||
mocha.run(); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
it("returns an array of strings containing what instruments each instrument plays", function() { | ||
const musicians = ["John Lennon", "Paul McCartney", "George Harrison", "Ringo Starr"]; | ||
const instruments = ["Guitar", "Bass Guitar", "Lead Guitar", "Drums"]; | ||
|
||
expect(theBeatlesPlay(musicians, instruments)).to.eql(["John Lennon plays Guitar", "Paul McCartney plays Bass Guitar", "George Harrison plays Lead Guitar", "Ringo Starr plays Drums"]); | ||
}); | ||
|
||
describe('johnLennonFacts', function(){ | ||
it("returns an array of strings with exclamation points", function() { | ||
expect(johnLennonFacts([ | ||
"He was the last Beatle to learn to drive", | ||
"He was never a vegetarian", | ||
"He was a choir boy and boy scout", | ||
"He hated the sound of his own voice" | ||
])).to.eql(["He was the last Beatle to learn to drive!!!", "He was never a vegetarian!!!", "He was a choir boy and boy scout!!!", "He hated the sound of his own voice!!!"]); | ||
|
||
expect(johnLennonFacts([ | ||
"foo", | ||
"bar", | ||
])).to.eql(["foo!!!", "bar!!!"]) | ||
}); | ||
}); | ||
|
||
describe('iLoveTheBeatles', function() { | ||
it("returns an array of 'I love the Beatles!' 8 times when passed the parameter 7 ", function() { | ||
expect(iLoveTheBeatles(7)).to.eql(["I love the Beatles!", "I love the Beatles!", "I love the Beatles!", "I love the Beatles!", "I love the Beatles!", "I love the Beatles!", "I love the Beatles!", "I love the Beatles!"]); | ||
}); | ||
|
||
it("returns an array of 'I love the Beatles!' once when passed the parameter 17", function() { | ||
expect(iLoveTheBeatles(17)).to.eql(["I love the Beatles!"]); | ||
}); | ||
}); |
Oops, something went wrong.