fix: restructured the test names to be more accurate

This commit is contained in:
Kevin
2025-07-03 13:52:34 -05:00
parent 86e6590f4d
commit 07d899e884

View File

@ -2,12 +2,14 @@ import env from '@src/env'
import { vi } from 'vitest'
import { viteEnv, windowElectronProcessEnv, processEnv } from '@src/env'
describe('@src/env default export', () => {
describe('@src/env', () => {
describe('default export', () => {
it('should run the process.env workflow', () => {
// vite > node.js
const expected = {
NODE_ENV: 'test',
VITE_KC_API_WS_MODELING_URL: 'wss://api.dev.zoo.dev/ws/modeling/commands',
VITE_KC_API_WS_MODELING_URL:
'wss://api.dev.zoo.dev/ws/modeling/commands',
VITE_KITTYCAD_API_BASE_URL: 'https://api.dev.zoo.dev',
VITE_KC_SITE_BASE_URL: 'https://dev.zoo.dev',
VITE_KC_SITE_APP_URL: 'https://app.dev.zoo.dev',
@ -24,6 +26,7 @@ describe('@src/env default export', () => {
actual.VITE_KITTYCAD_API_TOKEN = 'redacted'
expect(actual).toStrictEqual(expected)
})
})
describe('viteEnv', () => {
it('should match the EnvironmentVariables key types*', () => {
// Do not print entire object or compare, it contains a ton of ENV vars.