     (:test-cases state)))
 
 (deftest run-test-cases
-  (let [text (.readFileSync fs "formatter-test.md")
+  (let [text (.readFileSync fs test-filepath)
         test-cases (parse-test-cases text)]
     (doseq [{:keys [in out]} test-cases]
       (let [cursor-line (:cursor-line in)]

        ;; close test block
        (assoc state :block-key nil)))))

(defmethod parse-line :start-block
  [{:keys [block-key test-case test-cases] :as state} [line-no line]]
  (if block-key
    (throw (error-msg line-no "must close previous block before starting new one"))

                       :block-key nil ;; :in or :out
                       :test-case {:in nil, :out nil}}
        numbered-lines (map-indexed (fn [line-no line] [(inc line-no) line]) lines)
        state (reduce parse-test-line initial-state numbered-lines)]
    
    (when (:block-key state)
      (throw (error-msg "EOF" "code block not closed")))
