@whook/whook
Version:
Build strong and efficient REST web services.
32 lines • 814 B
JavaScript
import { describe, test, beforeEach, jest, expect } from '@jest/globals';
import initAPMService from './apm.js';
describe('APM service', () => {
const log = jest.fn();
beforeEach(() => {
log.mockReset();
});
test('should work', async () => {
const apm = await initAPMService({ log });
apm('CALL', {
id: 'call_id',
});
expect({
logCalls: log.mock.calls.filter(([type]) => !type.endsWith('stack')),
}).toMatchInlineSnapshot(`
{
"logCalls": [
[
"debug",
"❤️ - Initializing the APM service.",
],
[
"info",
"CALL",
"{"id":"call_id"}",
],
],
}
`);
});
});
//# sourceMappingURL=apm.test.js.map