style(image): apply Prettier formatting to ImageOperations test

Three lines in tests/main/ImageOperations.test.js (copied verbatim
from the task brief's sample) exceeded the project's 100-char width,
failing npm run format:check. Ran npm run format to auto-fix; no
behavioral change.

Amit Haridas
This commit is contained in:
2026-08-23 19:31:33 +05:30
parent 8bada008b3
commit 174eb3d6e9
+15 -3
View File
@@ -9,7 +9,9 @@ describe('ImageOperations', () => {
beforeEach(async () => { beforeEach(async () => {
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'imgops_')); tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'imgops_'));
inputPath = path.join(tmpDir, 'in.png'); inputPath = path.join(tmpDir, 'in.png');
await sharp({ create: { width: 100, height: 100, channels: 3, background: { r: 255, g: 0, b: 0 } } }) await sharp({
create: { width: 100, height: 100, channels: 3, background: { r: 255, g: 0, b: 0 } },
})
.png() .png()
.toFile(inputPath); .toFile(inputPath);
}); });
@@ -26,7 +28,13 @@ describe('ImageOperations', () => {
test('imageResize resizes to given width preserving aspect', async () => { test('imageResize resizes to given width preserving aspect', async () => {
const outputPath = path.join(tmpDir, 'out.png'); const outputPath = path.join(tmpDir, 'out.png');
await ImageOperations.imageResize({ inputPath, outputPath, width: 50, height: null, fit: 'inside' }); await ImageOperations.imageResize({
inputPath,
outputPath,
width: 50,
height: null,
fit: 'inside',
});
const meta = await sharp(outputPath).metadata(); const meta = await sharp(outputPath).metadata();
expect(meta.width).toBe(50); expect(meta.width).toBe(50);
}); });
@@ -48,7 +56,11 @@ describe('ImageOperations', () => {
test('executeOperation dispatches to the correct function', async () => { test('executeOperation dispatches to the correct function', async () => {
const outputPath = path.join(tmpDir, 'out.png'); const outputPath = path.join(tmpDir, 'out.png');
const result = await ImageOperations.executeOperation('rotate', { inputPath, outputPath, angle: 180 }); const result = await ImageOperations.executeOperation('rotate', {
inputPath,
outputPath,
angle: 180,
});
expect(result.success).toBe(true); expect(result.success).toBe(true);
}); });