feat(core): Enhanced post fetching and creation with additional metadata and support for HTML source
This commit is contained in:
10
test/test.ts
10
test/test.ts
@ -19,7 +19,15 @@ tap.test('should get posts', async () => {
|
||||
const posts = await testGhostInstance.getPosts();
|
||||
expect(posts).toBeArray();
|
||||
expect(posts[0]).toBeInstanceOf(ghost.Post);
|
||||
console.log(posts.map((post) => post.getTitle()));
|
||||
console.log(JSON.stringify(posts[0].postData, null, 2));
|
||||
posts.map((post) => {
|
||||
// console.log(JSON.stringify(post.postData, null, 2));
|
||||
console.log(`-> ${post.getTitle()}`);
|
||||
console.log(`by ${post.getAuthor().name}`)
|
||||
console.log(post.getExcerpt());
|
||||
console.log(`===============`)
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
tap.start()
|
||||
|
Reference in New Issue
Block a user