Skip to content

Tests are broken due to changes in mdast-util-find-and-replace #40

@remcohaszing

Description

@remcohaszing

Initial checklist

Affected packages and versions

remark-github, [email protected]

Link to runnable example

No response

Steps to reproduce

The following will show tests are broken:

git clone [email protected]:remarkjs/remark-github.git
cd remark-github
npm install
npm test

This will fix them:

npm install [email protected]
npm test

Expected behavior

Tests work, just like they did before [email protected] was released

Actual behavior

Two fixture tests fail.

--- a/test/fixtures/reference-advanced/output.md
+++ b/test/fixtures/reference-advanced/output.md
@@ -1,4 +1,4 @@
-# User\@SHA
+# User\\@SHA
 
 Multiple slashes: foo/bar/baz@[`0000000`](https://github.com/wooorm/remark/commit/0000000), foo/bar/baz#1, @foo/bar/baz.
 
@@ -6,8 +6,8 @@ Dashes around slashes: [foobar-/baz@`0000000`](https://github.com/foobar-/baz/co
 
 Upper-case projects: [foobar/bAz@`0000000`](https://github.com/foobar/bAz/commit/0000000), [foobar/Baz#1](https://github.com/foobar/Baz/issues/1).
 
-[**@foo-/bar**](https://github.com/foo-/bar), @foo/-bar.
+@foo-/bar, @foo/-bar.
 
 [f/b#1](https://github.com/f/b/issues/1). f/b#0. [f/b@`0000000`](https://github.com/f/b/commit/0000000).
 
-.[#1](https://github.com/wooorm/remark/issues/1). .[**@0000000**](https://github.com/0000000). foo#. bar\@.
+.[#1](https://github.com/wooorm/remark/issues/1). .[**@0000000**](https://github.com/0000000). foo#. bar\\@.
diff --git a/test/fixtures/sha-range/output.md b/test/fixtures/sha-range/output.md
--- a/test/fixtures/sha-range/output.md
+++ b/test/fixtures/sha-range/output.md
@@ -1,6 +1,6 @@
 range comparison: [`e2acebc...2aa9311`](https://github.com/wooorm/remark/compare/e2acebc...2aa9311)
 
-actual unicode ellipsis: [`e2acebc`](https://github.com/wooorm/remark/commit/e2acebc)…2aa9311
+actual unicode ellipsis: e2acebc…2aa9311
 
 punctuation before: -e2acebc...[`2aa9311`](https://github.com/wooorm/remark/commit/2aa9311)
 
@@ -8,7 +8,7 @@ punctuation before: -e2acebc...[`2aa9311`](https://github.com/wooorm/remark/comm
 
 two: [`e2acebc`](https://github.com/wooorm/remark/commit/e2acebc)..[`2aa9311`](https://github.com/wooorm/remark/commit/2aa9311)
 
-one: [`e2acebc`](https://github.com/wooorm/remark/commit/e2acebc).2aa9311
+one: e2acebc.2aa9311
 
 fork? [other@`e2acebc`](https://github.com/other/remark/commit/e2acebc)...[`2aa9311`](https://github.com/wooorm/remark/commit/2aa9311)

Runtime

Node v16

Package manager

npm 8

OS

Linux

Build and bundle tools

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    👀 no/externalThis makes more sense somewhere else👎 phase/noPost cannot or will not be acted on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions