kopia lustrzana https://github.com/badgen/badgen
Update tests
rodzic
5ed00e9ff2
commit
5a993af466
|
@ -1,9 +1,9 @@
|
|||
const tap = require('tap')
|
||||
const { Arial12 } = require('../lib/calc-text-width.js')
|
||||
const { Verdana12 } = require('../lib/calc-text-width.js')
|
||||
|
||||
tap.test('calc width for "npm"', t => {
|
||||
t.ok(typeof Arial12 === 'function', 'export function: Arial12')
|
||||
t.ok(Number.isFinite(Arial12('npm')), 'result is a number')
|
||||
t.is(Arial12('npm'), 24.6, 'result is correct value')
|
||||
t.ok(typeof Verdana12 === 'function', 'export function: Verdana12')
|
||||
t.ok(Number.isFinite(Verdana12('npm')), 'result is a number')
|
||||
t.is(Verdana12('npm'), 26.77, 'result is correct value')
|
||||
t.end()
|
||||
})
|
||||
|
|
Ładowanie…
Reference in New Issue