aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml3
-rw-r--r--package.json2
-rw-r--r--test/data/vitest.options.config.json2
-rw-r--r--test/data/vitest.write.config.json2
-rw-r--r--test/dictionary-data.write.js2
5 files changed, 7 insertions, 4 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a9c56cdc..d8282632 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -73,6 +73,9 @@ jobs:
- name: Run unit tests
run: npm run test:unit
+ - name: Run unit tests (options)
+ run: npm run test:unit:options
+
test-build:
name: Test Build
runs-on: ubuntu-latest
diff --git a/package.json b/package.json
index 2012bc89..b9193a18 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,7 @@
"bench": "vitest bench",
"build": "node ./dev/bin/build.js",
"build:libs": "node ./dev/bin/build-libs.js",
- "test": "npm run test:js && npm run test:ts && npm run test:css && npm run test:html && npm run test:unit && npm run test:json && npm run test:md && npm run test:build",
+ "test": "npm run test:js && npm run test:ts && npm run test:css && npm run test:html && npm run test:unit && npm run test:unit:options && npm run test:json && npm run test:md && npm run test:build",
"test:fast": "npm run test:js && npm run test:ts && npm run test:unit && npm run test:json:format",
"test:static-analysis": "npm run test:js && npm run test:ts && npm run test:css && npm run test:html && npm run test:json && npm run test:md",
"test:js": "npx eslint . --ignore-pattern **/*.json",
diff --git a/test/data/vitest.options.config.json b/test/data/vitest.options.config.json
index e2bca721..88c6b5ec 100644
--- a/test/data/vitest.options.config.json
+++ b/test/data/vitest.options.config.json
@@ -1,7 +1,7 @@
{
"test": {
"include": [
- "../**/options-util.test.js"
+ "test/options-util.test.js"
]
}
}
diff --git a/test/data/vitest.write.config.json b/test/data/vitest.write.config.json
index 7de11ae9..f3016e5a 100644
--- a/test/data/vitest.write.config.json
+++ b/test/data/vitest.write.config.json
@@ -1,7 +1,7 @@
{
"test": {
"include": [
- "../**/*.write.js"
+ "test/*.write.js"
]
}
}
diff --git a/test/dictionary-data.write.js b/test/dictionary-data.write.js
index b271da57..16cb8d88 100644
--- a/test/dictionary-data.write.js
+++ b/test/dictionary-data.write.js
@@ -28,7 +28,7 @@ import {createFindKanjiOptions, createFindTermsOptions} from './utilities/transl
* @param {unknown} content
*/
function writeJson(fileName, content) {
- writeFileSync(fileName, JSON.stringify(content, null, 2));
+ writeFileSync(fileName, JSON.stringify(content, null, 2) + '\n');
}
const dirname = path.dirname(fileURLToPath(import.meta.url));