Admin-teksten en merklogo: Weergavenaam, Wachtwoord wijzigen, Eerste account aanmaken, logo per thema
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { getBrand, themeLogo } from '@/lib/brand';
|
||||
|
||||
describe('themeLogo', () => {
|
||||
it('points at the emitted logo files under the app base path', () => {
|
||||
expect(themeLogo(true, '/admin/')).toEqual({
|
||||
onLight: '/admin/brand-logo-on-light.png',
|
||||
onDark: '/admin/brand-logo-on-dark.png',
|
||||
});
|
||||
});
|
||||
|
||||
it('tolerates a base without trailing slash and the dev root', () => {
|
||||
expect(themeLogo(true, '/admin')?.onLight).toBe('/admin/brand-logo-on-light.png');
|
||||
expect(themeLogo(true, '/')?.onDark).toBe('/brand-logo-on-dark.png');
|
||||
});
|
||||
|
||||
it('has no logo when the theme ships none', () => {
|
||||
expect(themeLogo(false)).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe('getBrand', () => {
|
||||
it('has no logo without a theme (the default admin is unchanged)', () => {
|
||||
expect(getBrand().logo).toBeNull();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user