@@ -58,7 +58,11 @@ describe("Ono.extend()", () => {
58
58
expect ( error ) . to . be . an . instanceOf ( ValidationError ) ;
59
59
expect ( error . name ) . to . equal ( "ValidationError" ) ;
60
60
expect ( error . message ) . to . equal ( "Error #42: Invalid emailAddress" ) ;
61
- expect ( error . stack ) . to . satisfy ( compareStacks ( [ "createValidationError" ] ) ) ;
61
+ expect ( error . stack ) . to . satisfy ( compareStacks (
62
+ host . error . stack . includesClassNames
63
+ ? [ "ValidationError" , "createValidationError" ]
64
+ : [ "createValidationError" ]
65
+ ) ) ;
62
66
expect ( error ) . to . satisfy ( compareKeys ( "name" , "message" , "stack" , "toJSON" , "errorNumber" , "fieldName" ) ) ;
63
67
64
68
expect ( error . toJSON ( ) ) . to . satisfy ( comparePOJO ( {
@@ -106,7 +110,9 @@ describe("Ono.extend()", () => {
106
110
expect ( error . name ) . to . equal ( "ServerError" ) ;
107
111
expect ( error . message ) . to . equal ( "HTTP 500: A server error occurred" ) ;
108
112
expect ( error . stack ) . to . satisfy ( compareStacks (
109
- [ "createServerError" ] ,
113
+ host . error . stack . includesClassNames
114
+ ? [ "ServerError" , "createServerError" ]
115
+ : [ "createServerError" ] ,
110
116
[ "createOriginalError" ] ,
111
117
) ) ;
112
118
expect ( error ) . to . satisfy ( compareKeys ( "name" , "message" , "stack" , "toJSON" , "method" , "url" ) ) ;
0 commit comments