Skip to content

Commit

Permalink
Update show-reading-time
Browse files Browse the repository at this point in the history
  • Loading branch information
trueberryless authored Nov 11, 2024
1 parent a70f967 commit af0569f
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'

import { calculateReadingTime, getReadingTime, formatReadingTime } from '../../../libs/readingTime'

describe('getReadingTime', () => {
test('show reading time, overridden by frontmatter', () => {
expect(getReadingTime()).toBe(1)
expect(getReadingTime()).toBe(1)
})

test('show reading time, calculated automatically', () => {
expect(getReadingTime()).toBe(1)
expect(getReadingTime()).toBe(1)
})
})

0 comments on commit af0569f

Please sign in to comment.