package.test.test.js Maven / Gradle / Ivy
'use strict'
var tape = require('tape')
var toPX = require('../topx')
var parseUnit = require('parse-unit')
var almostEqual = require('almost-equal')
var units = ['em', 'ch', 'ex', 'rem', 'px', 'vw', 'vh', 'vmin', 'vmax', 'in', 'cm', 'mm', 'pt', 'pc']
var fontSizes = ['20px', '10px', '1em', '3in']
tape('test to-px', function(t) {
function testUnitsEmpirically(element) {
var testDiv = document.createElement('div')
element.appendChild(testDiv)
for(var i=0; i