Skip to content

Commit 14ea082

Browse files
buslovRichardLitt
authored andcommitted
Added test for TOC to .travis.yml (k88hudson#205)
Runs doctoc for README*.md. If in newly doctoc'ed README*.md there are any diffs against ones commited in git HEAD then the test failes. The script are using the latest anchor-markdown-header from repo to avoid the bug with non-ASCII headers.
1 parent ea40bf7 commit 14ea082

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
package-lock.json

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ rvm:
33
- 2.2
44
before_script:
55
- gem install awesome_bot
6+
- npm install
67
script:
78
- awesome_bot README.md --allow-dupe --allow-redirect
89
- awesome_bot README_*.md --allow-dupe --allow-redirect
10+
- node node_modules/doctoc/doctoc.js --github README.md README_*.md
11+
- test -z "`git diff -- README.md`"
12+
- test -z "`git diff -- README_*.md`"

package.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"private": true,
3+
"name": "git-flight-rules",
4+
"version": "1.0.0",
5+
"description": "Flight rules for git",
6+
"devDependencies": {
7+
"doctoc": "^1.3.0",
8+
"anchor-markdown-header": "thlorenz/anchor-markdown-header#master"
9+
}
10+
}

0 commit comments

Comments
 (0)