nightingale 18.1.0 → 18.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,7 @@
1
- import { LoggerCLIString } from "./LoggerCLI.ts";
1
+ import { afterAll, beforeEach, describe, expect, test, vi } from "vitest";
2
+ import { LoggerCLI } from "./LoggerCLI.ts";
2
3
 
3
- const consoleLogSpy = import.meta.jest
4
- .spyOn(console, "log")
5
- .mockImplementation(() => {});
4
+ const consoleLogSpy = vi.spyOn(console, "log").mockImplementation(() => {});
6
5
 
7
6
  describe("LoggerCLI", () => {
8
7
  beforeEach(() => {
@@ -12,12 +11,12 @@ describe("LoggerCLI", () => {
12
11
  consoleLogSpy.mockRestore();
13
12
  });
14
13
 
15
- test("LoggerCLIString", () => {
16
- import.meta.jest.useFakeTimers({
14
+ test("LoggerCLI", () => {
15
+ vi.useFakeTimers({
17
16
  now: new Date("2023-10-01T10:57:49.000Z"),
18
17
  });
19
18
 
20
- const logger = new LoggerCLIString("test", { noColor: true });
19
+ const logger = new LoggerCLI("test", { noColor: true });
21
20
  logger.info("Test message", { key: "value" });
22
21
 
23
22
  expect(consoleLogSpy).toHaveBeenCalledWith(
@@ -25,16 +24,14 @@ describe("LoggerCLI", () => {
25
24
  );
26
25
  });
27
26
 
28
- test("LoggerCLIString JSON", () => {
29
- import.meta.jest.useFakeTimers({
27
+ test("LoggerCLI JSON", () => {
28
+ vi.useFakeTimers({
30
29
  now: new Date("2023-10-01T10:57:49.000Z"),
31
30
  });
32
31
 
33
- const consoleLogSpy = import.meta.jest
34
- .spyOn(console, "log")
35
- .mockImplementation(() => {});
32
+ const consoleLogSpy = vi.spyOn(console, "log").mockImplementation(() => {});
36
33
 
37
- const logger = new LoggerCLIString("test", { noColor: true, json: true });
34
+ const logger = new LoggerCLI("test", { noColor: true, json: true });
38
35
 
39
36
  logger.info("Test message", { key: "value" });
40
37
 
@@ -5,7 +5,6 @@ import { ConsoleCLIHandler } from "../handlers/ConsoleCLIHandler.ts";
5
5
 
6
6
  export interface LoggerCLIOptions {
7
7
  displayName?: string;
8
- handlers?: Handler[];
9
8
  processors?: Processor[];
10
9
  json?: boolean;
11
10
  noColor?: boolean;
@@ -106,18 +105,3 @@ export class LoggerCLI extends Logger {
106
105
  console.log();
107
106
  }
108
107
  }
109
-
110
- export class LoggerCLIString extends LoggerCLI {
111
- constructor(
112
- key: string,
113
- {
114
- displayName,
115
- handlers,
116
- processors,
117
- json = false,
118
- noColor = false,
119
- }: LoggerCLIOptions = {},
120
- ) {
121
- super(key, { displayName, handlers, processors, json, noColor });
122
- }
123
- }