@qntm-code/utils
Version:
A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.
11 lines (10 loc) • 495 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const createElement_spec_1 = require("../test-helpers/createElement.spec");
const getElementWidth_1 = require("./getElementWidth");
describe('getElementWidth', () => {
it('should return the width of an element as a number', () => {
const element = (0, createElement_spec_1.createElement)('div', { width: '100px' });
expect((0, getElementWidth_1.getElementWidth)(element)).toEqual(100);
});
});