Skip to content

Commit 0958aab

Browse files
test(dashboards): drop redundant mock resets and default environment pragmas
The shared Vitest config already resets mocks and stubbed globals before each test and defaults to the node environment. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S6aTRnkiu7PxYZPNPXYEMV
1 parent dd4b207 commit 0958aab

7 files changed

Lines changed: 0 additions & 10 deletions

File tree

‎apps/sim/components/dashboards/dashboard-panel.test.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ describe('dashboard empty-range transitions', () => {
5858
})
5959
afterEach(() => {
6060
act(() => root.unmount())
61-
vi.resetAllMocks()
62-
vi.unstubAllGlobals()
6361
})
6462

6563
it('keeps the chart mounted through populated, empty, and populated ranges', async () => {

‎apps/sim/hooks/queries/table-analytics.test.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ describe('dashboard range transitions', () => {
6868
afterEach(() => {
6969
act(() => root.unmount())
7070
client.clear()
71-
vi.resetAllMocks()
7271
vi.useRealTimers()
73-
vi.unstubAllGlobals()
7472
})
7573

7674
it('keeps results while the new range loads, then replaces them', async () => {

‎apps/sim/lib/charts/option.test.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/** @vitest-environment node */
2-
31
import { init } from 'echarts'
42
import { describe, expect, it } from 'vitest'
53
import {

‎apps/sim/lib/charts/theme.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/** @vitest-environment node */
21
import { toRecord } from '@sim/utils/object'
32
import { describe, expect, it } from 'vitest'
43
import { applyChartTooltipDefaults, formatBarTooltip, formatPieTooltip } from '@/lib/charts/theme'

‎apps/sim/lib/dashboards/spec.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/** @vitest-environment node */
21
import { describe, expect, it } from 'vitest'
32
import { parseDashboardSpec } from '@/lib/dashboards/spec'
43
import {

‎apps/sim/lib/dashboards/time.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/** @vitest-environment node */
21
import { describe, expect, it } from 'vitest'
32
import {
43
dashboardAxisFormatter,

‎apps/sim/lib/table/analytics/query.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/** @vitest-environment node */
21
import { PgDialect } from 'drizzle-orm/pg-core'
32
import { beforeEach, describe, expect, it, vi } from 'vitest'
43
import { fillAnalyticsBuckets, resolveAnalyticsBucket } from '@/lib/table/analytics/buckets'

0 commit comments

Comments
 (0)