forked from rithmschool/intermediate_javascript_exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstructorsSpec.js
More file actions
27 lines (24 loc) · 820 Bytes
/
constructorsSpec.js
File metadata and controls
27 lines (24 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
var expect = chai.expect
var person;
beforeEach(function(){
person = new Person("Elie", "Schoppik", "purple", 34)
})
describe("Person", function(){
it("has a firstName", function(){
expect(person.hasOwnProperty('firstName')).to.equal(true);
});
it("has a lastName", function(){
expect(person.hasOwnProperty('lastName')).to.equal(true);
});
it("has a favoriteColor", function(){
expect(person.hasOwnProperty('favoriteColor')).to.equal(true);
});
it("has a favoriteNumber", function(){
expect(person.hasOwnProperty('favoriteNumber')).to.equal(true);
});
});
describe("#multiplyFavoriteNumber", function(){
it("takes in a number and returns the product of the number and the Person's favorite number", function(){
expect(person.multiplyFavoriteNumber(10)).to.equal(340)
});
});