Skip to content

Commit a2b461e

Browse files
committed
fix tests
1 parent 3a34e5e commit a2b461e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

site/src/components/AuditLogRow/AuditLogDescription/AuditLogDescription.test.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ describe("AuditLogDescription", () => {
7575
truncatedDescription: `${MockAuditLogSuccessfulLogin.user?.username} logged in`,
7676
target: "",
7777
onBehalfOf: undefined,
78-
}).trim(),
78+
})
79+
.replace(/<[^>]*>/g, " ")
80+
.replace(/\s{2,}/g, " ")
81+
.trim(),
7982
),
8083
).toBeInTheDocument()
8184

@@ -91,7 +94,10 @@ describe("AuditLogDescription", () => {
9194
truncatedDescription: `${MockAuditLogUnsuccessfulLoginKnownUser.user?.username} logged in`,
9295
target: "",
9396
onBehalfOf: undefined,
94-
}).trim(),
97+
})
98+
.replace(/<[^>]*>/g, " ")
99+
.replace(/\s{2,}/g, " ")
100+
.trim(),
95101
),
96102
).toBeInTheDocument()
97103

@@ -107,7 +113,10 @@ describe("AuditLogDescription", () => {
107113
truncatedDescription: "an unknown user logged in",
108114
target: "",
109115
onBehalfOf: undefined,
110-
}).trim(),
116+
})
117+
.replace(/<[^>]*>/g, " ")
118+
.replace(/\s{2,}/g, " ")
119+
.trim(),
111120
),
112121
).toBeInTheDocument()
113122

0 commit comments

Comments
 (0)