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(
262
262
return ;
263
263
}
264
264
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' ) ;
270
266
271
267
const expectedEntries = Object . entries ( expected ) ;
272
268
273
269
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' ) ;
279
271
for ( const [ index , value ] of expectedEntries ) {
280
272
path . push ( `[${ index } ]` ) ;
281
273
checkNestedDocuments ( index , value , checkExtraKeys ) ;
You can’t perform that action at this time.
0 commit comments