Skip to content

Commit

Permalink
Create render-runtime mock
Browse files Browse the repository at this point in the history
  • Loading branch information
lbebber committed Jul 3, 2019
1 parent 4c2d0ae commit 1461b52
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions react/__mocks__/vtex.render-runtime.js
@@ -0,0 +1,13 @@
import React from 'react'

const withRuntimeContext = Component => {
const ExtendedComponent = props => (
<Component runtime={{ hints: { mobile: true } }} {...props} />
)

ExtendedComponent.displayName = Component.displayName

return ExtendedComponent
}

export { withRuntimeContext }

0 comments on commit 1461b52

Please sign in to comment.