1.38.0 • Published 4 years ago

@tomfrenken/test-util v1.38.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 years ago

@tomfrenken/test-util

Package that contains utility functions for testing, like loading credentials or creating test destinations.

Installation

$ npm install @tomfrenken/test-util

Usage

The test-util package makes writing tests for your SAP Cloud Platform application more convenient.

For example, you can create a mock destination for your tests by using the function mockTestDestination.

import { mockTestDestination } from '@tomfrenken/util';
mockTestDestination('mockDestinationName');

You need to save your system information in local file systems.json:

{
    "systems": [
        {
            "alias": "mockDestinationName",
            "uri": "https://www.example.com"
        }
    ]
}

and credentials.json:

{
  "credentials": [
    {
      "alias": "SYS_001",
      "username": "username",
      "password": "password"
    }
  ]
}

Documentation

Getting started guide API documentation

Helpful Links