velocity-cli
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -14,2 +14,6 @@ 'use strict'; | ||
if (meteorArguments.indexOf('--ci') !== -1) { | ||
meteorEnvironment.VELOCITY_CI = '1'; | ||
} | ||
if (isCommand(meteorArguments, 'test-app')) { | ||
@@ -16,0 +20,0 @@ meteorArguments = replaceCommand(meteorArguments, 'test-app', 'run'); |
{ | ||
"name": "velocity-cli", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "CLI tool for using Meteor Velocity to test your Meteor apps.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -56,3 +56,3 @@ # velocity-cli | ||
The command supports a lot more options. You can find a list [here](https://github.com/meteor/meteor/blob/120febbf8a40f262e436d907ff36e469a19d7698/tools/commands.js#L1295-L1339). | ||
The command supports a lot more options. You can find a list [here](https://github.com/meteor/meteor/blob/release/METEOR%401.2.0.2/tools/cli/commands.js#L1425-L1473). | ||
@@ -59,0 +59,0 @@ ## Testing all packages in an app |
@@ -85,7 +85,37 @@ describe('index', function () { | ||
}) | ||
it('sets the environment variable VELOCITY_CI=1', function () { | ||
var args = ['test-package', 'foo', '--ci']; | ||
var env = {}; | ||
run({ | ||
args: args, | ||
env: env | ||
}); | ||
expect(spawnTestPackagesMeteor).toHaveBeenCalled(); | ||
var spawnOptions = spawnTestPackagesMeteor.calls.argsFor(0)[0]; | ||
expect(spawnOptions.env.VELOCITY_CI).toBe('1'); | ||
}) | ||
}) | ||
describe('when --ci is not passed as argument', function () { | ||
it('does not set the environment variable VELOCITY_CI=1', function () { | ||
var args = ['test-package', 'foo']; | ||
var env = {}; | ||
run({ | ||
args: args, | ||
env: env | ||
}); | ||
expect(spawnTestPackagesMeteor).toHaveBeenCalled(); | ||
var spawnOptions = spawnTestPackagesMeteor.calls.argsFor(0)[0]; | ||
expect(spawnOptions.env.VELOCITY_CI).toBeUndefined(); | ||
}) | ||
}) | ||
}) | ||
describe('test-app command', function () { | ||
it('it executes `meteor run --test`', function () { | ||
it('executes `meteor run --test`', function () { | ||
var args = ['test-app']; | ||
@@ -108,3 +138,3 @@ var env = {}; | ||
describe('when --ci is passed as argument', function () { | ||
it('it executes `meteor run --test --ci`', function () { | ||
it('executes `meteor run --test`', function () { | ||
var args = ['test-app', '--ci']; | ||
@@ -125,4 +155,34 @@ var env = {}; | ||
}) | ||
it('sets the environment variable VELOCITY_CI=1', function () { | ||
var args = ['test-app', '--ci']; | ||
var env = {}; | ||
run({ | ||
args: args, | ||
env: env | ||
}); | ||
expect(spawnMeteor).toHaveBeenCalled(); | ||
var spawnOptions = spawnMeteor.calls.argsFor(0)[0]; | ||
expect(spawnOptions.env.VELOCITY_CI).toBe('1'); | ||
}) | ||
}) | ||
describe('when --ci is not passed as argument', function () { | ||
it('does not set the environment variable VELOCITY_CI=1', function () { | ||
var args = ['test-app']; | ||
var env = {}; | ||
run({ | ||
args: args, | ||
env: env | ||
}); | ||
expect(spawnMeteor).toHaveBeenCalled(); | ||
var spawnOptions = spawnMeteor.calls.argsFor(0)[0]; | ||
expect(spawnOptions.env.VELOCITY_CI).toBeUndefined(); | ||
}) | ||
}) | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16437
393