From 2601c7bbca6d1617c37e0934b5b460653ba37739 Mon Sep 17 00:00:00 2001 From: Malik Javaid Date: Thu, 15 Jun 2023 13:45:27 -0400 Subject: [PATCH] fixed identical test cases --- test/integration/crud/explain.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/integration/crud/explain.test.ts b/test/integration/crud/explain.test.ts index 0cfd999aac..f9af6d9dd8 100644 --- a/test/integration/crud/explain.test.ts +++ b/test/integration/crud/explain.test.ts @@ -77,21 +77,24 @@ describe('Explain', function () { }); context('when explain is set to false', () => { - it('only queryPlanner property is used in explain result', async function () { + it('deleteOne only returns queryPlanner property in explain result', async function () { const explanation = await collection.deleteOne({ a: 1 }, { explain: false }); expect(explanation).property('queryPlanner').to.exist; + expect(explanation).to.not.have.property('executionStats'); }); it('find returns "queryPlanner" explain result specified on cursor', async function () { const explanation = await collection.find({ a: 1 }).explain(false); expect(explanation).property('queryPlanner').to.exist; + expect(explanation).to.not.have.property('executionStats'); }); }); context('when explain is set to "queryPlanner"', () => { - it('only queryPlanner property is used in explain result', async function () { + it('deleteOne returns only queryPlanner property in explain result', async function () { const explanation = await collection.deleteOne({ a: 1 }, { explain: 'queryPlanner' }); expect(explanation).property('queryPlanner').to.exist; + expect(explanation).to.not.have.property('executionStats'); }); it('findOneAndReplace returns queryPlanner explain result', async function () {