fix: gate ADMIN_EMAIL test with explicit skip
This commit is contained in:
@@ -28,9 +28,11 @@ describe('isAdminUser', () => {
|
||||
|
||||
it('returns true when email matches ADMIN_EMAIL', () => {
|
||||
const adminEmail = process.env.ADMIN_EMAIL
|
||||
if (adminEmail) {
|
||||
expect(isAdminUser({ email: adminEmail })).toBe(true)
|
||||
if (!adminEmail) {
|
||||
console.warn('ADMIN_EMAIL not set, skipping')
|
||||
return
|
||||
}
|
||||
expect(isAdminUser({ email: adminEmail })).toBe(true)
|
||||
})
|
||||
|
||||
it('returns false for null/undefined user', () => {
|
||||
|
||||
Reference in New Issue
Block a user