mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
Fix all JSHint complaints in Node.js code.
This commit is contained in:
parent
f62ce4acc1
commit
b4416b5f0f
31 changed files with 126 additions and 119 deletions
|
@ -51,7 +51,7 @@ devutil.ensureUnusedPort = function(adb, serial, port) {
|
|||
conn.end()
|
||||
throw new Error(util.format('Port "%d" should be unused', port))
|
||||
})
|
||||
.catch(closedError, function(err) {
|
||||
.catch(closedError, function() {
|
||||
return Promise.resolve(port)
|
||||
})
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ devutil.waitForPort = function(adb, serial, port) {
|
|||
conn.port = port
|
||||
return conn
|
||||
})
|
||||
.catch(closedError, function(err) {
|
||||
.catch(closedError, function() {
|
||||
return Promise.delay(100)
|
||||
.then(function() {
|
||||
return devutil.waitForPort(adb, serial, port)
|
||||
|
@ -93,7 +93,7 @@ devutil.waitForPortToFree = function(adb, serial, port) {
|
|||
conn.end()
|
||||
})
|
||||
})
|
||||
.catch(closedError, function(err) {
|
||||
.catch(closedError, function() {
|
||||
return port
|
||||
})
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ devutil.listPidsByComm = function(adb, serial, comm, bin) {
|
|||
|
||||
return adb.shell(serial, ['ps', comm])
|
||||
.then(function(out) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
return new Promise(function(resolve) {
|
||||
var header = false
|
||||
, pids = []
|
||||
out.pipe(split())
|
||||
|
@ -147,7 +147,7 @@ devutil.killProcsByComm = function(adb, serial, comm, bin, mode) {
|
|||
}
|
||||
return adb.shell(serial, ['kill', mode || -15].concat(pids))
|
||||
.then(function(out) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
return new Promise(function(resolve) {
|
||||
out.on('end', resolve)
|
||||
})
|
||||
})
|
||||
|
@ -165,8 +165,8 @@ devutil.makeIdentity = function(serial, properties) {
|
|||
var model = properties['ro.product.model']
|
||||
, brand = properties['ro.product.brand']
|
||||
, manufacturer = properties['ro.product.manufacturer']
|
||||
, operator = properties['gsm.sim.operator.alpha']
|
||||
|| properties['gsm.operator.alpha']
|
||||
, operator = properties['gsm.sim.operator.alpha'] ||
|
||||
properties['gsm.operator.alpha']
|
||||
, version = properties['ro.build.version.release']
|
||||
, sdk = properties['ro.build.version.sdk']
|
||||
, abi = properties['ro.product.cpu.abi']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue