refactor: metadata stub (#17532)

This commit is contained in:
Jason Rasmussen
2025-04-10 15:58:55 -04:00
committed by GitHub
parent 0b22d3348e
commit 75c83cb704
2 changed files with 29 additions and 78 deletions

View File

@@ -1,71 +0,0 @@
import { ImmichTags } from 'src/repositories/metadata.repository';
import { personStub } from 'test/fixtures/person.stub';
export const metadataStub = {
empty: Object.freeze<ImmichTags>({}),
withFace: Object.freeze<ImmichTags>({
RegionInfo: {
AppliedToDimensions: {
W: 100,
H: 100,
Unit: 'normalized',
},
RegionList: [
{
Type: 'face',
Name: personStub.withName.name,
Area: {
X: 0.05,
Y: 0.05,
W: 0.1,
H: 0.1,
Unit: 'normalized',
},
},
],
},
}),
withFaceEmptyName: Object.freeze<ImmichTags>({
RegionInfo: {
AppliedToDimensions: {
W: 100,
H: 100,
Unit: 'normalized',
},
RegionList: [
{
Type: 'face',
Name: '',
Area: {
X: 0.05,
Y: 0.05,
W: 0.1,
H: 0.1,
Unit: 'normalized',
},
},
],
},
}),
withFaceNoName: Object.freeze<ImmichTags>({
RegionInfo: {
AppliedToDimensions: {
W: 100,
H: 100,
Unit: 'normalized',
},
RegionList: [
{
Type: 'face',
Area: {
X: 0.05,
Y: 0.05,
W: 0.1,
H: 0.1,
Unit: 'normalized',
},
},
],
},
}),
};