Commit d3a80b4
committed
Mock Deno.exit() in the test to throw an error
This is required as Deno.exit(1) after `error()` is making `test.execute()` exit without possibility to cath the error and log the error to be verified.
Our test logic does not even fail on this Deno.exit() happening. Tests continue and nor OK or FAILED is thrown.
Our usual pattern to throw an error when using error(), but it may not apply in this case for checking version requirement in quarto.ts. This is why mocking is chosen here.1 parent e846425 commit d3a80b4
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
| |||
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
| 46 | + | |
| 47 | + | |
39 | 48 | | |
40 | 49 | | |
41 | 50 | | |
0 commit comments