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', () => {
|
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', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user