Key Unit Tests
  • 09 Nov 2022
  • Dark
    Light
  • PDF

Key Unit Tests

  • Dark
    Light
  • PDF

Article Summary

Unit tests are invaluable; they are designed to help minimize the possibility of issues when integrating with IAP or the other system. The are also used to verify that the adapter and adapter libraries are integratedd properly and returning the information that is supposed to be returned.

Some of the Key Unit Tests include:

  • Pronghorn Test: This unit test will check if the pronghorn.json exists, that it has been customized for the adapter, and the adapter.js methods and pronghorn.json methods are in sync and all parameters match. This test reduces the risk of issues in the IAP Automation Studio when using the adapter tasks.
  • Check Action Files Test: This unit test will check if the checkActionFiles method exists and will check all the action files against the actionSchema (done within the adapter library). This test will also check that the referenced files exist. This test prevents possible issues with actions not working later.

Example: Unit Test

describe('pronghorn.json', () => {
  it('should have a pronghorn.json', (done) => {
  it('pronghorn.json should be customized', (done) => {
  it('pronghorn.json should only expose workflow functions', (done) => {
  it('pronghorn.json should expose all workflow functions', (done) => {

describe('#checkActionFiles', () => {
  it('should have a checkActionFiles function', (done) => {
  it('the action files should be good - if failure change the log level as most issues are warnings', (done) => {

There are many more unit tests, some are generic for all adapters and others have been added to check that specific calls that were built for the adapter are returning proper errors when parameters are not being passed in with valid information.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.