hyperjumptech / monika

Monika is a command line application to monitor every part of your web app using a simple YAML configuration file. Get alert not only when your site is down but also when it's slow.
https://monika.hyperjump.tech
MIT License
605 stars 67 forks source link

Remove axios package #1314

Open irwansyahwii opened 4 months ago

irwansyahwii commented 4 months ago

Monika Pull Request (PR)

What feature/issue does this PR add

  1. Remove Axios and replace it with native fetch

How did you implement / how did you fix it

  1. Create an adapter httpClient to prevent big changes on the client codes

How to test

  1. npm run test
irwansyahwii commented 3 months ago

Hi @irwansyahwii, could you double check the test result? I ran the test locally and it failed. You can run the test locally by running

npm run test

One of the failed test is src/components/probe/prober/http/request.test.ts. You can run the failed test specifically by using

mocha --config .mocharc.json --forbid-only src/components/probe/prober/http/request.test.ts

I think the failed tests are blocking the github checks.

ok will do

irwansyahwii commented 3 months ago

Hi @irwansyahwii, could you double check the test result? I ran the test locally and it failed. You can run the test locally by running

npm run test

One of the failed test is src/components/probe/prober/http/request.test.ts. You can run the failed test specifically by using

mocha --config .mocharc.json --forbid-only src/components/probe/prober/http/request.test.ts

I think the failed tests are blocking the github checks.

ok will do

Fixed

irwansyahwii commented 3 months ago

The automated tests are not reliable. Sometimes it failed sometimes it succeed. Seems like there will be big architectural changes to fix it.