fix(tests): minio upload type is not exported anymore

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2024-09-12 16:53:04 +02:00
parent 57cba653e3
commit 21dcf0eb49
3 changed files with 5 additions and 13 deletions

View file

@ -42,7 +42,6 @@
"@node-rs/argon2": "1.8.3",
"@types/bcrypt": "5.0.2",
"@types/cron": "2.4.0",
"@types/minio": "7.1.0",
"@types/node-fetch": "2.6.11",
"@types/passport-http-bearer": "1.0.41",
"@zxcvbn-ts/core": "3.0.4",

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import * as MinioModule from 'minio';
import { Client, ClientOptions, UploadedObjectInfo } from 'minio';
import { Client, ClientOptions } from 'minio';
import { Mock } from 'ts-mockery';
import { MediaConfig } from '../../config/media.config';
@ -139,7 +139,10 @@ describe('s3 backend', () => {
const saveSpy = jest
.spyOn(mockedClient, 'putObject')
.mockImplementation(() =>
Promise.resolve(Mock.of<UploadedObjectInfo>({})),
Promise.resolve({
etag: 'mock',
versionId: 'mock',
}),
);
const sut = new S3Backend(mockedLoggerService, mediaConfig);

View file

@ -2522,7 +2522,6 @@ __metadata:
"@types/express-session": "npm:1.18.0"
"@types/jest": "npm:29.5.12"
"@types/markdown-it": "npm:13.0.7"
"@types/minio": "npm:7.1.0"
"@types/mysql": "npm:2.15.25"
"@types/node": "npm:20.16.2"
"@types/node-fetch": "npm:2.6.11"
@ -5283,15 +5282,6 @@ __metadata:
languageName: node
linkType: hard
"@types/minio@npm:7.1.0":
version: 7.1.0
resolution: "@types/minio@npm:7.1.0"
dependencies:
"@types/node": "npm:*"
checksum: 10c0/6399d6886564918528b19470317bde1551554e4ce3cc430712006f518585ca07dc80b4e1ab8d5da00ee4026983c6bb231a1eada92950c989f05cfb0a5ef6df0f
languageName: node
linkType: hard
"@types/mysql@npm:2.15.25":
version: 2.15.25
resolution: "@types/mysql@npm:2.15.25"