test(eoc-push): använd BRAND.name istället för hårdkodat Cibello
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { describe, expect, it, beforeAll, afterAll, vi } from "vitest";
|
import { describe, expect, it, beforeAll, afterAll, vi } from "vitest";
|
||||||
import IORedis from "ioredis";
|
import IORedis from "ioredis";
|
||||||
|
import BRAND from "../../../../brand.config.json" with { type: "json" };
|
||||||
import { pushOpsSummaryToEoc } from "../src/processors/eoc-push.js";
|
import { pushOpsSummaryToEoc } from "../src/processors/eoc-push.js";
|
||||||
|
|
||||||
const redis = new IORedis(process.env.REDIS_URL ?? "redis://localhost:6379", {
|
const redis = new IORedis(process.env.REDIS_URL ?? "redis://localhost:6379", {
|
||||||
@@ -121,7 +122,7 @@ describe("pushOpsSummaryToEoc", () => {
|
|||||||
const init = fetchMock.mock.calls[0][1] as RequestInit;
|
const init = fetchMock.mock.calls[0][1] as RequestInit;
|
||||||
const body = JSON.parse(init.body as string);
|
const body = JSON.parse(init.body as string);
|
||||||
const board = body.wall.boards[0];
|
const board = body.wall.boards[0];
|
||||||
expect(board.title).toBe("Cibello Overview");
|
expect(board.title).toBe(`${BRAND.name} Overview`);
|
||||||
expect(board.title).not.toMatch(/\{brand\}/);
|
expect(board.title).not.toMatch(/\{brand\}/);
|
||||||
|
|
||||||
const tones = board.tiles.map((t: { tone?: string }) => t.tone);
|
const tones = board.tiles.map((t: { tone?: string }) => t.tone);
|
||||||
|
|||||||
Reference in New Issue
Block a user