-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: Convert CommonJS to ECMAScript Modules (ESM) #1341
base: main
Are you sure you want to change the base?
Conversation
…230/refactor-migrate-to-esm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This reverts commit 389e279.
Monika will crash when assertion get triggered Steps to reproduce
probes:
- id: 'http-1'
name: 'status-401-test'
interval: 1
requests:
- url: https://httpbin.org/status/401
method: PATCH
alerts:
- assertion: response.status > 200
message: HTTP Status is not 200
- assertion: response.time > 2000
message: Too sloow
notifications:
- id: desktop
type: desktop
> @hyperjumptech/monika@1.21.2 start
> npm run prepack && ./bin/dev.js --config monika.yml -r 1
> @hyperjumptech/monika@1.21.2 prepack
> npm run clean && tsc -b && oclif manifest
> @hyperjumptech/monika@1.21.2 clean
> rm -rf coverage lib tsconfig.tsbuildinfo oclif.manifest.json
wrote manifest to /Users/nrsys/Projects/hyperjump/monika/oclif.manifest.json
Starting Monika. Probes: 1. Notifications: 1
INFO: Monika is running.
INFO: Using config file: /Users/nrsys/Projects/hyperjump/monika/monika.yml
WARN: 2025-01-29T16:11:22.473Z 1 id:http-1 Probe assertion failed. Will try again. Attempt (1) with incident threshold (5).
WARN: 2025-01-29T16:11:25.087Z 1 id:http-1 Probe assertion failed. Will try again. Attempt (2) with incident threshold (5).
WARN: 2025-01-29T16:11:27.523Z 1 id:http-1 Probe assertion failed. Will try again. Attempt (3) with incident threshold (5).
WARN: 2025-01-29T16:11:30.497Z 1 id:http-1 Probe assertion failed. Will try again. Attempt (4) with incident threshold (5).
INFO: 2025-01-29T16:11:39.436Z - Connected to STUN Server. Monika is running.
WARN: 2025-01-29T16:11:44.861Z 1 id:http-1 ASSERTION: response.status > 200, NOTIF: Service probably down
file:///Users/nrsys/Projects/hyperjump/monika/src/components/notification/alert-message.ts:53
}
^
TypeError: Handlebars.compile is not a function
at getExpectedMessage (file:///Users/nrsys/Projects/hyperjump/monika/src/components/notification/alert-message.ts:53:23)
at getMessageForAlert (file:///Users/nrsys/Projects/hyperjump/monika/src/components/notification/alert-message.ts:85:29)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async sendAlerts (file:///Users/nrsys/Projects/hyperjump/monika/src/components/notification/index.ts:30:21)
at async HTTPProber.sendNotification (file:///Users/nrsys/Projects/hyperjump/monika/src/components/probe/prober/index.ts:164:9) ExpectationMonika will send notification Platform Info
|
Solved with the latest commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
postpone merge, waiting for:
|
|
Monika Pull Request (PR)
What feature/issue does this PR add
How did you implement / how did you fix it
.mocharc.json
How to test
npm ci
andnpm run build -w packages/notification
npm run test
and see the tests is run successfully like beforenpm start
and see that the apps is running okNotes
.mocharc.json
because i am stuck to do stub/spy test that are using 3rd party library.