diff --git a/src/commands/sbom/__tests__/payload.test.ts b/src/commands/sbom/__tests__/payload.test.ts index 07f3ea8ff..27aa206a6 100644 --- a/src/commands/sbom/__tests__/payload.test.ts +++ b/src/commands/sbom/__tests__/payload.test.ts @@ -63,14 +63,14 @@ describe('generation of payload', () => { expect(payload?.commit.branch).toStrictEqual(expect.any(String)) expect(payload?.repository.url).toContain('github.com') expect(payload?.repository.url).toContain('DataDog/datadog-ci') - expect(payload?.dependencies.length).toBe(2) + expect(payload?.dependencies).toHaveLength(2) expect(payload?.dependencies[0].name).toBe('Flask') expect(payload?.dependencies[0].version).toBe('3.0.0') - expect(payload?.dependencies[0].licenses.length).toBe(1) + expect(payload?.dependencies[0].licenses).toHaveLength(0) expect(payload?.dependencies[0].language).toBe(DependencyLanguage.PYTHON) expect(payload?.dependencies[1].name).toBe('requests') expect(payload?.dependencies[1].version).toBe('2.31.0') - expect(payload?.dependencies[1].licenses.length).toBe(1) + expect(payload?.dependencies[1].licenses).toHaveLength(0) expect(payload?.dependencies[1].language).toBe(DependencyLanguage.PYTHON) })