Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(app): fix biome ci and tests

synoet8bf2476fdcf1
diff --git a/.github/workflows/web-app-check-main.yml b/.github/workflows/web-app-check-main.yml
index 983e4921cb..3f50541822 100644
--- a/.github/workflows/web-app-check-main.yml
+++ b/.github/workflows/web-app-check-main.yml
@@ -39,13 +39,15 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: 2.2.6
- name: Run Biome
working-directory: js/app
- run: biome ci .
+ run: biome ci --changed --no-errors-on-unmatched
tailwind:
name: Theme Hygiene Inspector
diff --git a/js/app/packages/core/tests/date.test.ts b/js/app/packages/core/tests/date.test.ts
index 1a8d591a76..507790c387 100644
--- a/js/app/packages/core/tests/date.test.ts
+++ b/js/app/packages/core/tests/date.test.ts
@@ -21,15 +21,15 @@ describe('Date Utilities (core/utils/date.ts)', () => {
});
it('should format time for today', () => {
- // Today at 8:15 AM
+ // Today at 8:15 AM UTC
const todayMorning = epochTime('2025-06-14T08:15:00.000Z');
- expect(formatDate(todayMorning, mockNowEpochSeconds)).toBe('8:15 AM');
+ expect(formatDate(todayMorning, mockNowEpochSeconds, 'UTC')).toBe('8:15 AM');
});
it('should format "Yesterday at {time}" for yesterday (UTC day boundary)', () => {
// Yesterday at 11:00 PM UTC (June 13)
const yesterdayEvening = epochTime('2025-06-13T23:00:00.000Z');
- expect(formatDate(yesterdayEvening, mockNowEpochSeconds)).toBe(
+ expect(formatDate(yesterdayEvening, mockNowEpochSeconds, 'UTC')).toBe(
'Yesterday at 11:00 PM'
);
});
@@ -38,7 +38,7 @@ describe('Date Utilities (core/utils/date.ts)', () => {
// Reference time: June 14, 2:15 PM UTC
// Yesterday at 11:59 PM UTC (June 13) - just before midnight
const justBeforeMidnight = epochTime('2025-06-13T23:59:59.000Z');
- expect(formatDate(justBeforeMidnight, mockNowEpochSeconds)).toBe(
+ expect(formatDate(justBeforeMidnight, mockNowEpochSeconds, 'UTC')).toBe(
'Yesterday at 11:59 PM'
);
});
@@ -47,14 +47,14 @@ describe('Date Utilities (core/utils/date.ts)', () => {
// Reference time: June 14, 2:15 PM UTC
// Same day at 1:00 AM UTC (13.25 hours earlier, but same UTC day)
const earlyToday = epochTime('2025-06-14T01:00:00.000Z');
- expect(formatDate(earlyToday, mockNowEpochSeconds)).toBe('1:00 AM');
+ expect(formatDate(earlyToday, mockNowEpochSeconds, 'UTC')).toBe('1:00 AM');
});
it('should handle yesterday even with more than 24 hour difference', () => {
// Reference time: June 14, 2:15 PM UTC
// Yesterday at 1:00 AM UTC (37.25 hours earlier, but still "yesterday")
const yesterdayEarly = epochTime('2025-06-13T01:00:00.000Z');
- expect(formatDate(yesterdayEarly, mockNowEpochSeconds)).toBe(
+ expect(formatDate(yesterdayEarly, mockNowEpochSeconds, 'UTC')).toBe(
'Yesterday at 1:00 AM'
);
});