Integration Testing

Integration testing with moclojer - test your application against mock APIs, CI/CD integration, and automated testing workflows.

Use moclojer for integration testing to validate your application against mock APIs.

🎯 Setup

1. Start Mock Server in Tests

// test/setup.js
const { spawn } = require('child_process');

let mockServer;

beforeAll(async () => {
  mockServer = spawn('moclojer', ['--config', 'test/mocks.yml', '--port', '8000']);
  await new Promise(resolve => setTimeout(resolve, 2000)); // Wait for server
});

afterAll(() => {
  mockServer.kill();
});

2. Configure API Client

πŸ”„ CI/CD Integration

GitHub Actions

πŸ“š See Also

Last updated

Was this helpful?