From 4ce80d0af8f53e93aa3a936b1ad4c5b6c065c881 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 27 Apr 2021 14:29:07 -0500 Subject: Add unit tests (#12) * start adding unit tests * add more to test/data/mojang.json * fix sending http requests in tests when it shouldn't * add a few more tests * try to add a github action to run tests * Update test.yml --- package.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index bc4b44d..42272c5 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Wrapper for the Hypixel SkyBlock API", "main": "index.ts", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", + "test": "mocha", "compile": "tsc", "start": "npm i --only=prod; node build/index.js" }, @@ -36,9 +36,13 @@ "devDependencies": { "@types/express": "^4.17.11", "@types/express-rate-limit": "^5.1.1", - "@types/node": "^14.14.41", + "@types/mocha": "^8.2.2", "@types/mongodb": "^3.6.12", + "@types/node": "^14.14.41", "@types/node-fetch": "^2.5.10", - "dotenv": "^8.2.0" + "dotenv": "^8.2.0", + "mocha": "^8.3.2", + "ts-node": "^9.1.1", + "typescript": "^4.2.4" } } -- cgit