(.require
 [library
  [lux (.except)
   ["$" documentation]
   [data
    ["[0]" text (.only \n)
     ["%" \\format (.only format)]]]]]
 [\\library
  ["[0]" /]])

(def .public documentation
  (List $.Documentation)
  (list ($.module /._
                  "Unit testing.")

        ($.definition /.Test
          "An asynchronous operation that yields test results.")

        ($.definition /.and
          "Sequencing combinator."
          [(and left right)])

        ($.definition /.test
          "Check that a condition is #1, and fail with the given message otherwise."
          [(test message condition)])

        ($.definition /.coverage
          (format "Specifies a test as covering one or more definitions."
                  \n "Adds to the test tally information to track which definitions have been tested.")
          [(coverage [definition/0 definition/1 ,,, definition/N]
             (is Bit
                 (some "computation")))])
        
        ($.definition /.for
          (format "Specifies a context for tests as covering one or more definitions."
                  \n "Adds to the test tally information to track which definitions have been tested.")
          [(for [definition/0 definition/1 ,,, definition/N]
                (is Test
                    some_test))])

        ($.definition /.covering
          (format "Specifies the module being covered by a test."
                  \n "Adds tracking information to the tally to know which exported definitions in the module need to be covered.")
          [(covering .._
                     (is Test
                         some_test))])
        
        ($.definition /.context)
        ($.definition /.success)
        ($.definition /.failure)
        ))
