Skip to content

Commit 9a63b39

Browse files
committed
finished studio
1 parent 02a056f commit 9a63b39

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

unit-testing/studio/tests/launchcode.test.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,25 @@
22
const launchcode = require('../index.js');
33

44
describe("Testing launchcode", function(){
5+
test('checks that the keys match the values',function(){
6+
expect(launchcode.organization).toBe("nonprofit");
7+
expect(launchcode.executiveDirector).toBe("Jeff");
8+
expect(launchcode.percentageCoolEmployees).toBe(100);
9+
});
10+
test("checks the array entries and length", function(){
11+
expect(launchcode.programsOffered.includes("Web Development")).toBe(true)
12+
expect(launchcode.programsOffered.includes("Data Analysis")).toBe(true)
13+
expect(launchcode.programsOffered.includes("Liftoff")).toBe(true)
14+
expect(launchcode.programsOffered.length).toBe(3);
15+
16+
});
17+
test("checks that the function returns the correct string for a given input", function(){
18+
expect(launchcode.launchOutput(2)).toBe("Launch!")
19+
expect(launchcode.launchOutput(3)).toBe("Code!")
20+
expect(launchcode.launchOutput(5)).toBe("Rocks!")
21+
})
522

6-
// Write your unit tests here!
723

24+
25+
// Write your unit tests here!
826
});

0 commit comments

Comments
 (0)