Files
speckle-server/packages/shared/src/core/constants.spec.ts
T
Gergő Jedlicska b7656c1a13 tests(shared/authz): (#4250)
* 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>
2025-03-24 16:03:22 +01:00

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)
})
})
})