feat: Modernize build and testing for workflow package (no-changelog) (#16771)

This commit is contained in:
Alex Grozav
2025-06-30 20:02:16 +03:00
committed by GitHub
parent d1d5412bfb
commit c76d94b364
70 changed files with 733 additions and 486 deletions

View File

@@ -1,5 +1,5 @@
import { ExpressionError } from '@/errors/expression.error';
import { createEnvProvider, createEnvProviderState } from '@/workflow-data-proxy-env-provider';
import { ExpressionError } from '../src/errors/expression.error';
import { createEnvProvider, createEnvProviderState } from '../src/workflow-data-proxy-env-provider';
describe('createEnvProviderState', () => {
afterEach(() => {
@@ -54,6 +54,8 @@ describe('createEnvProvider', () => {
});
it('should throw ExpressionError when process is unavailable', () => {
vi.useFakeTimers({ now: new Date() });
const originalProcess = global.process;
// @ts-expect-error process is read-only
global.process = undefined;
@@ -69,6 +71,8 @@ describe('createEnvProvider', () => {
} finally {
global.process = originalProcess;
}
vi.useRealTimers();
});
it('should throw ExpressionError when env access is blocked', () => {