velocity-cli
Advanced tools
Comparing version 0.3.3 to 0.4.0
var _ = require('lodash'); | ||
var getPlatform = require('./getPlatform'); | ||
module.exports = function isWindows() { | ||
return _.startsWith(process.platform, 'win'); | ||
return _.startsWith(getPlatform(), 'win'); | ||
}; |
@@ -22,7 +22,9 @@ 'use strict'; | ||
}); | ||
} else if (isCommand(meteorArguments, 'test-package')) { | ||
} else if (isCommand(meteorArguments, 'test-package') || | ||
isCommand(meteorArguments, 'test-packages') | ||
) { | ||
meteorArguments = replaceCommand(meteorArguments, 'test-package', 'test-packages'); | ||
if (!meteorEnvironment.VELOCITY_USE_CHECKED_OUT_METEOR && !hasArgument(meteorArguments, '--release')) { | ||
meteorArguments.push('--release', 'velocity:METEOR@1.1.0.3_1'); | ||
meteorArguments.push('--release', 'velocity:METEOR@1.2.0.1_1'); | ||
} | ||
@@ -29,0 +31,0 @@ |
{ | ||
"name": "velocity-cli", | ||
"version": "0.3.3", | ||
"version": "0.4.0", | ||
"description": "CLI tool for using Meteor Velocity to test your Meteor apps.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -57,1 +57,9 @@ # 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). | ||
## Testing all packages in an app | ||
```sh | ||
velocity test-packages | ||
``` | ||
You can pass the same additional options as for `velocity test-package`. |
describe('isWindows', function () { | ||
var isWindows = require('../lib/isWindows'); | ||
var proxyquire = require('proxyquire'); | ||
var isWindows; | ||
beforeEach(function () { | ||
this.originalPlatform = process.platform; | ||
}) | ||
this.getPlatformSpy = jasmine.createSpy('getPlatform'); | ||
afterEach(function () { | ||
process.platform = this.originalPlatform; | ||
}) | ||
isWindows = proxyquire('../lib/isWindows', { | ||
'./getPlatform': this.getPlatformSpy | ||
}); | ||
}); | ||
describe('when the platform name starts with "win"', function () { | ||
beforeEach(function () { | ||
process.platform = 'win32'; | ||
this.getPlatformSpy.and.returnValue('win32'); | ||
}) | ||
@@ -24,3 +25,3 @@ | ||
beforeEach(function () { | ||
process.platform = 'linux'; | ||
this.getPlatformSpy.and.returnValue('linux'); | ||
}) | ||
@@ -27,0 +28,0 @@ |
@@ -29,3 +29,3 @@ describe('index', function () { | ||
var spawnOptions = spawnTestPackagesMeteor.calls.argsFor(0)[0]; | ||
var expectedArguments = ['--release', 'velocity:METEOR@1.1.0.3_1']; | ||
var expectedArguments = ['--release', 'velocity:METEOR@1.2.0.1_1']; | ||
expect(_.intersection(spawnOptions.args.slice(1), expectedArguments)).toEqual(expectedArguments); | ||
@@ -32,0 +32,0 @@ }) |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
14634
24
342
65
2