0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-10 23:39:31 -05:00
verdaccio/packages/logger/logger-prettify/test/__snapshots__/formatter.spec.ts.snap
Michael Ryan cf1b46cc59
fix: log spacing depending on the FORMAT and COLORS options (#4631)
* fix: Bad log spacing depending on the FORMAT and COLORS options used

fixes: #4630

inserted a space between the timestamp and the message when logging timestamped messages.

* fix: Bad log spacing depending on the FORMAT and COLORS options used

fixes: #4630

removed padding of an unnecessary space (at the start or end of the log string, depending on whether colors are enabled).

* remove padLeft, update tests

* update logger-commons tests

---------

Co-authored-by: Marc Bernard <marc@marcbernardtools.com>
2024-06-01 21:35:06 +02:00

21 lines
1.4 KiB
Text

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`formatter printMessage should display a bytes request 1`] = `"fatal<-- 200, user: null(127.0.0.1), req: 'GET /verdaccio', bytes: 0/150186"`;
exports[`formatter printMessage should display a resource request 1`] = `"info <-- 127.0.0.1 requested 'GET /verdaccio'"`;
exports[`formatter printMessage should display a streaming request 1`] = `"fatal--> 304, req: 'GET https://registry.npmjs.org/verdaccio' (streaming)"`;
exports[`formatter printMessage should display an error request 1`] = `"fatal--> ERR, req: 'GET https://registry.fake.org/aaa', error: getaddrinfo ENOTFOUND registry.fake.org"`;
exports[`formatter printMessage should display an fatal request 1`] = `"fatal--> ERR, req: 'GET https://registry.fake.org/aaa', error: fatal error"`;
exports[`formatter printMessage should display config file 1`] = `"warn --- config file - /Users/user/.config/verdaccio/config/config.yaml"`;
exports[`formatter printMessage should display custom log message 1`] = `"fatal--- custom - foo - undefined"`;
exports[`formatter printMessage should display trace level 1`] = `"trace--- [trace] - foo"`;
exports[`formatter printMessage should display trace level with pretty stamp 1`] = `"[formatted-date] trace--- [trace] - foo"`;
exports[`formatter printMessage should display version and http address 1`] = `"warn --- http address - http://localhost:4873/ - verdaccio/5.0.0"`;