From the course: Build with AI: Developing a Code Review Assistant
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Test harness development: Mocking GitHub API responses
From the course: Build with AI: Developing a Code Review Assistant
Test harness development: Mocking GitHub API responses
- [Instructor] Adding tests and reviewing the code before we start launching this action is, I think, essential. So if we take a look at what we have here, we have a single function, which is the run function, right? It has everything in there, and then it executes at the very bottom, at the very end, the run function. So this might be kind of okay. Like if we don't care about anything, (laughs) this might be maybe somehow acceptable, but if certain things are failing within these lines, like say for example, the common body is not well constructed, well, we start getting into trouble. So testing is essential. So I'm going to get out of this file, and I'm going to go to Gemini. So I'm in Gemini right now, and I'm going to ask to modularize, and I'm going to ask. We're not going to go crazy with the amount of tests. What I want to do is create a few tests, a little bit of validation, modularize, make that code a little bit better, and then take it from there so that we can have some…
Contents
-
-
-
-
(Locked)
Implementation strategy and development workflow56s
-
(Locked)
Documentation-driven development: API contract definition5m 57s
-
(Locked)
Building the action: TypeScript implementation and Docker packaging5m 37s
-
(Locked)
Test harness development: Mocking GitHub API responses4m 33s
-
(Locked)
Local testing: Act runner and environment simulation8m 14s
-
(Locked)
Module summary and performance benchmarks1m 10s
-
(Locked)
-
-