@@ -120,14 +120,15 @@ describe('useEventContext', () => {
120
120
}
121
121
122
122
describe ( 'when called on owner page' , ( ) => {
123
- it ( 'sets event context with ownerid and no repoid' , async ( ) => {
123
+ it ( 'sets event context with path, ownerid, and no repoid' , async ( ) => {
124
124
setup ( { } )
125
125
renderHook ( ( ) => useEventContext ( ) , {
126
126
wrapper : ownerWrapper ,
127
127
} )
128
128
129
129
await waitFor ( ( ) => {
130
130
expect ( mockedSetContext ) . toHaveBeenCalledWith ( {
131
+ path : '/:provider/:owner' ,
131
132
owner : {
132
133
id : mockOwnerContext . owner . ownerid ,
133
134
} ,
@@ -138,14 +139,15 @@ describe('useEventContext', () => {
138
139
} )
139
140
140
141
describe ( 'when called on repo page' , ( ) => {
141
- it ( 'sets event context with ownerid and repoid' , async ( ) => {
142
+ it ( 'sets event context with path, ownerid, and repoid' , async ( ) => {
142
143
setup ( { } )
143
144
renderHook ( useEventContext , {
144
145
wrapper : repoWrapper ,
145
146
} )
146
147
147
148
await waitFor ( ( ) => {
148
149
expect ( mockedSetContext ) . toHaveBeenCalledWith ( {
150
+ path : '/:provider/:owner/:repo' ,
149
151
owner : {
150
152
id : mockOwnerContext . owner . ownerid ,
151
153
} ,
@@ -167,6 +169,7 @@ describe('useEventContext', () => {
167
169
168
170
await waitFor ( ( ) => {
169
171
expect ( mockedSetContext ) . toHaveBeenCalledWith ( {
172
+ path : '/:provider/:owner' ,
170
173
owner : undefined ,
171
174
repo : undefined ,
172
175
} )
0 commit comments