1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-07-15 01:24:25 +02:00

fixing linting erros. adding tslint to pretest

This commit is contained in:
Patrik J. Braun
2021-04-18 15:48:35 +02:00
parent 2223c87b9e
commit 085d7c2cd9
194 changed files with 3226 additions and 3277 deletions

View File

@ -28,7 +28,7 @@ describe('PhotoProcessing', () => {
{
const convertedPath = PhotoProcessing.generateConvertedPath(photoPath,
Config.Server.Media.Photo.Converting.resolution);
Config.Server.Media.Photo.Converting.resolution = <any>1;
Config.Server.Media.Photo.Converting.resolution = (1 as any);
expect(await PhotoProcessing.isValidConvertedPath(convertedPath)).to.be.false;
}
});
@ -37,13 +37,12 @@ describe('PhotoProcessing', () => {
it('should generate converted thumbnail path', async () => {
Config.load();
Config.Server.Media.Photo.Converting.resolution = <any>null;
Config.Server.Media.Photo.Converting.resolution = (null as any);
Config.Client.Media.Thumbnail.thumbnailSizes = [10, 20];
ProjectPath.ImageFolder = path.join(__dirname, './../../../assets');
const photoPath = path.join(ProjectPath.ImageFolder, 'test_png.png');
for (let i = 0; i < Config.Client.Media.Thumbnail.thumbnailSizes.length; ++i) {
const thSize = Config.Client.Media.Thumbnail.thumbnailSizes[i];
for (const thSize of Config.Client.Media.Thumbnail.thumbnailSizes) {
expect(await PhotoProcessing
.isValidConvertedPath(PhotoProcessing.generateConvertedPath(photoPath, thSize)))
.to.be.true;