-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
4e97d63
commit ff80932
Showing
18 changed files
with
117 additions
and
86 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
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 |
---|---|---|
|
@@ -6,39 +6,46 @@ import { setupTestEditor } from '../../common'; | |
import EditorModel from '../../../src/editor/model/Editor'; | ||
import htmlFormat from 'pretty'; | ||
|
||
type Comment = { | ||
postId: number; | ||
id: string; | ||
name: string; | ||
email: string; | ||
body: string; | ||
}; | ||
function getComments() { | ||
const json = [ | ||
{ | ||
postId: 1, | ||
id: 1, | ||
id: '1', | ||
name: 'id labore ex et quam laborum', | ||
email: '[email protected]', | ||
body: 'laudantium enim quasi est quidem magnam voluptate ipsam eos\ntempora quo necessitatibus\ndolor quam autem quasi\nreiciendis et nam sapiente accusantium', | ||
}, | ||
{ | ||
postId: 1, | ||
id: 2, | ||
id: '2', | ||
name: 'quo vero reiciendis velit similique earum', | ||
email: '[email protected]', | ||
body: 'est natus enim nihil est dolore omnis voluptatem numquam\net omnis occaecati quod ullam at\nvoluptatem error expedita pariatur\nnihil sint nostrum voluptatem reiciendis et', | ||
}, | ||
{ | ||
postId: 1, | ||
id: 3, | ||
id: '3', | ||
name: 'odio adipisci rerum aut animi', | ||
email: '[email protected]', | ||
body: 'quia molestiae reprehenderit quasi aspernatur\naut expedita occaecati aliquam eveniet laudantium\nomnis quibusdam delectus saepe quia accusamus maiores nam est\ncum et ducimus et vero voluptates excepturi deleniti ratione', | ||
}, | ||
{ | ||
postId: 1, | ||
id: 4, | ||
id: '4', | ||
name: 'alias odio sit', | ||
email: '[email protected]', | ||
body: 'non et atque\noccaecati deserunt quas accusantium unde odit nobis qui voluptatem\nquia voluptas consequuntur itaque dolor\net qui rerum deleniti ut occaecati', | ||
}, | ||
{ | ||
postId: 1, | ||
id: 5, | ||
id: '5', | ||
name: 'vero eaque aliquid doloribus et culpa', | ||
email: '[email protected]', | ||
body: 'harum non quasi et ratione\ntempore iure ex voluptates in ratione\nharum architecto fugit inventore cupiditate\nvoluptates magni quo et', | ||
|
@@ -64,7 +71,7 @@ describe('JsonPlaceholder Usage', () => { | |
|
||
test('should render a list of comments from jsonplaceholder api', async () => { | ||
const comments = getComments(); | ||
const dataSource: DataSourceProps = { | ||
const dataSource: DataSourceProps<Comment> = { | ||
id: 'comments', | ||
records: comments as any, | ||
}; | ||
|
Oops, something went wrong.