kopia lustrzana https://github.com/badgen/badgen
Update test
rodzic
b7c0ad38c0
commit
3b0914e5d2
|
@ -17,7 +17,6 @@ function calcWidth (charWidthTable) {
|
|||
charCode = text[i].charCodeAt()
|
||||
total += widthTable[charCode < 127 ? charCode : 64] // "@" for overflows
|
||||
}
|
||||
console.log(total)
|
||||
return total
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,5 +5,6 @@ tap.test('calc width for "npm"', t => {
|
|||
t.ok(typeof Arial12 === 'function', 'export function: Arial12')
|
||||
t.ok(Number.isFinite(Arial12('npm')), 'result is number')
|
||||
t.ok(Arial12('npm') > 0, 'result is positive number')
|
||||
t.ok(Arial12('npm') === 24.543750000000003, 'result is correct value')
|
||||
t.end()
|
||||
})
|
||||
|
|
Ładowanie…
Reference in New Issue