Function: projectile-test-at-point-erlang-name

projectile-test-at-point-erlang-name is a byte-compiled function defined in projectile.el.

Signature

(projectile-test-at-point-erlang-name NODE)

Documentation

Return the test name for the Erlang fun_decl\= NODE.

EUnit picks up functions whose name ends in _test\= (a plain test) or
_test_\= (a test generator), which is the only thing marking one out
from any other function.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-test-at-point-erlang-name (node)
  "Return the test name for the Erlang `fun_decl\\=' NODE.
EUnit picks up functions whose name ends in `_test\\=' (a plain test) or
`_test_\\=' (a test generator), which is the only thing marking one out
from any other function."
  (when-let* ((clause (treesit-node-child-by-field-name node "clause"))
              (name-node (treesit-node-child-by-field-name clause "name"))
              (name (treesit-node-text name-node t)))
    (when (or (string-suffix-p "_test" name)
              (string-suffix-p "_test_" name))
      name)))