-
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.
[Feature #165412893] highlight text in article
- Loading branch information
Showing
57 changed files
with
1,483 additions
and
123 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,17 @@ | ||
import { | ||
deleteArticleHighlight, | ||
clearDeleteArticleHighlightStore | ||
} from '../../../actions/articles'; | ||
|
||
const dispatch = jest.fn(action => action); | ||
const highlightToDelete = { | ||
slug: 'slug', | ||
highlightId: 1 | ||
}; | ||
|
||
test('should delete a highlight', () => { | ||
clearDeleteArticleHighlightStore()(dispatch); | ||
const result = deleteArticleHighlight(highlightToDelete)(dispatch); | ||
expect(result).toHaveProperty('type'); | ||
expect(result).toHaveProperty('payload'); | ||
}); |
10 changes: 10 additions & 0 deletions
10
src/__tests__/actions/articles/getArticleHighlights.test.js
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 { getArticleHighlights, clearGetArticleHighlightsStore } from '../../../actions/articles'; | ||
|
||
const dispatch = jest.fn(action => action); | ||
|
||
test('should get all highlights', () => { | ||
clearGetArticleHighlightsStore()(dispatch); | ||
const result = getArticleHighlights('slug')(dispatch); | ||
expect(result).toHaveProperty('type'); | ||
expect(result).toHaveProperty('payload'); | ||
}); |
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,11 @@ | ||
import { highlightArticle, clearHighlightArticleStore } from '../../../actions/articles'; | ||
import { newHighlight } from '../../../__mocks__/article'; | ||
|
||
const dispatch = jest.fn(action => action); | ||
|
||
test('should highlight text in article', () => { | ||
clearHighlightArticleStore()(dispatch); | ||
const result = highlightArticle(newHighlight)(dispatch); | ||
expect(result).toHaveProperty('type'); | ||
expect(result).toHaveProperty('payload'); | ||
}); |
3 changes: 0 additions & 3 deletions
3
src/__tests__/actions/rating/__snapshots__/createRate.test.js.snap
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.