File tree Expand file tree Collapse file tree
packages/cli/src/cli/commands/doc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,8 +156,10 @@ describe('doc fetch command', () => {
156156 } )
157157 const schema = JSON . parse ( stdout ( ) )
158158 expect ( schema . definitions . Result . anyOf ) . toHaveLength ( 2 )
159- expect ( schema . definitions . Result . anyOf [ 0 ] . properties . document . properties . content . type ) . toBe ( 'string' )
160- expect ( schema . definitions . Result . anyOf [ 1 ] . properties . format . const ) . toBe ( 'markdown' )
159+ expect ( schema . definitions . Result . anyOf [ 0 ] . properties . document ) . toEqual ( { $ref : '#/definitions/Document' } )
160+ expect ( schema . definitions . Document . properties . content . type ) . toBe ( 'string' )
161+ expect ( schema . definitions . Result . anyOf [ 1 ] ) . toEqual ( { $ref : '#/definitions/DocumentFile' } )
162+ expect ( schema . definitions . DocumentFile . properties . format . const ) . toBe ( 'markdown' )
161163 expect ( stderr ( ) ) . toBe ( '' )
162164 expect ( fetch ) . not . toHaveBeenCalled ( )
163165 } )
Original file line number Diff line number Diff line change @@ -177,7 +177,10 @@ describe('doc search command', () => {
177177 } )
178178 const schema = JSON . parse ( stdout ( ) )
179179 expect ( schema . definitions . Result . required ) . toEqual ( [ 'results' , 'pageInfo' ] )
180- expect ( schema . definitions . Result . properties . results . items . properties . domain . type ) . toEqual ( [ 'string' , 'null' ] )
180+ expect ( schema . definitions . Result . properties . results . items ) . toEqual ( {
181+ $ref : '#/definitions/DocumentationSearchEntry' ,
182+ } )
183+ expect ( schema . definitions . DocumentationSearchEntry . properties . domain . type ) . toEqual ( [ 'string' , 'null' ] )
181184 expect ( schema . definitions . Result . additionalProperties ) . toBe ( false )
182185 expect ( stderr ( ) ) . toBe ( '' )
183186 expect ( shopifyFetch ) . not . toHaveBeenCalled ( )
You can’t perform that action at this time.
0 commit comments