Commit 6d1c3b5
committed
feat(test): add optional message to failed assertions
Allow user to add an optional message to failed assertions in mini test.
This allow providing more context to specific failures when they arise.
Usage:
```lua
MiniTest.expect.equality(x, y, "Invalid number of items")
MiniTest.expect.no_equality(x, y, "Unexpected line counts")
MiniTest.expect.reference_screenshot(screen, path, nil, "Buffer not matching")
```1 parent 80a1149 commit 6d1c3b5
3 files changed
+32
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
| 528 | + | |
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
| 536 | + | |
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
539 | | - | |
| 540 | + | |
540 | 541 | | |
541 | 542 | | |
542 | 543 | | |
543 | 544 | | |
544 | 545 | | |
545 | 546 | | |
546 | 547 | | |
| 548 | + | |
547 | 549 | | |
548 | 550 | | |
549 | 551 | | |
| |||
567 | 569 | | |
568 | 570 | | |
569 | 571 | | |
570 | | - | |
| 572 | + | |
571 | 573 | | |
572 | 574 | | |
573 | 575 | | |
| |||
589 | 591 | | |
590 | 592 | | |
591 | 593 | | |
| 594 | + | |
592 | 595 | | |
593 | 596 | | |
594 | 597 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
| 669 | + | |
| 670 | + | |
670 | 671 | | |
671 | 672 | | |
672 | 673 | | |
| 674 | + | |
673 | 675 | | |
674 | 676 | | |
675 | 677 | | |
| |||
679 | 681 | | |
680 | 682 | | |
681 | 683 | | |
682 | | - | |
| 684 | + | |
| 685 | + | |
683 | 686 | | |
684 | 687 | | |
685 | 688 | | |
| 689 | + | |
686 | 690 | | |
687 | 691 | | |
688 | 692 | | |
| |||
739 | 743 | | |
740 | 744 | | |
741 | 745 | | |
742 | | - | |
| 746 | + | |
| 747 | + | |
743 | 748 | | |
744 | 749 | | |
745 | 750 | | |
| |||
794 | 799 | | |
795 | 800 | | |
796 | 801 | | |
| 802 | + | |
797 | 803 | | |
798 | 804 | | |
799 | 805 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
752 | 752 | | |
753 | 753 | | |
754 | 754 | | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
755 | 762 | | |
756 | 763 | | |
757 | 764 | | |
| |||
1061 | 1068 | | |
1062 | 1069 | | |
1063 | 1070 | | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
1064 | 1081 | | |
1065 | 1082 | | |
1066 | 1083 | | |
| |||
0 commit comments