fix issues
This commit is contained in:
17
apps/website/lib/config/env.test.ts
Normal file
17
apps/website/lib/config/env.test.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { getWebsitePublicEnv, getWebsiteServerEnv, isTruthyEnv } from './env';
|
||||
|
||||
describe('env', () => {
|
||||
it('should be defined', () => {
|
||||
expect(getWebsiteServerEnv()).toBeDefined();
|
||||
expect(getWebsitePublicEnv()).toBeDefined();
|
||||
});
|
||||
|
||||
it('should interpret truthy env strings', () => {
|
||||
expect(isTruthyEnv(undefined)).toBe(false);
|
||||
expect(isTruthyEnv('0')).toBe(false);
|
||||
expect(isTruthyEnv('false')).toBe(false);
|
||||
expect(isTruthyEnv('TRUE')).toBe(true);
|
||||
expect(isTruthyEnv('1')).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user