All files / test dataProvider.ts

100% Statements 12/12
100% Branches 0/0
100% Functions 1/1
100% Lines 12/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 281x 1x     1x 1x 1x   1x 1x             1x 1x   1x   1x       1x    
import { appInstall, DEFAULT_USER } from '@orchesty/nodejs-connectors/test/DataProvider';
import {
    container, db, sender,
} from '@orchesty/nodejs-connectors/test/TestAbstract';
import CoreFormsEnum from '@orchesty/nodejs-sdk/dist/lib/Application/Base/CoreFormsEnum';
import CustomerIoAddCustomer from '../src/Connector/CustomerIoAddCustomer';
import CustomerIoApplication, { API_KEY, NAME, SITE_ID } from '../src/CustomerIoApplication';
 
export default function init(): void {
    appInstall(NAME, DEFAULT_USER, {
        [CoreFormsEnum.AUTHORIZATION_FORM]: {
            [SITE_ID]: 'site_id',
            [API_KEY]: 'api_key',
        },
    });
 
    const app = new CustomerIoApplication();
    container.setApplication(app);
 
    const addCustomer = new CustomerIoAddCustomer();
 
    addCustomer
        .setSender(sender)
        .setDb(db)
        .setApplication(app);
    container.setConnector(addCustomer);
}