From 174c3868c1c77fcb8b928372ef06dedfbb8f0e0f Mon Sep 17 00:00:00 2001 From: Will Hunt <will@half-shot.uk> Date: Thu, 18 Jun 2020 11:23:15 +0100 Subject: [PATCH] Update mocha to use config file --- .mocharc.yml | 6 ++++++ package.json | 10 +++++----- test/mocha.opts | 5 ----- 3 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 .mocharc.yml delete mode 100644 test/mocha.opts diff --git a/.mocharc.yml b/.mocharc.yml new file mode 100644 index 0000000..2596d01 --- /dev/null +++ b/.mocharc.yml @@ -0,0 +1,6 @@ +reporter: list +ui: bdd +require: + - "ts-node/register" + - "source-map-support/register" +recursive: true \ No newline at end of file diff --git a/package.json b/package.json index c7c222c..0f6c4cb 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "A bridge between Matrix and Discord", "main": "discordas.js", "scripts": { - "test": "npm run-script build && mocha --opts test/mocha.opts build/test/config.js build/test", + "test": "npm run-script build && mocha build/test/config.js build/test", "lint": "tslint --project ./tsconfig.json -t stylish", "coverage": "tsc && nyc mocha build/test/config.js build/test", "build": "tsc", @@ -55,11 +55,11 @@ }, "devDependencies": { "@istanbuljs/nyc-config-typescript": "^1.0.1", - "@types/chai": "^3.4.35", + "@types/chai": "^4.2.11", "@types/command-line-args": "^5.0.0", - "@types/js-yaml": "^3.12.1", - "@types/mime": "^2.0.1", - "@types/mocha": "^5.2.7", + "@types/js-yaml": "^3.12.4", + "@types/mime": "^2.0.2", + "@types/mocha": "^7.0.2", "@types/node": "^12", "@types/sqlite3": "^3.1.6", "chai": "^4.2.0", diff --git a/test/mocha.opts b/test/mocha.opts deleted file mode 100644 index c8a40c3..0000000 --- a/test/mocha.opts +++ /dev/null @@ -1,5 +0,0 @@ ---reporter list ---ui bdd ---require ts-node/register ---require source-map-support/register ---recursive -- GitLab