From 9b0f01afc29288c0c47da2807979a608024b2df7 Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Thu, 7 Sep 2023 22:00:55 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Add=20tests=20for=20env=20validatio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/env.spec.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/env.spec.ts diff --git a/src/env.spec.ts b/src/env.spec.ts new file mode 100644 index 000000000..521b14f04 --- /dev/null +++ b/src/env.spec.ts @@ -0,0 +1,11 @@ +import { describe, expect, it, vi } from 'vitest'; + +import { env } from './env'; + +describe('environment validation', () => { + it('test', () => { + vi.stubEnv('PORT', '9876') + + expect(env.NEXT_PUBLIC_PORT).toBe(9876); + }); +});