twenty/packages/twenty-front/src/utils/__tests__/getIsDevelopmentEnvironment.test.ts
martmull da064d5e88
Support define is tool logic function (#17926)
- supports isTool and timeout settings in defineLogicFunction in apps
and in setting tabs definition
- compute for all toolInputSchema for logic funciton, in settings and in
code steps

<img width="991" height="802" alt="image"
src="https://github.com/user-attachments/assets/05dc1221-cac9-45a3-87b0-3b13161446fd"
/>
2026-02-16 10:43:29 +01:00

31 lines
779 B
TypeScript

import { getIsDevelopmentEnvironment } from '~/utils/getIsDevelopmentEnvironment';
describe('getIsDevelopmentEnvironment', () => {
const originalEnv = process.env;
beforeEach(() => {
process.env = { ...originalEnv };
});
afterAll(() => {
process.env = originalEnv;
});
it('should return true when IS_DEV_ENV is "true"', () => {
process.env.IS_DEV_ENV = 'true';
expect(getIsDevelopmentEnvironment()).toBe(true);
});
it('should return false when IS_DEV_ENV is "false"', () => {
process.env.IS_DEV_ENV = 'false';
expect(getIsDevelopmentEnvironment()).toBe(false);
});
it('should return false when IS_DEV_ENV is not set', () => {
delete process.env.IS_DEV_ENV;
expect(getIsDevelopmentEnvironment()).toBe(false);
});
});