pull/3/head
Amio 2018-06-29 21:40:55 +08:00
rodzic b7c0ad38c0
commit 3b0914e5d2
2 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -17,7 +17,6 @@ function calcWidth (charWidthTable) {
charCode = text[i].charCodeAt()
total += widthTable[charCode < 127 ? charCode : 64] // "@" for overflows
}
console.log(total)
return total
}
}

Wyświetl plik

@ -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()
})