import React from 'react'
import { vi } from 'vitest'
import { Button, IconButton } from '~components/ButtonV1'
import { Icon } from '~components/Icon'
import { isSemanticElement } from './isSemanticElement'
describe('isSemanticElement', () => {
it('returns true if provided a native element with a semantic role', () => {
expect(
isSemanticElement(
,
),
).toBe(true)
expect(isSemanticElement(link)).toBe(true)
})
it('returns false if provided a non-semantic element', () => {
expect(isSemanticElement(click)).toBe(false)
expect(isSemanticElement(
link
)).toBe(false)
})
it('returns true if provided one of the Kaizen components from the allowed list', () => {
expect(isSemanticElement()).toBe(true)
expect(isSemanticElement()).toBe(true)
})
it('will return true if provided a non-semantic element with a semantic role', () => {
expect(
isSemanticElement(
custom semantic el
,
),
).toBe(true)
expect(
isSemanticElement(
custom semantic el
,
),
).toBe(true)
expect(
isSemanticElement(),
).toBe(true)
})
it("returns false if provided an element using a role 'presentation' or 'none'", () => {
expect(isSemanticElement()).toBe(false)
expect(isSemanticElement(Hello)).toBe(false)
})
})