mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-23 17:01:00 -05:00
16 lines
479 B
TypeScript
16 lines
479 B
TypeScript
|
import {
|
||
|
CONSOLE_LOGGER,
|
||
|
PROCESS_LOGGER,
|
||
|
getDefaultLogger,
|
||
|
} from "@/utils/logging/logger";
|
||
|
|
||
|
describe("getDefaultLogger", () => {
|
||
|
test("returns PROCESS_LOGGER if we are in a GitHub Actions environment", () => {
|
||
|
expect(getDefaultLogger({ GITHUB_ACTIONS: "true" })).toBe(PROCESS_LOGGER);
|
||
|
});
|
||
|
|
||
|
test("returns CONSOLE_LOGGER if we are not in a GitHub Actions environment", () => {
|
||
|
expect(getDefaultLogger({})).toBe(CONSOLE_LOGGER);
|
||
|
});
|
||
|
});
|