remove class based exercises

This commit is contained in:
Cody Loyd
2017-11-20 13:51:01 -06:00
parent f0bf584e59
commit 290e7f1da4
18 changed files with 67 additions and 164 deletions
-11
View File
@@ -1,11 +0,0 @@
The goal of this exercise is for you to create a timer. The timer will operate with the following format:
00:00:00
You will be given an object with the value of seconds already added. Your job is to use the class to add a string containing the timer result to this original object.
Example:
12 seconds given
00:00:12 should be the output
-7
View File
@@ -1,7 +0,0 @@
class timeFormat {
}
module.exports = {
timeFormat
}
-35
View File
@@ -1,35 +0,0 @@
var Timer = require ('./timer.js');
describe('Timer', function() {
var timer; // undefined, here for scope purposes
beforeEach(function () {
timer = new Timer.timeFormat();
});
it('should initialize to 0 seconds', function() {
expect(timer.seconds).toEqual(0); // makes sure timer starts with 0 seconds
});
describe('time_string', function() {
it('should display 0 seconds as 00:00:00', function() {
timer.seconds = 0;
expect(timer.time_string()).toEqual("00:00:00");
});
it('should display 12 seconds as 00:00:12', function() {
timer.seconds = 12;
expect(timer.time_string()).toEqual("00:00:12");
});
it('should display 66 seconds as 00:01:06', function() {
timer.seconds = 66;
expect(timer.time_string()).toEqual("00:01:06");
});
it('should display 4000 seconds as 01:06:40', function() {
timer.seconds = 4000;
expect(timer.time_string()).toEqual("01:06:40");
});
});
});