Skip to content

Commit adcd914

Browse files
committed
test(platform): drop redundant env resets and type the zone boot environment
1 parent 1cc9aac commit adcd914

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

‎apps/sim/platform/checks/live/zone-boot/refuses-to-start.spec.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { type ChildProcess, spawn } from 'node:child_process'
22
import { expect, test } from '@playwright/test'
3-
import { omit } from '@sim/utils/object'
43

54
/**
65
* Starts the zone's real production build as its own process, the way a container does, under the
@@ -27,7 +26,10 @@ function startZone(env: Record<string, string>) {
2726
],
2827
{
2928
env: {
30-
...omit(process.env, ['SIM_PLATFORM_API_ORIGIN', 'SIM_PLATFORM_FIXTURES', 'NODE_ENV']),
29+
...process.env,
30+
NODE_ENV: 'production',
31+
SIM_PLATFORM_API_ORIGIN: undefined,
32+
SIM_PLATFORM_FIXTURES: undefined,
3133
SIM_PLATFORM_BASE_PATH: '/org',
3234
...env,
3335
},

‎apps/sim/platform/lib/data/landing.test.ts‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
1+
import { beforeEach, describe, expect, it, vi } from 'vitest'
22
import { resolveLiveLanding } from '@/platform/lib/data/landing'
33
import type { PlatformOrganization } from '@/platform/lib/data/organization-model'
44
import { readOrganizationSurface } from '@/platform/lib/data/surface'
@@ -33,10 +33,6 @@ describe('resolveLiveLanding', () => {
3333
vi.stubEnv('NEXT_PUBLIC_APP_URL', ORIGIN)
3434
})
3535

36-
afterEach(() => {
37-
vi.unstubAllEnvs()
38-
})
39-
4036
it('sends an organization outside the rollout back to the main app, out of the zone', async () => {
4137
vi.mocked(readOrganizationSurface).mockResolvedValue({
4238
status: 'ok',

‎apps/sim/proxy.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ describe('Platform zone outage', () => {
352352
})
353353

354354
afterEach(async () => {
355-
vi.unstubAllEnvs()
356355
setEnv({ SIM_PLATFORM_ORIGIN: undefined })
357356
answer = 404
358357
await Promise.all(

0 commit comments

Comments
 (0)