We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6a829d commit 3c61214Copy full SHA for 3c61214
test/module.spec.js
@@ -6,6 +6,7 @@ const {
6
askForPhotosAccess,
7
askForScreenCaptureAccess,
8
askForInputMonitoringAccess,
9
+ askForLocationAccess,
10
} = require('../index')
11
12
describe('node-mac-permissions', () => {
@@ -82,4 +83,12 @@ describe('node-mac-permissions', () => {
82
83
}).to.throw(/openPreferences must be a boolean/)
84
})
85
86
+
87
+ describe('askForLocationAccess()', () => {
88
+ it('should throw on invalid accessLevel type', () => {
89
+ expect(() => {
90
+ askForLocationAccess('bad-type')
91
+ }).to.throw(/bad-type must be one of either 'when-in-use' or 'always'/)
92
+ })
93
94
0 commit comments