1import { describe, expect, it } from "vite-plus/test";
2import { isBotBadgeImage } from "./botBadgeImages";
3
4describe("bot badge images", () => {
5 it("matches bot badges but not screenshots hosted by the same services", () => {
6 const badges = [
7 "https://static.devin.ai/assets/gh-devin-review-light.svg?v=4",
8 "https://cursor.com/assets/images/open-in-web-dark.png",
9 "https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg",
10 "https://img.shields.io/badge/P1-orange",
11 "https://greptile-static-assets.s3.amazonaws.com/badges/ViewArtifacts.svg?v=4",
12 "https://www.gstatic.com/codereviewagent/high-priority.svg",
13 "https://user-images.githubusercontent.com/23264/106598434-9e719e00-654f-11eb-9e59-6167043cfa01.png",
14 ];
15 const screenshots = [
16 // Cursor cloud agents embed their screenshots and recordings as artifacts.
17 "https://cursor.com/artifacts/c/art-41567e7e-97f5-46ff-9e6e-df6a85723409",
18 "https://www.cursor.com/artifacts/c/art-98360ed1-44f8-4459-bea3-43bf93cc74fc",
19 "https://app.devin.ai/attachments/abc/ss_1.png",
20 "https://user-images.githubusercontent.com/23264/1-other-upload.png",
21 "https://storage.googleapis.com/some-bucket/before.png",
22 ];
23 expect(badges.filter(isBotBadgeImage)).toEqual(badges);
24 expect(screenshots.filter(isBotBadgeImage)).toEqual([]);
25 });
26});