Skip to content

Commit

Permalink
Remove watch test
Browse files Browse the repository at this point in the history
  • Loading branch information
kimulaco committed Oct 25, 2019
1 parent 6ff718d commit e962ef0
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions test/broc-cli.test.ts
Expand Up @@ -49,50 +49,3 @@ describe('generate', (): void => {
expect(tags.length).toBe(6)
})
})

describe('watch', (): void => {
let blog: Blog

beforeAll(async () => {
await watch('./test/resources', './test/cli/blog.json')
blog = JSON.parse(fs.readFileSync('./test/cli/blog.json').toString())
}, 3000)

test('posts length', () => {
expect(blog.posts.length).toBe(2)
})

test('has meta', () => {
const post: Post = blog.posts[0]
expect(hasOwnProperties(post.meta, [
'id',
'title',
'description',
'category',
'tags',
'status',
'created_at',
'updated_at'
])).toBeTruthy()
})

test('has html body', () => {
const post: Post = blog.posts[0]
expect(post.body.html).toBe('<h1>test-02</h1>\n')
})

test('has md body', () => {
const post: Post = blog.posts[0]
expect(post.body.md).toBe('\n# test-02')
})

test('has text body', () => {
const post: Post = blog.posts[0]
expect(post.body.text).toBe('\ntest-02')
})

test('tags length', () => {
const tags: Tags = blog.tags
expect(tags.length).toBe(6)
})
})

0 comments on commit e962ef0

Please sign in to comment.