Skip to content

Commit 38d59d8

Browse files
committed
spicy chai
1 parent 19932e4 commit 38d59d8

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

test/tools/unified-spec-runner/match.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)