# All files / src/test-utils getClasses.tsx

100% Statements 9/9
100% Branches 0/0
100% Functions 2/2
100% Lines 9/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    1730x
    30x

    30x

    30x
    48x

    48x
    48x

    48x

    48x

     import * as React from 'react'
    import { createUseStyles } from '@fluent-ui/styles'
    import { Styles } from 'jss'
    import { render } from './createRender'

    export function getClasses<T extends string>(styles: Styles, name: string): Record<T, string> {
      const useStyles = createUseStyles<T>(styles, { name })
      let classes: Record<T, string>
      function Util(props: any): React.ReactElement {
        classes = useStyles(props)
        return <div />
      }
      render(<Util />)
      // @ts-ignore
      return classes
    }