rofrischmann/fela

View on GitHub
packages/fela-integration/src/jest-react-fela_react-fela/__tests__/FelaTheme-test.js

Summary

Maintainability
A
0 mins
Test Coverage
import 'raf/polyfill'
import React from 'react'

import { createSnapshot } from 'jest-react-fela'
import { FelaTheme } from 'react-fela'

describe('Using the FelaTheme component', () => {
  it('correctly pass the theme down', () => {
    expect(
      createSnapshot(
        <FelaTheme>
          {(theme) => <div>The color is {theme.color}.</div>}
        </FelaTheme>,
        { color: 'red' }
      )
    ).toMatchSnapshot()
  })
})