New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

appium-instruments

Package Overview
Dependencies
Maintainers
2
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appium-instruments - npm Package Compare versions

Comparing version 0.1.19 to 0.1.20

test/functional/.basics-specs.js.un~

17

lib/instruments.js

@@ -420,3 +420,20 @@ // Wrapper around Apple's Instruments app

Instruments.prototype.getAvailableDevices = function (cb) {
logger.info("Getting list of devices instruments supports");
this.setInstrumentsPath(function (err) {
if (err) return cb(err);
exec(this.instrumentsPath + " -s devices", function (err, stdout) {
if (err) return cb(err);
var devices = [];
_.each(stdout.split("\n"), function (line) {
if (/^i.+$/.test(line)) {
devices.push(line);
}
});
cb(null, devices);
});
}.bind(this));
};
/* COMMAND LIFECYCLE */

@@ -423,0 +440,0 @@

2

package.json
{
"name": "appium-instruments",
"version": "0.1.19",
"version": "0.1.20",
"description": "IOS Instruments + instruments-without-delay launcher used by Appium",

@@ -5,0 +5,0 @@ "main": "lib/main.js",

@@ -7,2 +7,3 @@ 'use strict';

path = require('path'),
exec = require('child_process').exec,
Instruments = require('../../lib/main').Instruments;

@@ -26,3 +27,3 @@

});
function newInstrument(timeout) {

@@ -71,3 +72,30 @@ return new Instruments({

// works only on 7.1
describe("getting devices", function () {
it('should get all available devices', function (done) {
exec('xcrun --sdk iphonesimulator --show-sdk-version', function (err, stdout) {
var onErr = function () {
console.error("Couldn't get iOS sdk version, skipping test");
done();
};
if (err) return onErr();
var iosVer = parseFloat(stdout);
if (typeof iosVer !== "number" || isNaN(iosVer)) {
return onErr();
}
instruments = newInstrument(60000);
instruments.getAvailableDevices(function (err, devices) {
should.not.exist(err);
if (iosVer >= 7.1) {
devices.length.should.equal(7);
devices.should.contain("iPhone - Simulator - iOS 7.1");
} else {
devices.length.should.equal(0);
}
done();
});
});
});
});
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc