> [email protected] test
> mocha
parseMarkdownToSteps
✔ lines before numbers should be intros,
lines started with numbers should be steps.
objects in steps should have "n", perhaps have h(href) or r(inner router links)
✔ simple steps only.
[ '## 學習料理的步驟', '學習料理,其實很簡單' ]
1) complex case should contain imgs.
parseTags
✔ split a tags list
mdToURI
✔ minify a markdown and make it to URI
countAge
✔ count a child's age by birthday(like '1985-04-01')= + ' ' + countAge('1985-04-01')
autoId
✔ make a autoId by name
6 passing (17ms)
1 failing
1) parseMarkdownToSteps
complex case should contain imgs.:
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
+ [
+ {
+ n: '1. 先在家裡廚房幫忙'
+ },
+ {
+ h: 'https://food.bestian.tw',
+ n: '2. 可以到自然美食DIY網站'
+ },
+ {
+ n: '3. 請看關於我們',
+ r: 'about'
+ },
+ imgs: [],
+ intros: [
+ '## 學習料理的步驟',
+ '學習料理,其實很簡單'
+ ],
+ title: 2
+ ]
- {
- imgs: [],
- intros: [
- '學習料理,其實很簡單'
- ],
- steps: [
- {
- n: '1. 先在家裡廚房幫忙'
- },
- {
- h: 'https://food.bestian.tw',
- n: '2. 自然美食DIY網站'
- },
- {
- n: '3. 關於我們',
- r: 'about'
- }
- ],
- tags: [
- '生活',
- '廚藝',
- '抒壓'
- ],
- title: '## 學習料理的步驟'
- }
at Context.<anonymous> (test.js:32:12)
at process.processImmediate (node:internal/timers:476:21)