Update from user feedback
This commit is contained in:
parent
f2a52886fb
commit
e8482063ef
@ -81,8 +81,8 @@ Before ANY file modification:
|
|||||||
#### Example: Bug Fix Workflow
|
#### Example: Bug Fix Workflow
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
(require '[namespace.with.issue :as issue])
|
(require '[namespace.with.issue :as issue] :reload)
|
||||||
(require '[clojure.repl :refer [source]])
|
(require '[clojure.repl :refer [source]] :reload)
|
||||||
;; 1. Examine the current implementation
|
;; 1. Examine the current implementation
|
||||||
;; 2. Test current behavior
|
;; 2. Test current behavior
|
||||||
(issue/problematic-function test-data)
|
(issue/problematic-function test-data)
|
||||||
@ -99,16 +99,16 @@ Before ANY file modification:
|
|||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
;; 1. Run the failing test
|
;; 1. Run the failing test
|
||||||
(require '[clojure.test :refer [test-vars]])
|
(require '[clojure.test :refer [test-vars]] :reload)
|
||||||
(test-vars [#'my.namespace-test/failing-test])
|
(test-vars [#'my.namespace-test/failing-test])
|
||||||
;; 2. Extract test data from the test
|
;; 2. Extract test data from the test
|
||||||
(require '[my.namespace-test :as test])
|
(require '[my.namespace-test :as test] :reload)
|
||||||
;; Look at the test source
|
;; Look at the test source
|
||||||
(source test/failing-test)
|
(source test/failing-test)
|
||||||
;; 3. Create test data in REPL
|
;; 3. Create test data in REPL
|
||||||
(def test-input {:id 123 :name \"test\"})
|
(def test-input {:id 123 :name \"test\"})
|
||||||
;; 4. Run the function being tested
|
;; 4. Run the function being tested
|
||||||
(require '[my.namespace :as my])
|
(require '[my.namespace :as my] :reload)
|
||||||
(my/process-data test-input)
|
(my/process-data test-input)
|
||||||
;; => Unexpected result!
|
;; => Unexpected result!
|
||||||
;; 5. Debug step by step
|
;; 5. Debug step by step
|
||||||
|
|||||||
@ -7,6 +7,11 @@ applyTo: '**/*.{clj,cljs,cljc,bb,edn.mdx?}'
|
|||||||
|
|
||||||
## Code Evaluation Tool usage
|
## Code Evaluation Tool usage
|
||||||
|
|
||||||
|
“Use the repl” means to use the **Evaluate Clojure Code** tool from Calva Backseat Driver. It connects you to the the same REPL as the user is connected to via Calva.
|
||||||
|
|
||||||
|
- Always stay inside Calva's REPL instead of launching a second one from the terminal.
|
||||||
|
- If there is no REPL connection, ask the user to connect the REPL instead of trying to start and connect it yourself.
|
||||||
|
|
||||||
### JSON Strings in REPL Tool Calls
|
### JSON Strings in REPL Tool Calls
|
||||||
Do not over-escape JSON arguments when invoking REPL tools.
|
Do not over-escape JSON arguments when invoking REPL tools.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user