Migrate unit tests to TypeScript (#12)

* Add type information for utils
* Enable "strictNullChecks" and "noImplicitAny"
* Replace mocha with jest
* Fix #11
* Refactor and add tests for 100% code coverage
* Mention --coverage option in README
* Travis: remove node v9 and add node v10 and v12
* Improvements per review by @keefertaylor

Node.js v6 throws "Invalid hex string" if the hex string has an odd number
of characters (two hex characters per byte means the string should
have an even length). This changed in later versions of Node.js.
This commit is contained in:
Elliot Lee
2019-09-24 15:33:30 -07:00
parent d97f9de122
commit 7f9efe9e71
14 changed files with 3831 additions and 780 deletions

View File

@@ -0,0 +1,8 @@
module.exports = {
"roots": [
"<rootDir>/src"
],
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
}