test: align envelope timestamp expectations (#1329) (thanks @dlauer)
This commit is contained in:
@@ -3,10 +3,7 @@ import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
escapeRegExp,
|
||||
formatLocalEnvelopeTimestamp,
|
||||
} from "../../test/helpers/envelope-timestamp.js";
|
||||
import { escapeRegExp, formatEnvelopeTimestamp } from "../../test/helpers/envelope-timestamp.js";
|
||||
|
||||
vi.mock("../agents/pi-embedded.js", () => ({
|
||||
abortEmbeddedPiRun: vi.fn().mockReturnValue(false),
|
||||
@@ -332,8 +329,8 @@ describe("web auto-reply", () => {
|
||||
expect(resolver).toHaveBeenCalledTimes(2);
|
||||
const firstArgs = resolver.mock.calls[0][0];
|
||||
const secondArgs = resolver.mock.calls[1][0];
|
||||
const firstTimestamp = formatLocalEnvelopeTimestamp(new Date("2025-01-01T00:00:00Z"));
|
||||
const secondTimestamp = formatLocalEnvelopeTimestamp(new Date("2025-01-01T01:00:00Z"));
|
||||
const firstTimestamp = formatEnvelopeTimestamp(new Date("2025-01-01T00:00:00Z"));
|
||||
const secondTimestamp = formatEnvelopeTimestamp(new Date("2025-01-01T01:00:00Z"));
|
||||
const firstPattern = escapeRegExp(firstTimestamp);
|
||||
const secondPattern = escapeRegExp(secondTimestamp);
|
||||
expect(firstArgs.Body).toMatch(
|
||||
|
||||
Reference in New Issue
Block a user