Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha"
},
"author": "",
"license": "ISC",
Expand Down
13 changes: 6 additions & 7 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,31 @@ const lesson2 = require('../src/Lesson2Variable');
const lesson21 = require('../src/Lesson21');
const lesson3 = require('../src/Lesson3HigherOrderFunctions');
const lesson31 = require('../src/Lesson31');
require('approvals').mocha();

describe('RegressionTest', () => {
it('test cat song',function() {
const song = new lesson1.Lesson1Straight();
song.singCatSong();
this.verify(song.song, {reporters: ['diffmerge']});
assert(song.song, {reporters: ['diffmerge']});

});
it('test beer', function(){
const song = new lesson2.Lesson2Variable();
song.singBottlesOfBeer();
this.verify(song.song, {reporters: ['diffmerge']});
assert(song.song, {reporters: ['diffmerge']});
});
it('test lesson21', function(){
const song = new lesson21.Lesson21();
const names = ["Llewellyn", "Samatha", "Tomas", "Emilia"];
song.singSong(1, names);
song.singSong(2, names);
song.singSong(3, names);
this.verify(song.song, {reporters: ['diffmerge']});
assert(song.song, {reporters: ['diffmerge']});
});
it('test lesson3', function() {
const song = new lesson3.Lesson3HigherOrderFunctions();
song.singSong();
this.verify(song.song, {reporters: ['diffmerge']});
assert(song.song, {reporters: ['diffmerge']});

});
it('test lesson31', function() {
Expand All @@ -38,6 +37,6 @@ describe('RegressionTest', () => {
song.singSong(1, names);
song.singSong(2, names);
song.singSong(3, names);
this.verify(song.song, {reporters: ['diffmerge']});
assert(song.song, {reporters: ['diffmerge']});
});
});
});