All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tools.getElementType.test.js Maven / Gradle / Ivy

The newest version!
import React from 'react'

import getElementType from './getElementType'

function Test({ as }) {
    return React.createElement(as, {})
}

describe('Проверка getElementType', () => {
    it('вернет тип компонента', () => {
        const component = 

        expect(getElementType(component, { as: 'span' })).toEqual('span')
        expect(getElementType(component, { as: 'span' }, () => 'span'))
        expect(getElementType(component, {})).toEqual('div')
    })
})




© 2015 - 2024 Weber Informatics LLC | Privacy Policy