From 5a302aaabd5114333982435a02f267f36dfee0b3 Mon Sep 17 00:00:00 2001 From: "asamuzaK (Kazz)" Date: Sun, 17 Nov 2024 08:44:14 +0900 Subject: [PATCH] Bring back mocha --- package.json | 4 +++- test/color.test.js | 2 +- test/common.test.js | 2 +- test/index.test.js | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 21e2f66..206e732 100644 --- a/package.json +++ b/package.json @@ -24,12 +24,14 @@ }, "types": "types/index.d.ts", "devDependencies": { + "c8": "^10.1.2", "esbuild": "^0.24.0", "eslint": "^9.14.0", "eslint-plugin-import-x": "^4.4.2", "eslint-plugin-jsdoc": "^50.5.0", "eslint-plugin-regexp": "^2.6.0", "globals": "^15.12.0", + "mocha": "^10.8.2", "neostandard": "^0.11.8", "npm-run-all2": "^7.0.1", "sinon": "^19.0.2", @@ -41,7 +43,7 @@ "bundle-browser": "esbuild --format=esm --platform=browser --outfile=dist/esm/css-color.min.js --bundle --minify --sourcemap src/index.js", "bundle-cjs": "esbuild --format=cjs --platform=node --outfile=dist/cjs/css-color.min.cjs --bundle --minify --sourcemap src/index.js", "lint": "eslint --fix .", - "test": "node --test --experimental-test-coverage", + "test": "c8 --reporter=text mocha --exit test/**/*.test.js", "tsc": "node -e \"fs.rmSync('types',{recursive:true,force:true})\" && npx tsc" }, "version": "1.1.0" diff --git a/test/color.test.js b/test/color.test.js index 538785e..4baaff2 100644 --- a/test/color.test.js +++ b/test/color.test.js @@ -4,7 +4,7 @@ /* api */ import { strict as assert } from 'node:assert'; -import { describe, it } from 'node:test'; +import { describe, it } from 'mocha'; /* test */ import * as color from '../src/js/color.js'; diff --git a/test/common.test.js b/test/common.test.js index af79119..32c116f 100644 --- a/test/common.test.js +++ b/test/common.test.js @@ -4,7 +4,7 @@ /* api */ import { strict as assert } from 'node:assert'; -import { describe, it } from 'node:test'; +import { describe, it } from 'mocha'; /* test */ import * as common from '../src/js/common.js'; diff --git a/test/index.test.js b/test/index.test.js index 27ce257..3acee24 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -4,7 +4,7 @@ /* api */ import { strict as assert } from 'node:assert'; -import { describe, it } from 'node:test'; +import { describe, it } from 'mocha'; /* test */ import * as api from '../src/index.js';