UNPKG

@ryusei/light

Version:

<div align="center"> <a href="https://light.ryuseijs.com"> <img alt="RyuseiLight" src="https://light.ryuseijs.com/images/svg/logo.svg" width="70"> </a>

19 lines (13 loc) 517 B
import { create } from './create'; describe( 'create', () => { test( 'can create an element by a tag name.', () => { const div = create( 'div' ); const iframe = create( 'iframe' ); expect( div instanceof HTMLDivElement ).toBe( true ); expect( iframe instanceof HTMLIFrameElement ).toBe( true ); } ); test( 'can create an element with setting attributes.', () => { const iframe = create( 'iframe', 'main' ); expect( iframe.classList.contains( 'main' ) ).toBe( true ); } ); } );