import { test, expect } from 'vitest'; import { render } from '@testing-library/react'; import WrapperTag from './WrapperTag'; const CONTENT = 'My content'; test('wrapper tag renders correctly', () => { render( {CONTENT} ); const wrapper = document.querySelector('#foo'); expect(wrapper?.tagName).toEqual('DIV'); }); test('wrapper tag widh tag name', () => { render( {CONTENT} ); const wrapper = document.querySelector('#foo'); expect(wrapper?.tagName).toEqual('SECTION'); }); test('passing additional props', () => { render( {CONTENT} ); const wrapper = document.querySelector('#foo') as HTMLElement; expect(wrapper?.dataset.test).toEqual('foo'); });