UNPKG

@qntm-code/utils

Version:

A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.

9 lines (8 loc) 364 B
import { createElement } from '../test-helpers/createElement.spec'; import { getElementHeight } from './getElementHeight'; describe('getElementHeight', () => { it('should return the height of an element as a number', () => { const element = createElement('div', { height: '100px' }); expect(getElementHeight(element)).toEqual(100); }); });