Skip to content
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

Add test showing section issue #30

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alex-broad
Copy link
Contributor

This test fails with:

● pureGetEdits › rename › updates files linking to a section in the moved file in a table

    expect(received).toEqual(expected) // deep equality

    - Expected  - 2
    + Received  + 2

    @@ -1,12 +1,12 @@
      Array [
        Object {
    -     "newText": "folder/newfolder/file-2.md#heading",
    +     "newText": "folder/newfolder/file-2.md",
          "path": "file-1.md",
          "range": Object {
            "end": Object {
    -         "character": 50,
    +         "character": 42,
              "line": 1,
            },
            "start": Object {
              "character": 26,
              "line": 1,

      30 |       const edits = pureGetEdits(event, markdownFiles, options);
      31 | 
    > 32 |       expect(edits).toEqual(
         |                     ^
      33 |         expectedEdits.map((e) => {
      34 |           const [start, end] = e.range.split("-");
      35 |           const [startLine, startCharacter] = start.split(":");

      at testRename (src/__tests__/pure-get-edits.test.ts:32:21)
      at Object.<anonymous> (src/__tests__/pure-get-edits.test.ts:757:7)

Will raise issue shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant