File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
unit-testing/studio/tests Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 2
2
const launchcode = require ( '../index.js' ) ;
3
3
4
4
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
+ } )
5
22
6
- // Write your unit tests here!
7
23
24
+
25
+ // Write your unit tests here!
8
26
} ) ;
You can’t perform that action at this time.
0 commit comments