Skip to content

Commit

Permalink
Create mock for product context
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Klynger committed Oct 22, 2019
1 parent b62b6a3 commit b123121
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions react/__mocks__/vtex.product-context.js
@@ -0,0 +1,7 @@
import React, { createContext } from 'react'

const ProductContext = createContext({})

export const ProductContextProvider = ({ product, query, ...rest }) => {
return <ProductContext.Provider value={{ product, query }} {...rest} />
}

0 comments on commit b123121

Please sign in to comment.