forked from Gitlawb/openclaude
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathallowBypassPermissionsMode.test.ts
More file actions
27 lines (24 loc) · 962 Bytes
/
Copy pathallowBypassPermissionsMode.test.ts
File metadata and controls
27 lines (24 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { describe, test, expect } from 'bun:test'
describe('SettingsSchema allowBypassPermissionsMode', () => {
test('accepts allowBypassPermissionsMode: true', async () => {
const { SettingsSchema } = await import('./types.js')
const result = SettingsSchema().safeParse({
permissions: { allowBypassPermissionsMode: true },
})
expect(result.success).toBe(true)
})
test('accepts allowBypassPermissionsMode: false', async () => {
const { SettingsSchema } = await import('./types.js')
const result = SettingsSchema().safeParse({
permissions: { allowBypassPermissionsMode: false },
})
expect(result.success).toBe(true)
})
test('rejects non-boolean allowBypassPermissionsMode', async () => {
const { SettingsSchema } = await import('./types.js')
const result = SettingsSchema().safeParse({
permissions: { allowBypassPermissionsMode: 'yes' },
})
expect(result.success).toBe(false)
})
})