Skip to content

fix: Syntax highlighting with long lines and untar content with emojis #5098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix test
  • Loading branch information
BrunoQuaresma committed Nov 15, 2022
commit ab772a4076944b59225137fc44eb76baae06c110
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ const TEMPLATE_NAME = "coder-ts"
const VERSION_NAME = "12345"
const TERRAFORM_FILENAME = "main.tf"
const README_FILENAME = "readme.md"
const GPG_FILENAME = "key.gpg"
const TEMPLATE_VERSION_FILES = {
[TERRAFORM_FILENAME]: "{}",
[README_FILENAME]: "Readme",
[GPG_FILENAME]: "Some sensitive info",
}

const setup = async () => {
Expand All @@ -38,10 +36,9 @@ const setup = async () => {
describe("TemplateVersionPage", () => {
beforeEach(setup)

it("shows the tf and md files only", () => {
it("shows files", () => {
expect(screen.queryByText(TERRAFORM_FILENAME)).toBeInTheDocument()
expect(screen.queryByText(README_FILENAME)).toBeInTheDocument()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we end up changing this test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because now, the filtering happens inside of the "parsing" function. I made it to not have to parse 100 files to only get 2 of them after.

expect(screen.queryByText(GPG_FILENAME)).not.toBeInTheDocument()
})

it("shows the right content when click on the file name", async () => {
Expand Down