Testing
Testing code and configuration
Unit tests
Run unit tests with npm test.
Note: ./test/models/AdobeApi-async.test.js tests the integration of the code with the Adobe User Management API. It requires a locally-created file, /config/test/adobe.testConf.js to have been prepared with an Adobe group using a real vendorGroupId; there are also some variables that must be set up with the email addresses of valid, current, local users. Create this file by copying the /config/test/adobe.testConf.sample.js file to /config/test/adobe.testConf.js and editing it with your local information.
Demo parts of the app
The demo folder contains a few command-line scripts that can be used to test parts of the app without running the whole thing.
node demo/libCalApi.js- test the LibCal APIthis script will prompt you with a list of software packages and ask you to select one; it will retrieve the current booking for that package and display the results
node demo/adobeApi.js- test the Adobe APIthis will let you fetch the list of current entitlements for a given license group, and add or subtract a user from that group
relies on the
config/appConf.jsfile to identify the license group to use, and on theconfig/adobe.jsfile to identify the API credentials
node demo/jamfApi.js- test the Jamf APIthis will let you fetch the list of current users in a given license group, and add or subtract a user from that group
relies on the
config/appConf.jsfile to identify the license group to use, and on theconfig/jamf.jsfile to identify the API credentials
Last updated