test: rebuildable bundles, npm test entry point

- esbuild alias fixed in the session/sysinfo/sftp test commands (they
  could not build at all), .sftp-svc.mjs build documented, real
  connection-stability assertions
- tests/build-bundles.cjs builds every bundle fresh; npm test runs the
  seven offline suites; esbuild pinned in devDependencies
- remove the assertion-less .exact-inline.mjs; ignore/clean test temp dirs
This commit is contained in:
Bill committed 2026-09-20 20:27:06 +08:00
1 parent 24f7e7c52a
commit cca4ba029a
12 files changed
+108 -92

No files matched your search

+5 -1
View File
@@ -14,7 +14,7 @@
* --alias:@shared=./src/shared
* node tests/settings-store.mjs
*/
import { mkdtempSync, readFileSync, existsSync, writeFileSync } from 'node:fs'
import { mkdtempSync, readFileSync, existsSync, rmSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { createRequire } from 'node:module'
@@ -111,5 +111,9 @@ console.log('[warnings log]')
ok(readFileSync(file, 'utf8').length === size, 'identical warnings are not appended twice')
}
// The store wrote settings into a temp userData dir; drop it so repeated runs do
// not litter %TEMP%.
rmSync(userData, { recursive: true, force: true })
console.log(failed === 0 ? '\n[settings] ALL CHECKS PASSED' : `\n[settings] ${failed} CHECK(S) FAILED`)
process.exit(failed === 0 ? 0 : 1)