File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 1
1
const { expect } = require ( 'chai' )
2
- const { askForFoldersAccess, getAuthStatus, askForScreenCaptureAccess } = require ( '../index' )
2
+ const {
3
+ askForFoldersAccess,
4
+ getAuthStatus,
5
+ askForPhotosAccess,
6
+ askForScreenCaptureAccess,
7
+ askForInputMonitoringAccess,
8
+ } = require ( '../index' )
3
9
4
10
describe ( 'node-mac-permissions' , ( ) => {
5
11
describe ( 'getAuthStatus()' , ( ) => {
@@ -44,6 +50,22 @@ describe('node-mac-permissions', () => {
44
50
} )
45
51
} )
46
52
53
+ describe ( 'askForInputMonitoringAccess()' , ( ) => {
54
+ it ( 'should throw on invalid types' , ( ) => {
55
+ expect ( ( ) => {
56
+ askForInputMonitoringAccess ( 'bad-type' )
57
+ } ) . to . throw ( / b a d - t y p e m u s t b e o n e o f e i t h e r ' l i s t e n ' o r ' p o s t ' / )
58
+ } )
59
+ } )
60
+
61
+ describe ( 'askForPhotosAccess()' , ( ) => {
62
+ it ( 'should throw on invalid types' , ( ) => {
63
+ expect ( ( ) => {
64
+ askForPhotosAccess ( 'bad-type' )
65
+ } ) . to . throw ( / b a d - t y p e m u s t b e o n e o f e i t h e r ' a d d - o n l y ' o r ' r e a d - w r i t e ' / )
66
+ } )
67
+ } )
68
+
47
69
describe ( 'askForScreenCaptureAccess()' , ( ) => {
48
70
it ( 'should throw on invalid openPreferences type' , ( ) => {
49
71
expect ( ( ) => {
You can’t perform that action at this time.
0 commit comments