File: version.test.js

package info (click to toggle)
node-carto 0.9.5-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, sid, stretch
  • size: 2,272 kB
  • ctags: 329
  • sloc: xml: 189; makefile: 22
file content (17 lines) | stat: -rw-r--r-- 633 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var carto = require('../lib/carto');
var fs = require('fs');
var path = require('path');
var assert = require('assert');


describe('Version check', function() {
    it('test version matches package.json version and changelog', function() {
        if (parseInt(process.version.split('.')[1]) > 4) {
            var info = require('../package.json');
            assert.deepEqual(info.version.split('.'), carto.version);
        } else {
            var info = JSON.parse(require('fs').readFileSync(path.join(__dirname,'../package.json')));
            assert.deepEqual(info.version.split('.'), carto.version);
        }
    });
});