UNPKG

selva-riskeval

Version:

Testing One MGA sdk creation

36 lines (29 loc) 875 B
const {InsuranceRiskEval ,InsuranceProduct} = require('../src/index'); const data = require('./data/risk-eval.json') describe('Risk Evaluation ', () => { beforeAll(()=>{ riskEval= new InsuranceRiskEval('API-KEY') }) test.skip('assess the risk',async () => { try{ let id = await riskEval.assesRisk(data) console.log(id); expect(1).toBe(1) }catch(e){ expect(e).toMatch('error') } }); }); describe('Test Product API',()=>{ beforeAll(()=>{ productApi = new InsuranceProduct('API-KEY') }) test('get the product by ID : FLR100007' , async () =>{ try{ let product = await productApi.getProductById('FLR100007') console.log({product}) }catch(e){ expect(e).toMatch('error') } }) })