From 156018ab0729d359531c42c77828449052b8de84 Mon Sep 17 00:00:00 2001 From: "Kees C. Bakker" Date: Wed, 1 May 2024 06:46:52 +0000 Subject: [PATCH] `mocha.opts` is out of support since v8 Now it works with the dev container. --- .devcontainer/Dockerfile | 2 +- .mocharc.json | 9 +++++++++ package.json | 4 ++-- test/mocha.opts | 6 ------ 4 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 .mocharc.json delete mode 100644 test/mocha.opts diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1713208..09cc3a5 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,7 @@ FROM mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye # Install the npm packages globally -RUN npm install -g npm \ +RUN npm install -g npm@10.7.0 \ && npm install -g npm-check-updates COPY ./startup.sh / diff --git a/.mocharc.json b/.mocharc.json new file mode 100644 index 0000000..0437f63 --- /dev/null +++ b/.mocharc.json @@ -0,0 +1,9 @@ +{ + "reporter": "spec", + "color": true, + "full-trace": true, + "experimental-fetch": false, + "timeout": 200, + "spec": "test/**/*-test.js" + } + \ No newline at end of file diff --git a/package.json b/package.json index f1730fc..7e750b1 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,8 @@ }, "main": "index.js", "scripts": { - "test": "mocha \"test/**/*.js\" --reporter spec --no-experimental-fetch --timeout 200", - "test-with-coverage": "nyc --reporter=text mocha \"test/**/*.js\" --reporter spec", + "test": "mocha", + "test-with-coverage": "nyc --reporter=text mocha", "bootstrap": "script/bootstrap", "prepare": "husky", "lint": "eslint src/ test/" diff --git a/test/mocha.opts b/test/mocha.opts deleted file mode 100644 index e664d3a..0000000 --- a/test/mocha.opts +++ /dev/null @@ -1,6 +0,0 @@ ---reporter spec ---colors ---full-trace ---no-experimental-fetch ---timeout 200 -