Browse Source

make CLI tests work in Travis-CI

contingency-plan
Rich-Harris 10 years ago
parent
commit
3e96e3051b
  1. 0
      bin/rollup
  2. 2
      package.json
  3. 6
      test/test.js

0
bin/index.js → bin/rollup

2
package.json

@ -5,7 +5,7 @@
"main": "dist/rollup.js", "main": "dist/rollup.js",
"jsnext:main": "src/rollup.js", "jsnext:main": "src/rollup.js",
"bin": { "bin": {
"rollup": "./bin/index.js" "rollup": "./bin/rollup"
}, },
"scripts": { "scripts": {
"test": "mocha", "test": "mocha",

6
test/test.js

@ -234,7 +234,11 @@ describe( 'rollup', function () {
( config.skip ? it.skip : config.solo ? it.only : it )( dir, function ( done ) { ( config.skip ? it.skip : config.solo ? it.only : it )( dir, function ( done ) {
process.chdir( path.resolve( CLI, dir ) ); process.chdir( path.resolve( CLI, dir ) );
exec( config.command, function ( err, code, stderr ) { exec( config.command, {
env: {
PATH: path.resolve( __dirname, '../bin' ) + ':' + process.env.PATH
}
}, function ( err, code, stderr ) {
if ( err ) return done( err ); if ( err ) return done( err );
if ( stderr ) console.error( stderr ); if ( stderr ) console.error( stderr );

Loading…
Cancel
Save