Skip to content

Commit b0ac5eb

Browse files
committed
studio
1 parent 6f02786 commit b0ac5eb

2 files changed

Lines changed: 34 additions & 4 deletions

File tree

objects-and-math/studio/ObjectsStudio02.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
// Code your oxygenExpended function here:
1111

1212

13-
// Candidate data & crew array.
1413
let candidateA = {
1514
'name':'Gordon Shumway',
1615
'species':'alf',
Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,39 @@
11
// launchcode.test.js code:
22
const launchcode = require('../index.js');
33

4-
describe("Testing launchcode", function(){
4+
describe("The launchcode object", function(){
55

6-
// Write your unit tests here!
6+
test("should have a property called organization", function(){
7+
expect(launchcode.organization).toEqual("nonprofit");
8+
});
9+
test("should have a property called executiveDirector", function(){
10+
expect(launchcode.executiveDirector).toEqual("Jeff");
11+
})
12+
test("should have a property called percentageCoolEmployees", function(){
13+
expect(launchcode.percentageCoolEmployees).toEqual(100);
14+
})
15+
test("should have a property called programsOffered with 3 programs", function(){
16+
expect(launchcode.programsOffered[0]).toEqual("Web Development");
17+
expect(launchcode.programsOffered[1]).toEqual("Data Analysis");
18+
expect(launchcode.programsOffered[2]).toEqual("Liftoff");
19+
expect(launchcode.programsOffered.length).toEqual(3);
20+
});
21+
22+
describe("should have a method called launchOutput, which", function(){
23+
24+
test("should return 'Launch!' for numbers evenly divisible by 2", function(){
25+
expect(launchcode.launchOutput(2)).toEqual("Launch!");
26+
});
27+
test("should return 'Code!' for numbers evenly divisible by 3", function(){
28+
expect(launchcode.launchOutput(3)).toEqual("Code!");
29+
});
30+
test("should return 'Rocks!' for numbers evenly divisible by 5", function(){
31+
expect(launchcode.launchOutput(5)).toEqual("Rocks!");
32+
});
733

8-
});
34+
35+
36+
37+
38+
39+

0 commit comments

Comments
 (0)