From b66897ccb14ab23b853edeb71cd5fbc170a062d6 Mon Sep 17 00:00:00 2001 From: "mike.collingwood" Date: Tue, 12 Nov 2024 11:20:04 +0000 Subject: [PATCH 1/2] BAU: Require ts-node/register for mocha to run unit tests in IntelliJ --- .mocharc.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.mocharc.yml b/.mocharc.yml index 42740626..1b39d0ca 100644 --- a/.mocharc.yml +++ b/.mocharc.yml @@ -1,4 +1,6 @@ fail-zero: false +require: + - ts-node/register spec: - 'src/**/*.test.ts' ignore: From 976cc32cd436bb0a00a4dafabd8299eef2b11d46 Mon Sep 17 00:00:00 2001 From: "mike.collingwood" Date: Tue, 12 Nov 2024 11:27:42 +0000 Subject: [PATCH 2/2] BAU: Remove mocha require ts-node/register from package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1e992689..a19bcc03 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,9 @@ "copy-images": "copyfiles -u 2 assets/images/** dist/public/images", "lint": "prettier --check src && eslint src/", "lint-fix": "prettier --write src && eslint --fix src/", - "test": "mocha --require ts-node/register", + "test": "mocha", "test:coverage": "nyc --reporter=lcov --reporter=text-summary npm test", - "test:watch": "mocha --require ts-node/register --watch", + "test:watch": "mocha --watch", "tsc": "tsc" }, "repository": {