Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update wait for device command #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
update wait for device command
Andychochocho committed Jun 6, 2019
commit 5d96e13435f115f41537412c9cb7f0cfec3e49b4
2 changes: 1 addition & 1 deletion src/adb/command/host-serial/waitfordevice.coffee
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ Protocol = require '../../protocol'

class WaitForDeviceCommand extends Command
execute: (serial) ->
this._send "host-serial:#{serial}:wait-for-any"
this._send "host-serial:#{serial}:wait-for-any-device"
@parser.readAscii 4
.then (reply) =>
switch reply
4 changes: 2 additions & 2 deletions test/adb/command/host-serial/waitfordevice.coffee
Original file line number Diff line number Diff line change
@@ -11,12 +11,12 @@ WaitForDeviceCommand = \

describe 'WaitForDeviceCommand', ->

it "should send 'host-serial:<serial>:wait-for-any'", (done) ->
it "should send 'host-serial:<serial>:wait-for-any-device'", (done) ->
conn = new MockConnection
cmd = new WaitForDeviceCommand conn
conn.socket.on 'write', (chunk) ->
expect(chunk.toString()).to.equal \
Protocol.encodeData('host-serial:abba:wait-for-any').toString()
Protocol.encodeData('host-serial:abba:wait-for-any-device').toString()
setImmediate ->
conn.socket.causeRead Protocol.OKAY
conn.socket.causeRead Protocol.OKAY