File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
test/tools/unified-spec-runner Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -262,20 +262,12 @@ export function resultCheck(
262262 return ;
263263 }
264264
265- if ( typeof actual !== 'object' ) {
266- expect . fail (
267- `Expected actual value (${ inspect ( actual ) } ) to be an object at: ${ path . join ( '' ) } `
268- ) ;
269- }
265+ expect ( actual , `Expected actual to be an object at: ${ path . join ( '' ) } ` ) . to . be . an ( 'object' ) ;
270266
271267 const expectedEntries = Object . entries ( expected ) ;
272268
273269 if ( Array . isArray ( expected ) ) {
274- if ( ! Array . isArray ( actual ) ) {
275- expect . fail (
276- `expected value at ${ path . join ( '.' ) } to be an array, but received ${ inspect ( actual ) } `
277- ) ;
278- }
270+ expect ( actual , `Expected actual to be an array at: ${ path . join ( '' ) } ` ) . to . be . an ( 'array' ) ;
279271 for ( const [ index , value ] of expectedEntries ) {
280272 path . push ( `[${ index } ]` ) ;
281273 checkNestedDocuments ( index , value , checkExtraKeys ) ;
You can’t perform that action at this time.
0 commit comments