mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
test(cli): run cli tests only on node >= 0.12
This commit is contained in:
parent
1a764b0280
commit
d8111d1791
|
@ -2,6 +2,7 @@ language: node_js
|
|||
node_js:
|
||||
- "0.8"
|
||||
- "0.10"
|
||||
- "0.12"
|
||||
|
||||
before_install:
|
||||
- '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28'
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
"js-beautify": "^1.5.6",
|
||||
"load-grunt-tasks": "^3.2.0",
|
||||
"quiet-grunt": "^0.2.3",
|
||||
"semver": "^5.0.0",
|
||||
"sinon": "^1.14.1",
|
||||
"source-map-support": "^0.2.9"
|
||||
},
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
var execSync = require('child_process').execSync,
|
||||
cmd = 'node bin/showdown.js';
|
||||
var semver = require('semver'),
|
||||
cmd = 'node bin/showdown.js';
|
||||
|
||||
describe('showdown cli', function () {
|
||||
'use strict';
|
||||
|
||||
it('basic stdin stdout', function () {
|
||||
var otp = execSync(cmd + ' makehtml', {
|
||||
encoding: 'utf8',
|
||||
input: '**foo**'
|
||||
if (semver.gt(process.versions.node, '0.12.0')) {
|
||||
var execSync = require('child_process').execSync;
|
||||
it('basic stdin stdout', function () {
|
||||
var otp = execSync(cmd + ' makehtml', {
|
||||
encoding: 'utf8',
|
||||
input: '**foo**'
|
||||
});
|
||||
otp.trim().should.equal('<p><strong>foo</strong></p>');
|
||||
});
|
||||
otp.trim().should.equal('<p><strong>foo</strong></p>');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user