Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tomi committed Oct 31, 2024
1 parent 39422d9 commit c1c717c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions packages/cli/src/runners/__tests__/task-broker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,15 +494,18 @@ describe('TaskBroker', () => {
const taskId = 'task1';
const requesterId = 'requester1';
const requestId = 'request1';
const requestType = 'input';
const param = 'test_param';
const requestParams: RunnerMessage.ToN8n.TaskDataRequest['requestParams'] = {
dataOfNodes: 'all',
env: true,
input: true,
prevNode: true,
};

const message: RunnerMessage.ToN8n.TaskDataRequest = {
type: 'runner:taskdatarequest',
taskId,
requestId,
requestType,
param,
requestParams,
};

const requesterMessageCallback = jest.fn();
Expand All @@ -519,8 +522,7 @@ describe('TaskBroker', () => {
type: 'broker:taskdatarequest',
taskId,
requestId,
requestType,
param,
requestParams,
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ describe('TaskRunnerProcess', () => {
});

describe('constructor', () => {
it('should throw if runner mode is external', () => {
it('should not throw if runner mode is external', () => {
runnerConfig.mode = 'external';

expect(() => new TaskRunnerProcess(logger, runnerConfig, authService)).toThrow();
expect(() => new TaskRunnerProcess(logger, runnerConfig, authService)).not.toThrow();

runnerConfig.mode = 'internal_childprocess';
});
Expand Down

0 comments on commit c1c717c

Please sign in to comment.