Files
Move/package.json
T
nokeo08 1a857de5ed Add Bun tests for resolveConfig and loadConfigFile
Two new test files exercise the layered config resolver and the JSON
config-file loader:

  src/config.test.ts        25 cases:
    - resolveConfig precedence (CLI > file > default) per field
    - seconds-to-ms conversion at the resolver boundary
    - verbose precedence across all four cells
    - defaultConfigPath: XDG honored, HOME fallback, empty-as-unset,
      throws CliError when both are missing

  src/configFile.test.ts    11 cases:
    - valid file -> overrides, with undefined for unspecified keys
    - missing explicit path throws
    - malformed JSON / non-object root throws with file path
    - unknown key / wrong type / non-positive number all throw with
      the offending key named
    - default path missing -> null (silent default)

Runs via 'bun test' (or 'bun run test', now wired in package.json).
All 25 tests pass on the current codebase.
2026-06-17 16:34:27 -05:00

25 lines
417 B
JSON

{
"name": "move",
"version": "1.0.0",
"private": true,
"license": "GPL-3.0-only",
"type": "module",
"bin": {
"move": "./src/move.ts"
},
"engines": {
"bun": ">=1.0.0"
},
"scripts": {
"start": "bun run src/move.ts",
"test": "bun test"
},
"dependencies": {
"@nut-tree-fork/nut-js": "^4.2.2"
},
"devDependencies": {
"@types/bun": "latest",
"typescript": "^5"
}
}