Skip to content

Commit a4cc3e0

Browse files
committed
test: add test for bad cal access type
1 parent 0df61e5 commit a4cc3e0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/module.spec.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const { expect } = require('chai')
22
const {
33
askForFoldersAccess,
4+
askForCalendarAccess,
45
getAuthStatus,
56
askForPhotosAccess,
67
askForScreenCaptureAccess,
@@ -50,6 +51,14 @@ describe('node-mac-permissions', () => {
5051
})
5152
})
5253

54+
describe('askForCalendarAccess([accessLevel])', () => {
55+
it('should throw on invalid accessLevel', () => {
56+
expect(() => {
57+
askForCalendarAccess('bad-type')
58+
}).to.throw(/bad-type must be one of either 'write-only' or 'full'/)
59+
})
60+
})
61+
5362
describe('askForInputMonitoringAccess()', () => {
5463
it('should throw on invalid types', () => {
5564
expect(() => {

0 commit comments

Comments
 (0)