File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,31 @@ describe('node-mac-contacts', () => {
2020 } )
2121 } )
2222
23- describe ( 'getContactsByName(name)' , ( ) => {
23+ describe ( 'getContactsByName(name[, extraProperties] )' , ( ) => {
2424 it ( 'should throw if name is not a string' , ( ) => {
2525 expect ( ( ) => {
2626 getContactsByName ( 12345 )
2727 } ) . to . throw ( / n a m e m u s t b e a s t r i n g / )
2828 } )
29+
30+ it ( 'should throw if extraProperties is not an array' , ( ) => {
31+ expect ( ( ) => {
32+ getContactsByName ( 'jim-bob' , 12345 )
33+ } ) . to . throw ( / e x t r a P r o p e r t i e s m u s t b e a n a r r a y / )
34+ } )
2935 } )
3036
31- describe ( 'getAllContacts()' , ( ) => {
37+ describe ( 'getAllContacts([extraProperties] )' , ( ) => {
3238 it ( 'should return an array' , ( ) => {
3339 const contacts = getAllContacts ( )
3440 expect ( contacts ) . to . be . an ( 'array' )
3541 } )
42+
43+ it ( 'should throw if extraProperties is not an array' , ( ) => {
44+ expect ( ( ) => {
45+ getAllContacts ( 'tsk-bad-array' )
46+ } ) . to . throw ( / e x t r a P r o p e r t i e s m u s t b e a n a r r a y / )
47+ } )
3648 } )
3749
3850 describe ( 'addNewContact(contact)' , ( ) => {
You can’t perform that action at this time.
0 commit comments