@@ -80,11 +80,11 @@ describe("Sites", () => {
8080 expect ( first . _id ) . toBe ( response [ 0 ] . _id ) ;
8181
8282 // collection wrapper functions
83- expect ( first . item ) . toBeDefined ( ) ;
84- expect ( first . items ) . toBeDefined ( ) ;
85- expect ( first . removeItem ) . toBeDefined ( ) ;
86- expect ( first . createItem ) . toBeDefined ( ) ;
87- expect ( first . updateItem ) . toBeDefined ( ) ;
83+ expect ( typeof first . item ) . toBe ( "function" ) ;
84+ expect ( typeof first . items ) . toBe ( "function" ) ;
85+ expect ( typeof first . removeItem ) . toBe ( "function" ) ;
86+ expect ( typeof first . createItem ) . toBe ( "function" ) ;
87+ expect ( typeof first . updateItem ) . toBe ( "function" ) ;
8888 } ) ;
8989
9090 it ( "should respond with a list of webhooks" , async ( ) => {
@@ -106,7 +106,7 @@ describe("Sites", () => {
106106 expect ( first . _id ) . toBe ( response [ 0 ] . _id ) ;
107107
108108 // webhook wrapper functions
109- expect ( first . remove ) . toBeDefined ( ) ;
109+ expect ( typeof first . remove ) . toBe ( "function" ) ;
110110 } ) ;
111111
112112 it ( "should respond with a single webhook" , async ( ) => {
@@ -125,7 +125,7 @@ describe("Sites", () => {
125125 expect ( result . _id ) . toBe ( response . _id ) ;
126126
127127 // webhook wrapper functions
128- expect ( result . remove ) . toBeDefined ( ) ;
128+ expect ( typeof result . remove ) . toBe ( "function" ) ;
129129 } ) ;
130130
131131 it ( "should create a webhook" , async ( ) => {
@@ -144,7 +144,7 @@ describe("Sites", () => {
144144 expect ( result . _id ) . toBe ( response . _id ) ;
145145
146146 // webhook wrapper functions
147- expect ( result . remove ) . toBeDefined ( ) ;
147+ expect ( typeof result . remove ) . toBe ( "function" ) ;
148148 } ) ;
149149
150150 it ( "should remove a webhook" , async ( ) => {
0 commit comments