diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-12-11 09:40:22 -0500 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-12-11 09:40:22 -0500 |
| commit | 3ae4f9352ee73a21581735883b4049327dce07bf (patch) | |
| tree | 6c24d2e14cf37474b6580d4b31cc4ec5ac215742 /package.json | |
| parent | e51ba6220576172b39d1a96a9ab4dfba87769428 (diff) | |
| download | ao-coverage-3ae4f9352ee73a21581735883b4049327dce07bf.tar.gz ao-coverage-3ae4f9352ee73a21581735883b4049327dce07bf.tar.bz2 ao-coverage-3ae4f9352ee73a21581735883b4049327dce07bf.zip | |
Add Jest to handle unit and integration testing
Wrote a couple of initial unit tests for some of the logic-heavy points
in the application, being logger.ts and formats.ts. Evidently colorize()
causes an error when transforming on the Format object that's returned.
Since that is specific to the Console transport anyways, I just moved it
to the transport, since the unit test was only testing the passed label
in the returned Formats object.
Also the bash template has some issues that I didn't test (oops), so
those are fixed now.
Diffstat (limited to 'package.json')
| -rw-r--r-- | package.json | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/package.json b/package.json index bd3d71a..1a11716 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "format": "prettier --write 'src/**/*.ts'", "lint": "eslint 'src/**/*.ts'", "lint:fix": "eslint --fix 'src/**/*.ts'", + "test": "tsc && jest", "tsc": "tsc" }, "author": "Kevin J Hoerr <kjhoerr@submelon.tech>", @@ -33,12 +34,20 @@ "winston": "^3.2.1" }, "devDependencies": { + "@types/jest": "^24.0.23", "@typescript-eslint/eslint-plugin": "^2.11.0", "@typescript-eslint/parser": "^2.11.0", "eslint": "^6.7.2", "eslint-config-prettier": "^6.7.0", "eslint-plugin-prettier": "^3.1.1", + "jest": "^24.9.0", "prettier": "^1.19.1", "tsc-watch": "^4.0.0" + }, + "jest": { + "testEnvironment": "node", + "roots": [ + "build/" + ] } } |
