0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-03 14:52:38 +00:00

Fix remaining jest issues

This commit is contained in:
David Bolack
2024-03-06 23:27:43 -06:00
parent eb4ecf853b
commit e487f9a951
4 changed files with 425 additions and 542 deletions

View File

@@ -287,6 +287,9 @@ describe('Tests for api', ()=>{
thumbnail : '',
textBin : undefined,
version : undefined,
userThemes : {
Brew: {}
},
createdAt : undefined,
gDrive : false,
style : undefined,
@@ -581,7 +584,7 @@ brew`);
api.getBrewThemeWithCSS(req, res);
const sent = res.send.mock.calls[0][0];
expect(sent).toBe(`// From Theme: test brew\n\n@import /api/css/V3/5ePHB/styles.css\n\nI Have a style!`);
expect(sent).toBe(`@import url("/css/V3/5ePHB");\n\n/* From Brew: test brew*/\n\nI Have a style!`);
expect(res.status).toHaveBeenCalledWith(200);
});
});
@@ -597,7 +600,7 @@ brew`);
api.getBrewThemeWithCSS(req, res);
const sent = res.send.mock.calls[0][0];
expect(sent).toBe(`// From Theme: test brew\n\n@import /api/css/IamATheme\n\nI Have a style!`);
expect(sent).toBe(`@import url("/css/IamATheme");\n\n/* From Brew: test brew*/\n\nI Have a style!`);
expect(res.status).toHaveBeenCalledWith(200);
});
});