Skip to content

Commit 50a883d

Browse files
committed
chai latte
1 parent 38d59d8 commit 50a883d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,13 @@ export function resultCheck(
262262
return;
263263
}
264264

265-
expect(actual, `Expected actual to be an object at: ${path.join('')}`).to.be.an('object');
265+
expect(actual, `Expected actual to be an object at: ${path.join('')}`).to.be.an(
266+
Array.isArray(expected) ? 'array' : 'object'
267+
);
266268

267269
const expectedEntries = Object.entries(expected);
268270

269271
if (Array.isArray(expected)) {
270-
expect(actual, `Expected actual to be an array at: ${path.join('')}`).to.be.an('array');
271272
for (const [index, value] of expectedEntries) {
272273
path.push(`[${index}]`);
273274
checkNestedDocuments(index, value, checkExtraKeys);

test/unit/tools/unified_spec_runner.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ describe('Unified Spec Runner', function () {
135135

136136
expect(() => resultCheckSpy(actual, expected, entitiesMap, [])).to.throw(
137137
AssertionError,
138-
/Expected actual value to be an object/
138+
/to be an object/
139139
);
140140
});
141141
});

0 commit comments

Comments
 (0)