@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) • 422 B
text/typescript
import { text } from './text';
describe( 'text', () => {
test( 'can get a text from a node.', () => {
const div = document.createElement( 'div' );
div.textContent = 'hello!';
expect( text( div ) ).toBe( 'hello!' );
} );
test( 'can set a text to a node.', () => {
const div = document.createElement( 'div' );
text( div, 'world!' );
expect( div.textContent ).toBe( 'world!' );
} );
} );