chore: refactor sreenshot and add test (#3032)

- Refactor screenshot functionality into testable utility functions
- Add comprehensive test suite to catch regressions early
- Ensure functionality doesn't break unexpectedly without notification

--patch-1
based on review, make throw error naturally

---------

Co-authored-by: 李嘉图·M·路 <146103794+Ricardo-M-Zheng@users.noreply.github.com>
This commit is contained in:
zhizheng
2025-06-13 20:39:10 +02:00
committed by GitHub
co-authored by 李嘉图·M·路
parent e868a924fa
commit dd1721bce6
4 changed files with 132 additions and 22 deletions
+1
View File
@@ -55,6 +55,7 @@
"@preact/signals": "npm:@preact/signals@^2.0.4",
"esbuild": "npm:esbuild@0.25.4",
"esbuild-wasm": "npm:esbuild-wasm@0.25.4",
"@std/assert": "jsr:@std/assert@^1.0.16",
"@std/crypto": "jsr:@std/crypto@1",
"@std/datetime": "jsr:@std/datetime@^0.225.2",
"@std/encoding": "jsr:@std/encoding@1",