Initial commit of n8n MCP Server
A Model Context Protocol (MCP) server that integrates with n8n, providing tools for workflow and execution management via the n8n API.
This commit is contained in:
25
tests/unit/tools/workflow/list.test.ts.bak
Normal file
25
tests/unit/tools/workflow/list.test.ts.bak
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* ListWorkflowsHandler unit tests
|
||||
*/
|
||||
|
||||
import { describe, it, expect, jest } from '@jest/globals';
|
||||
import { getListWorkflowsToolDefinition } from '../../../../src/tools/workflow/list.js';
|
||||
import { mockApiResponses } from '../../../mocks/n8n-fixtures.js';
|
||||
|
||||
// Since this is an integration test, we'll test the definition directly
|
||||
// rather than mocking the complex handler implementation
|
||||
jest.mock('../../../../src/tools/workflow/base-handler.js');
|
||||
|
||||
describe('getListWorkflowsToolDefinition', () => {
|
||||
it('should return the correct tool definition', () => {
|
||||
// Execute
|
||||
const definition = getListWorkflowsToolDefinition();
|
||||
|
||||
// Assert
|
||||
expect(definition.name).toBe('list_workflows');
|
||||
expect(definition.description).toBeTruthy();
|
||||
expect(definition.inputSchema).toBeDefined();
|
||||
expect(definition.inputSchema.properties).toHaveProperty('active');
|
||||
expect(definition.inputSchema.required).toEqual([]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user