@@ -5,4 +5,49 @@ describe("Testing launchcode", function(){
55
66 // Write your unit tests here!
77
8+ it ( "should have a property called organization" , function ( ) {
9+ expect ( launchcode . organization ) . toEqual ( "nonprofit" ) ;
10+ } ) ;
11+ it ( "should have a propert called executiveDirector" , function ( ) {
12+ expect ( launchcode . executiveDirector ) . toEqual ( "Jeff" ) ;
13+ } ) ;
14+ it ( "should have aproperty called percentageCoolEmployees" , function ( ) {
15+ expect ( launchcode . percentageCoolEmployees ) . toEqual ( 100 )
16+ } ) ;
17+ it ( "should have property called programsOffered" , function ( ) {
18+ expect ( launchcode . programsOffered [ 0 ] ) . toEqual ( "Web Development" ) ;
19+ expect ( launchcode . programsOffered [ 1 ] ) . toEqual ( "Data Analysis" ) ;
20+ expect ( launchcode . programsOffered [ 2 ] ) . toEqual ( "Liftoff" ) ;
21+ expect ( launchcode . programsOffered . length ) . toEqual ( 3 ) ;
22+ } ) ;
23+
24+ describe ( "should have a method, launchOutpu, which" , function ( ) {
25+
26+ it ( "should return 'Launch!' for numbers evenly divisible by 2" , function ( ) {
27+ expect ( launchcode . launchOutput ( 2 ) ) . toEqual ( "Launch!" ) ;
28+ } ) ;
29+ it ( "should return 'Code!' for numbers evenly divisible by 3" , function ( ) {
30+ expect ( launchcode . launchOutput ( 3 ) ) . toEqual ( "Code!" ) ;
31+ } ) ;
32+ it ( "should return 'Rocks!' for numbers evenly divisible by 5" , function ( ) {
33+ expect ( launchcode . launchOutput ( 5 ) ) . toEqual ( "Rocks!" ) ;
34+ } ) ;
35+ it ( "should return 'LaunchCode!' for numbers evenly divisible by 2 and 3" , function ( ) {
36+ expect ( launchcode . launchOutput ( 6 ) ) . toEqual ( "LaunchCode!" ) ;
37+ } ) ;
38+ it ( "should return 'Code Rocks!' for numbers evenly divisible by 3 and 5" , function ( ) {
39+ expect ( launchcode . launchOutput ( 15 ) ) . toEqual ( "Code Rocks!" ) ;
40+ } ) ;
41+ // change for new condition
42+ it ( "should return 'Launch Rocks! (CRASH!!!!)' for numbers evenly divisable by 2 and 5" , function ( ) {
43+ expect ( launchcode . launchOutput ( 10 ) ) . toEqual ( "Launch Rocks! (CRASH!!!!)" ) ;
44+ } ) ;
45+ it ( "should return 'LaunchCode Rocks! for numbers evenly divisible by 2, 3, and 5" , function ( ) {
46+ expect ( launchcode . launchOutput ( 30 ) ) . toEqual ( "LaunchCode Rocks!" ) ;
47+ } ) ;
48+ it ( "numbers not evenly divisible by 2, 3, or 5" , function ( ) {
49+ expect ( launchcode . launchOutput ( 7 ) ) . toEqual ( "Rutabagas! That doesn't work." ) ;
50+ } ) ;
51+ } ) ;
52+
853} ) ;
0 commit comments