Last round of prettier: npx prettier --write src/
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { compare_access_levels, process_permission_checks, access_level_order } from './ae_utils__perm_checks';
|
||||
import {
|
||||
compare_access_levels,
|
||||
process_permission_checks,
|
||||
access_level_order
|
||||
} from './ae_utils__perm_checks';
|
||||
|
||||
describe('Permission Hierarchy Tests', () => {
|
||||
describe('compare_access_levels', () => {
|
||||
@@ -15,7 +19,9 @@ describe('Permission Hierarchy Tests', () => {
|
||||
it('should correctly identify downgrades', () => {
|
||||
// Low to High should return -1
|
||||
expect(compare_access_levels('manager', 'super')).toBe(-1);
|
||||
expect(compare_access_levels('anonymous', 'authenticated')).toBe(-1);
|
||||
expect(compare_access_levels('anonymous', 'authenticated')).toBe(
|
||||
-1
|
||||
);
|
||||
});
|
||||
|
||||
it('should return 0 for equal levels', () => {
|
||||
@@ -25,7 +31,9 @@ describe('Permission Hierarchy Tests', () => {
|
||||
|
||||
it('should handle null/empty as anonymous', () => {
|
||||
expect(compare_access_levels('trusted', '')).toBe(1);
|
||||
expect(compare_access_levels(null as any, 'authenticated')).toBe(-1);
|
||||
expect(compare_access_levels(null as any, 'authenticated')).toBe(
|
||||
-1
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user