mirror of
https://github.com/twentyhq/twenty
synced 2026-04-21 13:37:22 +00:00
- 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" />
31 lines
779 B
TypeScript
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);
|
|
});
|
|
});
|