• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1var test = require('tap').test
2
3test('semver doc is up to date', function (t) {
4  var path = require('path')
5  var moddoc = path.join(__dirname, '../../node_modules/semver/README.md')
6  var mydoc = path.join(__dirname, '../../docs/content/using-npm/semver.md')
7  var fs = require('fs')
8  var mod = fs.readFileSync(moddoc, 'utf8')
9  mod = mod.substr(mod.match(/^## Install$/m).index)
10  var my = fs.readFileSync(mydoc, 'utf8')
11  my = my.substr(my.match(/^## Install$/m).index)
12  t.equal(my, mod)
13  t.end()
14})
15