fix: gate ADMIN_EMAIL test with explicit skip

This commit is contained in:
Kirill
2026-05-22 18:25:22 +05:00
parent 6b89f42269
commit 55dc58cff8
+4 -2
View File
@@ -28,9 +28,11 @@ describe('isAdminUser', () => {
it('returns true when email matches ADMIN_EMAIL', () => { it('returns true when email matches ADMIN_EMAIL', () => {
const adminEmail = process.env.ADMIN_EMAIL const adminEmail = process.env.ADMIN_EMAIL
if (adminEmail) { if (!adminEmail) {
expect(isAdminUser({ email: adminEmail })).toBe(true) console.warn('ADMIN_EMAIL not set, skipping')
return
} }
expect(isAdminUser({ email: adminEmail })).toBe(true)
}) })
it('returns false for null/undefined user', () => { it('returns false for null/undefined user', () => {