b7656c1a13
* test(shared): add more tests to auth policies * test(shared): add more tests to auth policies * chore(authz): fix export * chore(authz): test env fix * chore(authz): more test fixes --------- Co-authored-by: Charles Driesler <chuck@speckle.systems>
14 lines
379 B
TypeScript
14 lines
379 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { AllScopes, isScope } from './constants.js'
|
|
|
|
describe('Constants', () => {
|
|
describe('isScope', () => {
|
|
it.each(AllScopes)('should be valid for scope %', (scope) => {
|
|
expect(isScope(scope)).toBe(true)
|
|
})
|
|
it('should be invalid for scope', () => {
|
|
expect(isScope('invalid')).toBe(false)
|
|
})
|
|
})
|
|
})
|