11# testament API
22
3-
43[ ==] ( # ) , [ assert-deep-equal] ( #assert-deep-equal ) , [ assert-equal] ( #assert-equal ) , [ assert-equivalent] ( #assert-equivalent ) , [ assert-expr] ( #assert-expr ) , [ assert-matches] ( #assert-matches ) , [ assert-thrown] ( #assert-thrown ) , [ assert-thrown-message] ( #assert-thrown-message ) , [ deftest] ( #deftest ) , [ each-is] ( #each-is ) , [ exercise!] ( #exercise ) , [ is] ( #is ) , [ reset-all!] ( #reset-all ) , [ reset-tests!] ( #reset-tests ) , [ review] ( #review ) , [ run-tests!] ( #run-tests ) , [ set-on-result-hook] ( #set-on-result-hook ) , [ set-report-printer] ( #set-report-printer ) , [ set-results-printer] ( #set-results-printer )
54
65## ==
@@ -23,6 +22,7 @@ function.
2322
2423[ 1 ] : lib/testament.janet#L62
2524
25+
2626## assert-deep-equal
2727
2828** macro** | [ source] [ 2 ]
@@ -41,7 +41,8 @@ An optional `note` can be included that will be used in any failure result to
4141identify the assertion. If no ` note ` is provided, the form
4242` (deep= expect actual) ` is used.
4343
44- [ 2 ] : lib/testament.janet#L460
44+ [ 2 ] : lib/testament.janet#L693
45+
4546
4647## assert-equal
4748
@@ -61,7 +62,8 @@ An optional `note` can be included that will be used in any failure result to
6162identify the assertion. If no ` note ` is provided, the form ` (= expect actual) `
6263is used.
6364
64- [ 3 ] : lib/testament.janet#L444
65+ [ 3 ] : lib/testament.janet#L677
66+
6567
6668## assert-equivalent
6769
@@ -84,7 +86,8 @@ An optional `note` can be included that will be used in any failure result to
8486identify the assertion. If no ` note ` is provided, the form ` (== expect actual) `
8587is used.
8688
87- [ 4 ] : lib/testament.janet#L476
89+ [ 4 ] : lib/testament.janet#L709
90+
8891
8992## assert-expr
9093
@@ -101,7 +104,8 @@ The `assert-expr` macro provides a mechanism for creating a generic assertion.
101104An optional ` note ` can be included that will be used in any failure result to
102105identify the assertion. If no ` note ` is provided, the form of ` expr ` is used.
103106
104- [ 5 ] : lib/testament.janet#L431
107+ [ 5 ] : lib/testament.janet#L664
108+
105109
106110## assert-matches
107111
@@ -120,7 +124,8 @@ An optional `note` can be included that will be used in any failure result to
120124identify the assertion. If no ` note ` is provided, the form
121125` (matches structure actual) ` is used.
122126
123- [ 6 ] : lib/testament.janet#L495
127+ [ 6 ] : lib/testament.janet#L728
128+
124129
125130## assert-thrown
126131
@@ -139,7 +144,8 @@ An optional `note` can be included that will be used in any failure result to
139144identify the assertion. If no ` note ` is provided, the form ` thrown? expr ` is
140145used.
141146
142- [ 7 ] : lib/testament.janet#L510
147+ [ 7 ] : lib/testament.janet#L743
148+
143149
144150## assert-thrown-message
145151
@@ -159,7 +165,8 @@ An optional `note` can be included that will be used in any failure result to
159165identify the assertion. If no ` note ` is provided, the form
160166` thrown? expect expr ` is used.
161167
162- [ 8 ] : lib/testament.janet#L526
168+ [ 8 ] : lib/testament.janet#L759
169+
163170
164171## deftest
165172
@@ -196,7 +203,8 @@ test is called is not guaranteed.
196203If ` deftest ` is called with no arguments or if the only argument is a symbol,
197204an arity error is raised.
198205
199- [ 9 ] : lib/testament.janet#L657
206+ [ 9 ] : lib/testament.janet#L890
207+
200208
201209## each-is
202210
@@ -210,7 +218,8 @@ Asserts that each element in `assertions` is true (with an optional `note`)
210218
211219This effectively calls ` is ` on each element in ` assertions ` using the optional note.
212220
213- [ 10 ] : lib/testament.janet#L607
221+ [ 10 ] : lib/testament.janet#L840
222+
214223
215224## exercise!
216225
@@ -232,7 +241,8 @@ tuple.
232241Please note that, like ` run-tests! ` , ` exercise! ` calls ` os/exit ` when there
233242are failing tests unless the argument ` :no-exit? ` is set to ` true ` .
234243
235- [ 11 ] : lib/testament.janet#L775
244+ [ 11 ] : lib/testament.janet#L1008
245+
236246
237247## is
238248
@@ -266,7 +276,8 @@ asserted expression.
266276An optional ` note ` can be included that will be used in any failure result to
267277identify the assertion.
268278
269- [ 12 ] : lib/testament.janet#L546
279+ [ 12 ] : lib/testament.janet#L779
280+
270281
271282## reset-all!
272283
@@ -278,7 +289,8 @@ identify the assertion.
278289
279290Resets all reporting variables and settings
280291
281- [ 13 ] : lib/testament.janet#L643
292+ [ 13 ] : lib/testament.janet#L876
293+
282294
283295## reset-tests!
284296
@@ -290,7 +302,8 @@ Resets all reporting variables and settings
290302
291303Resets all reporting variables
292304
293- [ 14 ] : lib/testament.janet#L629
305+ [ 14 ] : lib/testament.janet#L862
306+
294307
295308## review
296309
@@ -307,7 +320,8 @@ the bindings as public. This is intended for situations where it is not
307320desirable to make bindings public but the user would still like to be able to
308321subject the bindings to testing.
309322
310- [ 15 ] : lib/testament.janet#L821
323+ [ 15 ] : lib/testament.janet#L1054
324+
311325
312326## run-tests!
313327
@@ -348,7 +362,8 @@ Finally, if the dynamic binding `:testament/repl?` is set to `true`, this
348362will also reset the test reports and empty the module/cache to provide a
349363fresh run with the most up-to-date code.
350364
351- [ 16 ] : lib/testament.janet#L712
365+ [ 16 ] : lib/testament.janet#L945
366+
352367
353368## set-on-result-hook
354369
@@ -380,7 +395,8 @@ The 'value' of the assertion depends on the kind of assertion:
380395- ` :thrown ` either ` true ` or ` false ` ; and
381396- ` :thrown-message ` the error specified in the assertion.
382397
383- [ 17 ] : lib/testament.janet#L211
398+ [ 17 ] : lib/testament.janet#L444
399+
384400
385401## set-report-printer
386402
@@ -404,6 +420,7 @@ to `true`.
404420
405421[ 18 ] : lib/testament.janet#L80
406422
423+
407424## set-results-printer
408425
409426** function** | [ source] [ 19 ]
0 commit comments