From 3e96e3051b4251387ddac3122fa3c741effd9a0c Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Sat, 6 Jun 2015 19:50:23 -0400 Subject: [PATCH] make CLI tests work in Travis-CI --- bin/{index.js => rollup} | 0 package.json | 2 +- test/test.js | 6 +++++- 3 files changed, 6 insertions(+), 2 deletions(-) rename bin/{index.js => rollup} (100%) diff --git a/bin/index.js b/bin/rollup similarity index 100% rename from bin/index.js rename to bin/rollup diff --git a/package.json b/package.json index eacb07c..2247f3e 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "dist/rollup.js", "jsnext:main": "src/rollup.js", "bin": { - "rollup": "./bin/index.js" + "rollup": "./bin/rollup" }, "scripts": { "test": "mocha", diff --git a/test/test.js b/test/test.js index 7d53869..f5ebbf0 100644 --- a/test/test.js +++ b/test/test.js @@ -234,7 +234,11 @@ describe( 'rollup', function () { ( config.skip ? it.skip : config.solo ? it.only : it )( dir, function ( done ) { 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 ( stderr ) console.error( stderr );