Skip to content

Commit 131b43d

Browse files
committed
split test into unit and integration
provide some dummy tests cases
1 parent 6364c2c commit 131b43d

File tree

5 files changed

+60
-0
lines changed

5 files changed

+60
-0
lines changed

test/fixtures/simple/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Heading
2+
3+
[another page](other.md)
4+
5+
## II 1
6+
7+
### III 1
8+
9+
#### IV 1
10+
11+
##### V 1
12+
13+
14+
## II 2
15+
16+
### III 2
17+
18+
#### IV 2

test/fixtures/simple/other-page.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Other
2+
3+
## two 1
4+
5+
### three 1
6+
7+
#### four 1
8+
9+
##### five 1
10+
11+
12+
## two 2
13+
14+
### three 2
15+
16+
#### four 2

test/integration/render.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const path = require('path')
2+
3+
const {expect} = require('chai')
4+
5+
const {init, expectSameDom} = require('./_helper')
6+
7+
describe('full docsify initialization', function() {
8+
it('TODO: check generated markup', async function() {
9+
const {docsify, dom} = await init('simple', {loadSidebar: true})
10+
console.log(dom.window.document.body.innerHTML)
11+
})
12+
13+
})

test/integration/router.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const path = require('path')
2+
3+
const {expect} = require('chai')
4+
5+
const {init, expectSameDom} = require('./_helper')
6+
7+
describe('router', function() {
8+
it('TODO: trigger to load another page', async function() {
9+
const {docsify} = await init()
10+
window.location = '/?foo=bar'
11+
})
12+
13+
})
File renamed without changes.

0 commit comments

Comments
 (0)