-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9c006f
commit 6c64a1e
Showing
12 changed files
with
80 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
diff --git a/rename.js b/rename.js | ||
index aa39060..0e05564 100644 | ||
--- a/rename.js | ||
+++ b/rename.js | ||
@@ -4 +4,5 @@ function hello() { | ||
// hello world | ||
+ console.log("hello world"); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`chunk-context parse \`chunk-context\` 1`] = ` | ||
{ | ||
"files": [ | ||
{ | ||
"chunks": [ | ||
{ | ||
"changes": [ | ||
{ | ||
"content": " // hello world", | ||
"lineAfter": 4, | ||
"lineBefore": 4, | ||
"type": "UnchangedLine", | ||
}, | ||
{ | ||
"content": " console.log(\"hello world\");", | ||
"lineAfter": 5, | ||
"type": "AddedLine", | ||
}, | ||
], | ||
"context": "function hello() {", | ||
"fromFileRange": { | ||
"lines": 4, | ||
"start": 4, | ||
}, | ||
"toFileRange": { | ||
"lines": 5, | ||
"start": 4, | ||
}, | ||
"type": "Chunk", | ||
}, | ||
], | ||
"path": "rename.js", | ||
"type": "ChangedFile", | ||
}, | ||
], | ||
"type": "GitDiff", | ||
} | ||
`; |
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
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
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,10 @@ | ||
import { getFixture } from './test-utils'; | ||
import parseGitDiff from '../parse-git-diff'; | ||
|
||
describe('chunk-context', () => { | ||
const fixture = getFixture('chunk-context'); | ||
|
||
it('parse `chunk-context`', () => { | ||
expect(parseGitDiff(fixture)).toMatchSnapshot(); | ||
}); | ||
}); |
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