@@ -3,6 +3,64 @@ const launchcode = require('../index.js');
3
3
4
4
describe ( "Testing launchcode" , function ( ) {
5
5
6
- // Write your unit tests here!
7
-
8
- } ) ;
6
+ it ( "should pass the value of organization as 'nonprofit." , function ( ) {
7
+ let result = launchcode . organization ;
8
+ expect ( result ) . toBe ( 'nonprofit' ) ;
9
+ } ) ;
10
+
11
+ it ( "should pass the value of 'executiveDirector' as 'Jeff'" , function ( ) {
12
+ let result = launchcode . executiveDirector ;
13
+ expect ( result ) . toBe ( "Jeff" ) ;
14
+ } ) ;
15
+
16
+ it ( "should pass the value of 'percentageCoolEmployees' as '100'" , function ( ) {
17
+ let result = launchcode . percentageCoolEmployees ;
18
+ expect ( result ) . toBe ( 100 ) ;
19
+ } ) ;
20
+
21
+ it ( "should contain the value 'LC101', 'LaunchCode Women+', and 'CodeCamp' in the key 'programsOffered'" , function ( ) {
22
+ let result = launchcode . programsOffered ;
23
+ expect ( result ) . toContain ( "LC101" ) ;
24
+ expect ( result ) . toContain ( "LaunchCode Women+" ) ;
25
+ expect ( result ) . toContain ( "CodeCamp" ) ;
26
+ expect ( result . length ) . toBe ( 3 ) ;
27
+ } ) ;
28
+
29
+ it ( "should return 'Launch!' when passed a number ONLY divisable by 2" , function ( ) {
30
+ let result = launchcode . launchOutput ( 2 ) ;
31
+ expect ( result ) . toBe ( "Launch!" ) ;
32
+ } ) ;
33
+
34
+ it ( "should return 'Code!' when passed a number ONLY divisable by 3" , function ( ) {
35
+ let result = launchcode . launchOutput ( 9 ) ;
36
+ expect ( result ) . toBe ( "Code!" ) ;
37
+ } ) ;
38
+
39
+ it ( "should return 'Rocks!' when passed a number ONLY divisable by 5" , function ( ) {
40
+ let result = launchcode . launchOutput ( 25 ) ;
41
+ expect ( result ) . toBe ( "Rocks!" ) ;
42
+ } ) ;
43
+
44
+ it ( "should return LaunchCode! when passed a number divisable by ONLY 2 AND 3" , function ( ) {
45
+ let result = launchcode . launchOutput ( 6 ) ;
46
+ expect ( result ) . toBe ( "LaunchCode!" ) ;
47
+ } ) ;
48
+
49
+ it ( "should return 'Code Rocks!' when passed a number ONLY divisab le by 3 AND 5" , function ( ) {
50
+ let result = launchcode . launchOutput ( 15 ) ;
51
+ expect ( result ) . toBe ( "Code Rocks!" ) ;
52
+ } ) ;
53
+
54
+ it ( "should return 'Launch Rocks!' when passed a number ONLY divisable by 2 AND 5" , function ( ) {
55
+ let result = launchcode . launchOutput ( 10 ) ;
56
+ expect ( result ) . toBe ( "Launch Rocks!" ) ;
57
+ } ) ;
58
+
59
+ it ( "should return 'LaunchCode Rocks!' when passed a number divisable by 2, 3, and 5" , function ( ) {
60
+ let result = launchcode . launchOutput ( 30 ) ;
61
+ expect ( result ) . toBe ( "LaunchCode Rocks!" ) ;
62
+ } )
63
+
64
+
65
+
66
+ } ) ;
0 commit comments