mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
refactor: improve tool processing, dropzone, seam carving, and format encoding
- Refactor use-tool-processor and use-pipeline-processor hooks - Enhance dropzone component with improved UX - Improve seam carving with better error handling and tests - Add JXL format encoding support to format-encoders - Update tool routes for consistent format handling - Add dropzone unit tests
This commit is contained in:
@@ -1307,11 +1307,10 @@ describe("seamCarve", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("rejects reductions larger than 75%", async () => {
|
||||
it("pre-resizes when reduction exceeds 75% instead of rejecting", async () => {
|
||||
// 800x600, requesting width: 100 => ratio 0.125 < 0.25
|
||||
await expect(seamCarve(INPUT_BUFFER, OUTPUT_DIR, { width: 100 })).rejects.toThrow(
|
||||
"cannot reduce dimensions by more than 75%",
|
||||
);
|
||||
// Should succeed by pre-resizing to bring within 75% limit
|
||||
await expect(seamCarve(INPUT_BUFFER, OUTPUT_DIR, { width: 100 })).resolves.toBeDefined();
|
||||
});
|
||||
|
||||
it("uses original dimensions when width/height not specified", async () => {
|
||||
|
||||
Reference in New Issue
Block a user