Skip to content

Commit

Permalink
Don't put closing parens on their own line in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Jun 23, 2022
1 parent 48170d4 commit 993e815
Showing 1 changed file with 8 additions and 29 deletions.
37 changes: 8 additions & 29 deletions test/test-parse.ts
Expand Up @@ -157,45 +157,24 @@ describe("markdown", () => {
same("foo`*`", doc(p("foo", code("*")))))

it("doesn't escape underscores between word characters", () =>
same(
"abc_def",
doc(p("abc_def"))
)
)
same("abc_def", doc(p("abc_def"))))

it("doesn't escape strips of underscores between word characters", () =>
same(
"abc___def",
doc(p("abc___def"))
)
)
same("abc___def", doc(p("abc___def"))))

it("escapes underscores at word boundaries", () =>
same(
"\\_abc\\_",
doc(p("_abc_"))
)
)
same("\\_abc\\_", doc(p("_abc_"))))

it("escapes underscores surrounded by non-word characters", () =>
same(
"/\\_abc\\_)",
doc(p("/_abc_)"))
)
)
same("/\\_abc\\_)", doc(p("/_abc_)"))))

it("ensure no escapes in url", () =>
parse(
"[text](https://example.com/_file/#~anchor)",
doc(p(a({href: "https://example.com/_file/#~anchor"}, "text")))
)
)
parse("[text](https://example.com/_file/#~anchor)",
doc(p(a({href: "https://example.com/_file/#~anchor"}, "text")))))

it("ensure no escapes in autolinks", () =>
same(
"<https://example.com/_file/#~anchor>",
doc(p(a({href: "https://example.com/_file/#~anchor"}, "https://example.com/_file/#~anchor")))
)
same("<https://example.com/_file/#~anchor>",
doc(p(a({href: "https://example.com/_file/#~anchor"}, "https://example.com/_file/#~anchor"))))
)

it("escapes extra characters from options", () => {
Expand Down

0 comments on commit 993e815

Please sign in to comment.