@@ -422,6 +422,8 @@ exports[`works with node assert 1`] = `
422
422
✕ assert.ifError
423
423
✕ assert.doesNotThrow
424
424
✕ assert.throws
425
+ ✕ assert.throws with different error messages
426
+ ✕ assert.throws with different error types
425
427
✕ async
426
428
✕ assert.fail
427
429
✕ assert.fail with a message
@@ -795,10 +797,51 @@ exports[`works with node assert 1`] = `
795
797
| ^
796
798
77 | });
797
799
78 |
798
- 79 | test (' async ' , async () => {
800
+ 79 | test (' assert.throws with different error messages ' , () => {
799
801
800
802
at Object .throws (__tests__ / assertionError .test .js :76 :10 )
801
803
804
+ ● assert .throws with different error messages
805
+
806
+ assert .throws (function )
807
+
808
+ Expected values to be strictly deep-equal:
809
+ + actual - expected
810
+
811
+ Comparison {
812
+ + message : ' message 1'
813
+ - message : ' message 2'
814
+ }
815
+
816
+ 78 |
817
+ 79 | test (' assert.throws with different error messages' , () => {
818
+ > 80 | assert .throws (
819
+ | ^
820
+ 81 | () => {
821
+ 82 | throw new Error (' message 1' );
822
+ 83 | },
823
+
824
+ at Object .throws (__tests__ / assertionError .test .js :80 :10 )
825
+
826
+ ● assert .throws with different error types
827
+
828
+ assert .throws (function )
829
+
830
+ The "TypeError" validation function is expected to return "true". Received TypeError: SyntaxError: message 1
831
+
832
+ 89 |
833
+ 90 | test('assert .throws with different error types ', () => {
834
+ > 91 | assert .throws (() => {
835
+ | ^
836
+ 92 | throw new SyntaxError (' message 1' );
837
+ 93 | }, TypeError );
838
+ 94 | });
839
+
840
+ at Object .throws (__tests__ / assertionError .test .js :91 :10 )
841
+ Caught error :
842
+ SyntaxError : message 1
843
+ at Object .throws (__tests__ / assertionError .test .js :91 :10 )
844
+
802
845
● async
803
846
804
847
assert .equal (received , expected )
@@ -820,29 +863,29 @@ exports[`works with node assert 1`] = `
820
863
hello
821
864
+ goodbye
822
865
823
- 78 |
824
- 79 | test (' async' , async () => {
825
- > 80 | assert .equal (' hello\\ ngoodbye' , ' hello' , ' hmmm' );
826
- | ^
827
- 81 | });
828
- 82 |
829
- 83 | test (' assert.fail' , () => {
866
+ 95 |
867
+ 96 | test (' async' , async () => {
868
+ > 97 | assert .equal (' hello\\ ngoodbye' , ' hello' , ' hmmm' );
869
+ | ^
870
+ 98 | });
871
+ 99 |
872
+ 100 | test (' assert.fail' , () => {
830
873
831
- at Object .equal (__tests__ / assertionError .test .js :80 :10 )
874
+ at Object .equal (__tests__ / assertionError .test .js :97 :10 )
832
875
833
876
● assert .fail
834
877
835
878
assert .fail (received , expected )
836
879
837
- 82 |
838
- 83 | test (' assert.fail' , () => {
839
- > 84 | assert .fail ();
840
- | ^
841
- 85 | });
842
- 86 |
843
- 87 | test (' assert.fail with a message' , () => {
880
+ 99 |
881
+ 100 | test (' assert.fail' , () => {
882
+ > 101 | assert .fail ();
883
+ | ^
884
+ 102 | });
885
+ 103 |
886
+ 104 | test (' assert.fail with a message' , () => {
844
887
845
- at Object .fail (__tests__ / assertionError .test .js :84 :10 )
888
+ at Object .fail (__tests__ / assertionError .test .js :101 :10 )
846
889
847
890
● assert .fail with a message
848
891
@@ -851,14 +894,14 @@ exports[`works with node assert 1`] = `
851
894
Message :
852
895
error !
853
896
854
- 86 |
855
- 87 | test (' assert.fail with a message' , () => {
856
- > 88 | assert .fail (' error!' );
857
- | ^
858
- 89 | });
859
- 90 |
897
+ 103 |
898
+ 104 | test (' assert.fail with a message' , () => {
899
+ > 105 | assert .fail (' error!' );
900
+ | ^
901
+ 106 | });
902
+ 107 |
860
903
861
- at Object .fail (__tests__ / assertionError .test .js :88 :10 )"
904
+ at Object .fail (__tests__ / assertionError .test .js :105 :10 )"
862
905
`;
863
906
864
907
exports [` works with snapshot failures 1` ] = `
0 commit comments