mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-03 11:37:09 +00:00
refactor(android): move PrepareDevice doc onto it; extract tested wakeCommands
The PrepareDevice doc block was stranded above adbArgs, leaving the exported function undocumented under godoc. Move it back and split the wake/keyguard tuples into wakeCommands so they have a unit test.
This commit is contained in:
1 parent
600fb71c5b
commit
d3182239dc
2 files changed
+26
-14
No files matched your search
@@ -7,6 +7,17 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestWakeCommands(t *testing.T) {
|
||||
want := [][]string{
|
||||
{"svc", "power", "stayon", "true"},
|
||||
{"input", "keyevent", "KEYCODE_WAKEUP"},
|
||||
{"wm", "dismiss-keyguard"},
|
||||
}
|
||||
if got := wakeCommands(); !reflect.DeepEqual(got, want) {
|
||||
t.Errorf("wakeCommands() = %v, want %v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseAdbDevices_OnlineOnly(t *testing.T) {
|
||||
output := `List of devices attached
|
||||
emulator-5554 device
|
||||
|
||||
Reference in new issue
Block a user