diff --git a/src/components/timeline/__tests__/map.test.js b/src/components/timeline/__tests__/map.test.js index 094ee71f..7de627ce 100644 --- a/src/components/timeline/__tests__/map.test.js +++ b/src/components/timeline/__tests__/map.test.js @@ -13,6 +13,7 @@ describe("MapLegend", () => { platforms={[ { name: "Falcon", type: "Jet" }, { name: "Campaign FS", type: "static" }, + { name: "Campaign FS", type: "static" }, ]} selectedPlatform={""} setSelectedPlatform={fn} @@ -29,11 +30,12 @@ describe("MapLegend", () => { expect(instance.findByType(LineIcon).props.size).toBe("text") expect(instance.findByType(CircleIcon).props.size).toBe("extra-tiny") }) - it("render option with one selected", () => { + it("render with one option selected", () => { const fn = jest.fn() const element = renderer.create( { + const names = platforms.map(i => i.name) + const uniquePlatforms = platforms.filter( + (i, index) => names.indexOf(i.name) === index + ) return (

Platforms

- {platforms.map(platform => ( + {uniquePlatforms.map(platform => (