1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-12-07 23:23:49 +02:00

Enforcing faces support in metadata loader tests

This commit is contained in:
Patrik J. Braun
2021-05-11 16:44:17 +02:00
parent f853efa3c1
commit 94d57cf6a1
3 changed files with 24 additions and 5 deletions

View File

@@ -5,10 +5,20 @@ import * as path from 'path';
import * as fs from 'fs';
import {PhotoProcessing} from '../../../../../src/backend/model/fileprocessing/PhotoProcessing';
import {Config} from '../../../../../src/common/config/private/Config';
import {DatabaseType} from '../../../../../src/common/config/private/PrivateConfig';
declare const before: any;
describe('MetadataLoader', () => {
// loading default settings (this might have been changed by other tests
Config.loadSync();
// loading default settings (this might have been changed by other tests)
before(() => {
Config.loadSync();
Config.Server.Database.type = DatabaseType.sqlite;
Config.Client.Faces.enabled = true;
Config.Client.Faces.keywordsToPersons = true;
});
it('should load png', async () => {
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/test_png.png'));