Skip to content

ERT tests which signal always fail #273

@joshbax189

Description

@joshbax189

For example

;; my-test.el
(require 'ert)

(ert-deftest my-error/test ()
  "Tests errors"
  (should-error (error "an error")))

Running with Eask v0.10.1 in Emacs > version 30

> eask test ert my-test.el
# ... trace output omitted
Test my-error/test condition:
    (ert-test-failed
     ((should-error (error "an error")) :form (error "an error") :value
      nil :fail-reason "did not signal an error"))
   FAILED  1/1  my-error/test (0.000239 sec) at my-test.el:5

Ran 1 tests, 0 results as expected, 1 unexpected (2024-10-30 11:33:38-0700, 0.094291 sec)

1 unexpected results:
   FAILED  my-error/test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions