mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 16:22:44 +00:00
Rework detection of user brews to look up themeid in static themes list before assuming is a user brew.
Ended up being a fairly straightforward change. A few ternaries got smooshed or inverted. Passes builtin and local tests. Need to compare on the test instance.
This commit is contained in:
@@ -604,7 +604,7 @@ brew`);
|
||||
describe('getBrewThemeWithUserParent', ()=>{
|
||||
it('should collect parent theme and brew style - returning as css with user-theme parent imported.', async ()=>{
|
||||
const toBrewPromise = (brew)=>new Promise((res)=>res({ toObject: ()=>brew }));
|
||||
model.get = jest.fn(()=>toBrewPromise({ title: 'test brew', renderer: 'V3', shareId: 'iAmAUserTheme', theme: '#IamATheme', style: 'I Have a style!' }));
|
||||
model.get = jest.fn(()=>toBrewPromise({ title: 'test brew', renderer: 'V3', shareId: 'iAmAUserTheme', theme: 'IamATheme', style: 'I Have a style!' }));
|
||||
const fn = api.getBrew('share', true);
|
||||
const req = { brew: {}, get: ()=>{return 'localhost';}, protocol: 'https' };
|
||||
const next = jest.fn();
|
||||
|
||||
Reference in New Issue
Block a user