mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
🛠️ fix: Ensure imageOutputType
is Always Defined (#2438)
* avatar fix * chore: ensure `imageOutputType` is always defined * ci(AppService): extra test for default value * chore: replace default value for `desiredFormat` with `EImageOutputType` enum
This commit is contained in:
parent
bf4e64ce63
commit
3c184e9410
3 changed files with 15 additions and 5 deletions
|
@ -139,7 +139,6 @@ describe('AppService', () => {
|
|||
);
|
||||
|
||||
await AppService(app);
|
||||
|
||||
expect(app.locals.imageOutputType).toEqual(EImageOutputType.WEBP);
|
||||
});
|
||||
|
||||
|
@ -151,7 +150,15 @@ describe('AppService', () => {
|
|||
);
|
||||
|
||||
await AppService(app);
|
||||
expect(app.locals.imageOutputType).toEqual(EImageOutputType.PNG);
|
||||
});
|
||||
|
||||
it('should default to `PNG` `imageOutputType` with no provided config', async () => {
|
||||
require('./Config/loadCustomConfig').mockImplementationOnce(() =>
|
||||
Promise.resolve(undefined),
|
||||
);
|
||||
|
||||
await AppService(app);
|
||||
expect(app.locals.imageOutputType).toEqual(EImageOutputType.PNG);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue