Skip to content

Commit

Permalink
fix: use node-fetch version @2 otherwise import fails with jest
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerm committed Nov 24, 2023
1 parent 5aa2461 commit b5d4f2c
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 233 deletions.
2 changes: 1 addition & 1 deletion TypeScript/app/d/rest-countries-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class RestCountriesAPI {
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));

try {
await sleep(5000);
await sleep(4000);
let res = await fetch(this.apiURL);
return await res.text();
} catch (error) {
Expand Down
189 changes: 63 additions & 126 deletions TypeScript/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion TypeScript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"chai": "^4.3.4",
"jest": "^27.3.1",
"mysql": "^2.18.1",
"node-fetch": "^3.3.2",
"node-fetch": "^2.7.0",
"source-map-support": "^0.5.20",
"ts-jest": "^27.0.7",
"ts-node": "^10.4.0",
Expand Down
2 changes: 1 addition & 1 deletion TypeScript/test/d/shipping-cost.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('ShippingCost Test', () => {
.then(val => console.log(val));
});

it('test ShippingCOst', () => {
it('test ShippingCost', () => {
let shippingCost = new ShippingCost();

return shippingCost.calculate({name: 'US'}, DeliveryOptions.Express)
Expand Down
Loading

0 comments on commit b5d4f2c

Please sign in to comment.