Skip to content

Commit

Permalink
chore(btw): Add try/cath debug
Browse files Browse the repository at this point in the history
  • Loading branch information
wisley7l committed Aug 24, 2023
1 parent d3bf591 commit f88629c
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions packages/apps/correios/tests/calculate-shipping.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ describe('Test Shipping Calculation in the Correios App', async () => {
const appId = 1248;

before(async () => {
req = await fetch(`${modulesUrl}/calculate_shipping?app_id=${appId}`, {
method: 'POST',
body: JSON.stringify(bodyCalculateShipping),
headers: {
'Content-Type': 'application/json',
},
});

data = (await req.json()).result;
try {
req = await fetch(`${modulesUrl}/calculate_shipping?app_id=${appId}`, {
method: 'POST',
body: JSON.stringify(bodyCalculateShipping),
headers: {
'Content-Type': 'application/json',
},
});

data = (await req.json()).result;
} catch (err) {
console.error(err);
}
console.log('>> ', req, ' ', data);
});

Expand Down

0 comments on commit f88629c

Please sign in to comment.