All files / test dataProvider.ts

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

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 28 29 30 31 32 33 34 35 36 37 38 39 402x         2x         2x 2x 2x 2x           2x 2x             2x 2x   2x 2x   2x 2x   2x 2x    
import {
    appInstall,
    DEFAULT_ACCESS_TOKEN,
    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 RecruiteeGetOffersBatch from '../src/Batch/RecruiteeGetOffersBatch';
import RecruiteeListCandidatesBatch from '../src/Batch/RecruiteeListCandidatesBatch';
import RecruiteeApplication, {
    API_TOKEN,
    NAME as RECRUITEE_APP,
    YOUR_COMPANY,
} from '../src/RecruiteeApplication';
 
export default function init(): void {
    appInstall(RECRUITEE_APP, DEFAULT_USER, {
        [CoreFormsEnum.AUTHORIZATION_FORM]: {
            [API_TOKEN]: DEFAULT_ACCESS_TOKEN,
            [YOUR_COMPANY]: 'your_company',
        },
    });
 
    const app = new RecruiteeApplication();
    container.setApplication(app);
 
    const listCandidates = new RecruiteeListCandidatesBatch();
    const getOffers = new RecruiteeGetOffersBatch();
 
    listCandidates.setSender(sender).setDb(db).setApplication(app);
    container.setBatch(listCandidates);
 
    getOffers.setSender(sender).setDb(db).setApplication(app);
    container.setBatch(getOffers);
}