Skip to content

Commit fb70658

Browse files
authored
test(NODE-7538): ignore unknown fields in listIndexes (#4922)
1 parent affc3f9 commit fb70658

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/integration/index_management.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -820,10 +820,9 @@ describe('Indexes', function () {
820820
const indexName = await collection.createIndex('a', { hidden: true });
821821
expect(indexName).to.equal('a_1');
822822
const indexes = await collection.listIndexes().toArray();
823-
expect(indexes).to.deep.equal([
824-
{ v: 2, key: { _id: 1 }, name: '_id_' },
825-
{ v: 2, key: { a: 1 }, name: 'a_1', hidden: true }
826-
]);
823+
expect(indexes).to.have.lengthOf(2);
824+
expect(indexes[0]).to.containSubset({ v: 2, key: { _id: 1 }, name: '_id_' });
825+
expect(indexes[1]).to.containSubset({ v: 2, key: { a: 1 }, name: 'a_1', hidden: true });
827826
}
828827
);
829828
});

0 commit comments

Comments
 (0)