Permalink
Browse files

more robust minifier test (for Travis)

  • Loading branch information...
1 parent 13c3532 commit ac77f4234d64f8582e4bf68f96b95ef2cb0ea76f @rvagg rvagg committed Oct 16, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 test/functional/minifier-test.js
@@ -31,10 +31,13 @@ var testCase = require('buster').testCase
, xregexp = require('xregexp').XRegExp
, functionalCommon = require('./common')
+ , javaVersionRe = /\W1\.\d\.\d/
+
testCase('Functional: minify', {
'setUp': function (done) {
- childProcess.exec('java -version', function (err) {
- this.javaAvailable = !err
+ childProcess.exec('java -version', function (err, stdout, stderr) {
+ this.javaAvailable =
+ !err && (javaVersionRe.test(stderr.toString()) || javaVersionRe.test(stdout.toString()))
if (err) {
require('colors')
console.log('\nWARNING: java not available on this system, can\'t test Closure'.magenta.bold.inverse)
@@ -44,7 +47,7 @@ testCase('Functional: minify', {
}
, 'ender build qwery bonzo bean --minifier <all>': function (done) {
- this.timeout = 90000
+ this.timeout = 120000
assert.match.message = '${2}'
var buildCmd = 'build qwery bonzo bean --minifier '

0 comments on commit ac77f42

Please sign in to comment.