diff --git a/testing/tests/developing.spec.js b/testing/tests/developing.spec.js index ded6dbf4abbe..4f6b1401cf10 100644 --- a/testing/tests/developing.spec.js +++ b/testing/tests/developing.spec.js @@ -70,7 +70,7 @@ test.describe("Testing the kitchensink page", () => { ).json(); expect(doc.title).toBe("The MDN Content Kitchensink"); - expect(Object.keys(doc.flaws).length).toBe(0); + expect(doc.flaws).toEqual({}); }); // XXX Do more advanced tasks that test the server and document "CRUD operations" diff --git a/testing/tests/index.test.js b/testing/tests/index.test.js index a70d612466c3..b6b41d2e45ab 100644 --- a/testing/tests/index.test.js +++ b/testing/tests/index.test.js @@ -1395,7 +1395,7 @@ test("img tags without 'src' should not crash", () => { ); const jsonFile = path.join(builtFolder, "index.json"); const { doc } = JSON.parse(fs.readFileSync(jsonFile)); - expect(Object.keys(doc.flaws).length).toBe(0); + expect(doc.flaws).toEqual({}); }); test("/Web/Embeddable should have 3 valid live samples", () => { @@ -1413,7 +1413,7 @@ test("/Web/Embeddable should have 3 valid live samples", () => { const jsonFile = path.join(builtFolder, "index.json"); const { doc } = JSON.parse(fs.readFileSync(jsonFile)); - expect(Object.keys(doc.flaws).length).toBe(0); + expect(doc.flaws).toEqual({}); const builtFiles = fs.readdirSync(path.join(builtFolder)); expect(