-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from SyntaxHighlighter to Prism (syntax highlighting) (#7122)
- Loading branch information
1 parent
77d3496
commit e3406c7
Showing
42 changed files
with
283 additions
and
1,555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
app/assets/javascripts/Components/__tests__/text_viewer.test.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from "react"; | ||
import {render, screen, cleanup} from "@testing-library/react"; | ||
import {TextViewer} from "../Result/text_viewer"; | ||
|
||
describe("TextViewer", () => { | ||
let props; | ||
|
||
beforeEach(() => { | ||
props = { | ||
content: "def f(n: int) -> int:\n return n + 1\n", | ||
annotations: [], | ||
focusLine: null, | ||
submission_file_id: 1, | ||
}; | ||
|
||
render(<TextViewer {...props} />); | ||
}); | ||
|
||
afterEach(cleanup); | ||
|
||
it("should render its text content", () => { | ||
expect(screen.getByText("def f(n: int) -> int:")).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.