Skip to content

Commit

Permalink
Add test regarding markdown render
Browse files Browse the repository at this point in the history
  • Loading branch information
sroertgen committed Feb 10, 2025
1 parent 8ff2394 commit 79bd877
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion test/concept.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ describe.concurrent("Concept", () => {
expect(
screen.getByRole("heading", { name: "Definition" })
).toBeInTheDocument()
expect(screen.getByText("Meine Definition")).toBeInTheDocument()
const definition = screen.getByText("Meine Definition")
expect(definition).toBeInTheDocument()

const linkElement = within(definition).getByRole("link", { name: /link/i })
expect(linkElement).toBeInTheDocument()
})

it("renders no definition if not provided in language", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/data/pageContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const topConcept = {
de: ["Verstecktes Label 1", "Verstecktes Label 2"],
},
definition: {
de: "Meine Definition",
de: "Meine Definition [Link](https://w3c.org)",
},
example: {
de: "Ein Beispiel [Link](https://w3c.org)",
Expand Down

0 comments on commit 79bd877

Please sign in to comment.