forked from abhaybuch/node-mac-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
36 lines (30 loc) · 1.15 KB
/
test.js
File metadata and controls
36 lines (30 loc) · 1.15 KB
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
28
29
30
31
32
33
34
35
36
// Import the package
const utils = require('./index.js');
// Test function to run all checks
async function runTests() {
console.log('Running on platform:', process.platform);
try {
// Test getRunningInputAudioProcesses
console.log('\nTesting getRunningInputAudioProcesses:');
const processes = utils.getRunningInputAudioProcesses();
console.log('Audio processes:', processes);
// Test platform-specific functions
if (process.platform === 'darwin') {
console.log('\nTesting Mac-specific functions:');
console.log('makeKeyAndOrderFront available:', !!utils.makeKeyAndOrderFront);
} else if (process.platform === 'win32') {
console.log('\nTesting Windows-specific functions:');
// Add any Windows-specific function tests here
} else {
console.log('Unsupported platform');
}
// Log all available exports
console.log('\nAll available exports:');
console.log(Object.keys(utils));
} catch (error) {
console.error('Test failed:', error);
process.exit(1);
}
}
// Run the tests
runTests();