Templates / Automatic jest test generation for GitHub PRs with dual AI review

Automatic jest test generation for GitHub PRs with dual AI review

Needs changes

by Varritech ✓ · 639 views · created 2025-05-13 · Engineering, Multimodal AI

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 20 nodes and runs when an HTTP GET request hits its webhook URL. Along the way it connects GitHub and OpenAI Chat Model.

How it runs

Trigger: When an HTTP GET request hits its webhook URL.

  1. Extrat API URL, owner and repo (Code): runs custom JavaScript code
  2. GET .diff file (HTTP Request): calls an HTTP API
  3. Merge: merges the data from its input branches
  4. Merge: merges the data from its input branches
  5. Splits text into array (Code): runs custom JavaScript code
  6. Get File name (Code): runs custom JavaScript code
  7. Prepare for POST (Code): runs custom JavaScript code
  8. FIlter for components (Code): runs custom JavaScript code
  9. Test Maker (AI Agent): runs an AI agent, with model: o3-mini; 2 tools (Get Repo, Get Files); output parser: Structured Output Parser
  10. POST Comments (HTTP Request): calls an HTTP API

…plus 3 more steps. See the full node list below.

Services it uses

GitHubOpenAI Chat Model

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in Test Maker (v1.8), Code Reviewer (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
Test Maker (v1.8), Code Reviewer (v1.8)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (9)

From the author

Workflow: Automatic Unit Test Creator from GitHub 🏗️ Architecture Overview This workflow listens for GitHub pull-request events, analyzes changed React/TypeScript files, auto-generates Jest tests via AI, has them reviewed by a second AI pass, and posts…

Excerpt from Varritech's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.