@@ -134,30 +134,42 @@ describe('v2', () => {
134134 describe ( 'storage' , ( ) => {
135135 describe ( 'storage.onObjectArchived()' , ( ) => {
136136 it ( 'should update CloudEvent appropriately' , ( ) => {
137- const cloudFn = storage . onObjectArchived ( 'bucket' , handler ) ;
137+ const bucket = 'bucket' ;
138+ const cloudFn = storage . onObjectArchived ( bucket , handler ) ;
138139 const cloudFnWrap = wrapV2 ( cloudFn ) ;
139- expect ( cloudFnWrap ( ) . cloudEvent ) . to . include ( { } ) ;
140+ expect ( cloudFnWrap ( ) . cloudEvent ) . to . include ( {
141+ bucket,
142+ } ) ;
140143 } ) ;
141144 } ) ;
142145 describe ( 'storage.onObjectDeleted()' , ( ) => {
143146 it ( 'should update CloudEvent appropriately' , ( ) => {
144- const cloudFn = storage . onObjectDeleted ( 'bucket' , handler ) ;
147+ const bucket = 'bucket' ;
148+ const cloudFn = storage . onObjectDeleted ( bucket , handler ) ;
145149 const cloudFnWrap = wrapV2 ( cloudFn ) ;
146- expect ( cloudFnWrap ( ) . cloudEvent ) . to . include ( { } ) ;
150+ expect ( cloudFnWrap ( ) . cloudEvent ) . to . include ( {
151+ bucket,
152+ } ) ;
147153 } ) ;
148154 } ) ;
149155 describe ( 'storage.onObjectFinalized()' , ( ) => {
150156 it ( 'should update CloudEvent appropriately' , ( ) => {
151- const cloudFn = storage . onObjectFinalized ( 'bucket' , handler ) ;
157+ const bucket = 'bucket' ;
158+ const cloudFn = storage . onObjectFinalized ( bucket , handler ) ;
152159 const cloudFnWrap = wrapV2 ( cloudFn ) ;
153- expect ( cloudFnWrap ( ) . cloudEvent ) . to . include ( { } ) ;
160+ expect ( cloudFnWrap ( ) . cloudEvent ) . to . include ( {
161+ bucket,
162+ } ) ;
154163 } ) ;
155164 } ) ;
156165 describe ( 'storage.onObjectMetadataUpdated()' , ( ) => {
157166 it ( 'should update CloudEvent appropriately' , ( ) => {
158- const cloudFn = storage . onObjectMetadataUpdated ( 'bucket' , handler ) ;
167+ const bucket = 'bucket' ;
168+ const cloudFn = storage . onObjectMetadataUpdated ( bucket , handler ) ;
159169 const cloudFnWrap = wrapV2 ( cloudFn ) ;
160- expect ( cloudFnWrap ( ) . cloudEvent ) . to . include ( { } ) ;
170+ expect ( cloudFnWrap ( ) . cloudEvent ) . to . include ( {
171+ bucket,
172+ } ) ;
161173 } ) ;
162174 } ) ;
163175 } ) ;
0 commit comments