logtail / logtail-js

Better Stack JavaScript client
https://betterstack.com/logs
ISC License
54 stars 13 forks source link

Improve tests #83

Closed PetrHeinz closed 1 year ago

PetrHeinz commented 1 year ago

Improves tests by ensuring they will fail during an unexpected exception, and by using jsdom test environment for Browser tests.

Previously, nock was not working correctly and tests were making actual requests to Better Stack. The requests failed (401 Unauthorized), but the exception was ignored and tests passed.

Also, tests currently do not output anything apart from test results (no console output seeps through)