Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
import { describe, expect, it, vi } from 'vitest';
vi.mock('@features/gallery/utility', () => ({
galleryImageUrls: {
full: (imageName: string) => `/full/${imageName}`,
thumbnail: (imageName: string) => `/thumbnail/${imageName}`,
},
}));
import { getReferenceImageUrls } from './referenceImageUrls';
describe('reference image URLs', () => {
it('resolves URLs for the effective cropped image', () => {
expect(
getReferenceImageUrls({
crop: {
box: { height: 10, width: 10, x: 0, y: 0 },
image: { height: 10, image_name: 'crop.png', width: 10 },
ratio: 1,
},
original: { image: { height: 20, image_name: 'original.png', width: 20 } },
})
).toEqual({ imageUrl: '/full/crop.png', thumbnailUrl: '/thumbnail/crop.png' });
});
});