@sebbo2002/node-pyatv 4.3.4-develop.4 → 5.1.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/.mocharc.yml +3 -3
  2. package/.nycrc +1 -0
  3. package/CHANGELOG.md +31 -0
  4. package/dist/bin/check.js +2 -6
  5. package/dist/bin/check.js.map +1 -1
  6. package/dist/examples/push.js +2 -6
  7. package/dist/examples/push.js.map +1 -1
  8. package/dist/lib/device-event.d.ts +2 -2
  9. package/dist/lib/device-event.js +1 -3
  10. package/dist/lib/device-event.js.map +1 -1
  11. package/dist/lib/device-events.d.ts +2 -2
  12. package/dist/lib/device-events.js +38 -40
  13. package/dist/lib/device-events.js.map +1 -1
  14. package/dist/lib/device.d.ts +47 -2
  15. package/dist/lib/device.js +99 -46
  16. package/dist/lib/device.js.map +1 -1
  17. package/dist/lib/fake-spawn.js +7 -14
  18. package/dist/lib/fake-spawn.js.map +1 -1
  19. package/dist/lib/index.d.ts +6 -5
  20. package/dist/lib/index.js +6 -22
  21. package/dist/lib/index.js.map +1 -1
  22. package/dist/lib/instance.d.ts +2 -2
  23. package/dist/lib/instance.js +40 -32
  24. package/dist/lib/instance.js.map +1 -1
  25. package/dist/lib/tools.d.ts +1 -1
  26. package/dist/lib/tools.js +24 -34
  27. package/dist/lib/tools.js.map +1 -1
  28. package/dist/lib/types.d.ts +24 -0
  29. package/dist/lib/types.js +20 -23
  30. package/dist/lib/types.js.map +1 -1
  31. package/docs/coverage/block-navigation.js +8 -0
  32. package/docs/coverage/cobertura-coverage.xml +2818 -1534
  33. package/docs/coverage/device-event.ts.html +64 -59
  34. package/docs/coverage/device-events.ts.html +215 -210
  35. package/docs/coverage/device.ts.html +931 -740
  36. package/docs/coverage/fake-spawn.ts.html +102 -97
  37. package/docs/coverage/favicon.png +0 -0
  38. package/docs/coverage/index.html +74 -69
  39. package/docs/coverage/index.ts.html +63 -49
  40. package/docs/coverage/instance.ts.html +256 -224
  41. package/docs/coverage/sort-arrow-sprite.png +0 -0
  42. package/docs/coverage/sorter.js +26 -0
  43. package/docs/coverage/tools.ts.html +310 -305
  44. package/docs/coverage/types.ts.html +204 -121
  45. package/docs/reference/assets/highlight.css +11 -25
  46. package/docs/reference/assets/main.js +4 -2
  47. package/docs/reference/assets/search.js +1 -1
  48. package/docs/reference/assets/style.css +424 -538
  49. package/docs/reference/classes/NodePyATVDevice.html +1136 -126
  50. package/docs/reference/classes/NodePyATVDeviceEvent.html +111 -10
  51. package/docs/reference/classes/NodePyATVInstance.html +227 -0
  52. package/docs/reference/enums/NodePyATVDeviceState.html +93 -1
  53. package/docs/reference/enums/NodePyATVExecutableType.html +65 -0
  54. package/docs/reference/enums/NodePyATVKeys.html +212 -1
  55. package/docs/reference/enums/NodePyATVListenerState.html +79 -1
  56. package/docs/reference/enums/NodePyATVMediaType.html +79 -1
  57. package/docs/reference/enums/NodePyATVPowerState.html +65 -1
  58. package/docs/reference/enums/NodePyATVProtocol.html +79 -1
  59. package/docs/reference/enums/NodePyATVRepeatState.html +72 -1
  60. package/docs/reference/enums/NodePyATVShuffleState.html +72 -1
  61. package/docs/reference/index.html +61 -53
  62. package/docs/reference/interfaces/NodePyATVDeviceOptions.html +229 -1
  63. package/docs/reference/interfaces/NodePyATVFindAndInstanceOptions.html +190 -1
  64. package/docs/reference/interfaces/NodePyATVFindOptions.html +120 -1
  65. package/docs/reference/interfaces/NodePyATVGetStateOptions.html +62 -1
  66. package/docs/reference/interfaces/NodePyATVInstanceOptions.html +110 -1
  67. package/docs/reference/interfaces/NodePyATVService.html +69 -0
  68. package/docs/reference/interfaces/NodePyATVState.html +160 -1
  69. package/docs/reference/interfaces/NodePyATVVersionResponse.html +69 -1
  70. package/docs/reference/modules.html +104 -1
  71. package/docs/reference/types/NodePyATVEventValueType.html +64 -0
  72. package/docs/tests/index.html +1 -1
  73. package/docs/tests/mochawesome.json +1074 -784
  74. package/package.json +18 -15
  75. package/release.config.cjs +56 -0
  76. package/src/bin/check.ts +1 -1
  77. package/src/examples/push.ts +1 -1
  78. package/src/lib/device-event.ts +2 -2
  79. package/src/lib/device-events.ts +4 -4
  80. package/src/lib/device.ts +65 -3
  81. package/src/lib/index.ts +20 -17
  82. package/src/lib/instance.ts +31 -22
  83. package/src/lib/tools.ts +1 -1
  84. package/src/lib/types.ts +26 -0
  85. package/test/device-event.ts +2 -2
  86. package/test/device-events.ts +2 -2
  87. package/test/device.ts +127 -4
  88. package/test/instance.ts +128 -42
  89. package/test/tools.ts +2 -2
  90. package/tsconfig.json +1 -1
  91. package/docs/reference/assets/icons.css +0 -1043
  92. package/docs/reference/assets/icons.png +0 -0
  93. package/docs/reference/assets/icons@2x.png +0 -0
  94. package/docs/reference/classes/default.html +0 -50
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "stats": {
3
- "suites": 84,
4
- "tests": 143,
5
- "passes": 141,
3
+ "suites": 89,
4
+ "tests": 153,
5
+ "passes": 151,
6
6
  "pending": 2,
7
7
  "failures": 0,
8
- "start": "2022-06-10T00:12:45.264Z",
9
- "end": "2022-06-10T00:12:57.800Z",
10
- "duration": 12536,
11
- "testsRegistered": 143,
8
+ "start": "2022-08-04T16:09:50.452Z",
9
+ "end": "2022-08-04T16:10:02.395Z",
10
+ "duration": 11943,
11
+ "testsRegistered": 153,
12
12
  "passPercent": 100,
13
- "pendingPercent": 1.3986013986013985,
13
+ "pendingPercent": 1.3071895424836601,
14
14
  "other": 0,
15
15
  "hasOther": false,
16
16
  "skipped": 0,
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "results": [
20
20
  {
21
- "uuid": "6e5fbafa-45c2-4a6f-b762-76783fd281b5",
21
+ "uuid": "b55b5d67-759e-4232-9681-0f1df943fc11",
22
22
  "title": "",
23
23
  "fullFile": "",
24
24
  "file": "",
@@ -27,7 +27,7 @@
27
27
  "tests": [],
28
28
  "suites": [
29
29
  {
30
- "uuid": "d2f361a4-9c5e-403f-9d2c-f7a025cfcfe9",
30
+ "uuid": "9c3a6591-2346-44ea-81f6-e75dd779ef74",
31
31
  "title": "NodePyATVDeviceEvent",
32
32
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts",
33
33
  "file": "/test/device-event.ts",
@@ -36,7 +36,7 @@
36
36
  "tests": [],
37
37
  "suites": [
38
38
  {
39
- "uuid": "f0addb00-6f62-4ebe-931f-ed3c2c8e96e2",
39
+ "uuid": "12777999-9aac-4b66-b718-3cb5a4062798",
40
40
  "title": "get key()",
41
41
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts",
42
42
  "file": "/test/device-event.ts",
@@ -54,17 +54,17 @@
54
54
  "fail": false,
55
55
  "pending": false,
56
56
  "context": null,
57
- "code": "const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.key, 'genre');",
57
+ "code": "const event = new NodePyATVDeviceEvent({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new NodePyATVDevice({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert.strictEqual(event.key, 'genre');",
58
58
  "err": {},
59
- "uuid": "99487b36-d93d-464b-bb3f-4f9f33d484eb",
60
- "parentUUID": "f0addb00-6f62-4ebe-931f-ed3c2c8e96e2",
59
+ "uuid": "95290d43-3470-4e91-bf20-353cbd770f4a",
60
+ "parentUUID": "12777999-9aac-4b66-b718-3cb5a4062798",
61
61
  "isHook": false,
62
62
  "skipped": false
63
63
  }
64
64
  ],
65
65
  "suites": [],
66
66
  "passes": [
67
- "99487b36-d93d-464b-bb3f-4f9f33d484eb"
67
+ "95290d43-3470-4e91-bf20-353cbd770f4a"
68
68
  ],
69
69
  "failures": [],
70
70
  "pending": [],
@@ -75,7 +75,7 @@
75
75
  "_timeout": 2000
76
76
  },
77
77
  {
78
- "uuid": "a067bbdb-f091-4d3f-8d46-05e35d4d8778",
78
+ "uuid": "808cf14e-e4d5-4fe4-b715-d951732fd3ba",
79
79
  "title": "get oldValue()",
80
80
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts",
81
81
  "file": "/test/device-event.ts",
@@ -93,17 +93,17 @@
93
93
  "fail": false,
94
94
  "pending": false,
95
95
  "context": null,
96
- "code": "const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.oldValue, 'Jazz');",
96
+ "code": "const event = new NodePyATVDeviceEvent({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new NodePyATVDevice({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert.strictEqual(event.oldValue, 'Jazz');",
97
97
  "err": {},
98
- "uuid": "021aad43-bd77-4535-ba0f-9fa1ecf120a1",
99
- "parentUUID": "a067bbdb-f091-4d3f-8d46-05e35d4d8778",
98
+ "uuid": "5de289dc-9686-4b1d-a9b0-89acfe25800c",
99
+ "parentUUID": "808cf14e-e4d5-4fe4-b715-d951732fd3ba",
100
100
  "isHook": false,
101
101
  "skipped": false
102
102
  }
103
103
  ],
104
104
  "suites": [],
105
105
  "passes": [
106
- "021aad43-bd77-4535-ba0f-9fa1ecf120a1"
106
+ "5de289dc-9686-4b1d-a9b0-89acfe25800c"
107
107
  ],
108
108
  "failures": [],
109
109
  "pending": [],
@@ -114,7 +114,7 @@
114
114
  "_timeout": 2000
115
115
  },
116
116
  {
117
- "uuid": "cc6c3064-8593-4125-bfab-7c3a8b5bd971",
117
+ "uuid": "aa1bdc1c-1466-4f7c-b485-32100ff6a58d",
118
118
  "title": "get newValue()",
119
119
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts",
120
120
  "file": "/test/device-event.ts",
@@ -132,17 +132,17 @@
132
132
  "fail": false,
133
133
  "pending": false,
134
134
  "context": null,
135
- "code": "const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.newValue, 'Rock');",
135
+ "code": "const event = new NodePyATVDeviceEvent({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new NodePyATVDevice({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert.strictEqual(event.newValue, 'Rock');",
136
136
  "err": {},
137
- "uuid": "a6158fe1-1050-44ef-806a-eaaf0d2232df",
138
- "parentUUID": "cc6c3064-8593-4125-bfab-7c3a8b5bd971",
137
+ "uuid": "34ee3b53-0ff7-4a74-a0dc-ac45a4ea19f7",
138
+ "parentUUID": "aa1bdc1c-1466-4f7c-b485-32100ff6a58d",
139
139
  "isHook": false,
140
140
  "skipped": false
141
141
  }
142
142
  ],
143
143
  "suites": [],
144
144
  "passes": [
145
- "a6158fe1-1050-44ef-806a-eaaf0d2232df"
145
+ "34ee3b53-0ff7-4a74-a0dc-ac45a4ea19f7"
146
146
  ],
147
147
  "failures": [],
148
148
  "pending": [],
@@ -153,7 +153,7 @@
153
153
  "_timeout": 2000
154
154
  },
155
155
  {
156
- "uuid": "9ee6564b-a08f-4a3d-bd54-69352a99aac6",
156
+ "uuid": "c305f74a-2b56-4eff-b9c5-02cf1c853582",
157
157
  "title": "get value()",
158
158
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts",
159
159
  "file": "/test/device-event.ts",
@@ -164,35 +164,35 @@
164
164
  "title": "should work",
165
165
  "fullTitle": "NodePyATVDeviceEvent get value() should work",
166
166
  "timedOut": false,
167
- "duration": 0,
167
+ "duration": 1,
168
168
  "state": "passed",
169
169
  "speed": "fast",
170
170
  "pass": true,
171
171
  "fail": false,
172
172
  "pending": false,
173
173
  "context": null,
174
- "code": "const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.value, 'Rock');",
174
+ "code": "const event = new NodePyATVDeviceEvent({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new NodePyATVDevice({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert.strictEqual(event.value, 'Rock');",
175
175
  "err": {},
176
- "uuid": "0b1b3cb7-2f26-402c-b13d-2fad900d4428",
177
- "parentUUID": "9ee6564b-a08f-4a3d-bd54-69352a99aac6",
176
+ "uuid": "81c5c118-4e7e-4127-a74f-c7692526ccf5",
177
+ "parentUUID": "c305f74a-2b56-4eff-b9c5-02cf1c853582",
178
178
  "isHook": false,
179
179
  "skipped": false
180
180
  }
181
181
  ],
182
182
  "suites": [],
183
183
  "passes": [
184
- "0b1b3cb7-2f26-402c-b13d-2fad900d4428"
184
+ "81c5c118-4e7e-4127-a74f-c7692526ccf5"
185
185
  ],
186
186
  "failures": [],
187
187
  "pending": [],
188
188
  "skipped": [],
189
- "duration": 0,
189
+ "duration": 1,
190
190
  "root": false,
191
191
  "rootEmpty": false,
192
192
  "_timeout": 2000
193
193
  },
194
194
  {
195
- "uuid": "837f50c5-00be-48b9-9f93-ce25e8a9b41e",
195
+ "uuid": "4f36b2fd-1eee-440d-a7ac-fdf41626bb99",
196
196
  "title": "get device()",
197
197
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts",
198
198
  "file": "/test/device-event.ts",
@@ -210,17 +210,17 @@
210
210
  "fail": false,
211
211
  "pending": false,
212
212
  "context": null,
213
- "code": "const device = new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n});\nconst event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device\n});\nassert_1.default.deepEqual(event.device, device);",
213
+ "code": "const device = new NodePyATVDevice({\n host: '192.168.178.2',\n name: 'My Testinstance'\n});\nconst event = new NodePyATVDeviceEvent({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device\n});\nassert.deepEqual(event.device, device);",
214
214
  "err": {},
215
- "uuid": "a2285043-0509-4083-a9b0-9d3f283fb0df",
216
- "parentUUID": "837f50c5-00be-48b9-9f93-ce25e8a9b41e",
215
+ "uuid": "dbb84c45-8bd4-44b2-b9c8-3914d6a2aeb9",
216
+ "parentUUID": "4f36b2fd-1eee-440d-a7ac-fdf41626bb99",
217
217
  "isHook": false,
218
218
  "skipped": false
219
219
  }
220
220
  ],
221
221
  "suites": [],
222
222
  "passes": [
223
- "a2285043-0509-4083-a9b0-9d3f283fb0df"
223
+ "dbb84c45-8bd4-44b2-b9c8-3914d6a2aeb9"
224
224
  ],
225
225
  "failures": [],
226
226
  "pending": [],
@@ -241,7 +241,7 @@
241
241
  "_timeout": 2000
242
242
  },
243
243
  {
244
- "uuid": "2ec65baa-fb72-4d14-88be-1a2ccdbd4c4c",
244
+ "uuid": "23509c35-6957-47ee-ba6b-b50f1ce51eca",
245
245
  "title": "NodePyATVDeviceEvents",
246
246
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
247
247
  "file": "/test/device-events.ts",
@@ -250,7 +250,7 @@
250
250
  "tests": [],
251
251
  "suites": [
252
252
  {
253
- "uuid": "052c221e-6a8f-41e4-8518-ef9e8b909aa5",
253
+ "uuid": "a8174a53-c177-44b6-8436-508bc589ac4c",
254
254
  "title": "applyStateAndEmitEvents()",
255
255
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
256
256
  "file": "/test/device-events.ts",
@@ -261,17 +261,17 @@
261
261
  "title": "should emit update:key event",
262
262
  "fullTitle": "NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update:key event",
263
263
  "timedOut": false,
264
- "duration": 5,
264
+ "duration": 4,
265
265
  "state": "passed",
266
266
  "speed": "fast",
267
267
  "pass": true,
268
268
  "fail": false,
269
269
  "pending": false,
270
270
  "context": null,
271
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:title', event => {\n assert_1.default.ok(event instanceof lib_1.NodePyATVDeviceEvent);\n assert_1.default.strictEqual(event.key, 'title');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'My Movie');\n assert_1.default.strictEqual(event.value, 'My Movie');\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
271
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:title', event => {\n assert.ok(event instanceof NodePyATVDeviceEvent);\n assert.strictEqual(event.key, 'title');\n assert.strictEqual(event.oldValue, null);\n assert.strictEqual(event.newValue, 'My Movie');\n assert.strictEqual(event.value, 'My Movie');\n assert.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
272
272
  "err": {},
273
- "uuid": "a1196d64-f4cf-4251-840e-3bc2d968b7a7",
274
- "parentUUID": "052c221e-6a8f-41e4-8518-ef9e8b909aa5",
273
+ "uuid": "7d4b85e5-f7e4-478b-938f-6f4f31d7d661",
274
+ "parentUUID": "a8174a53-c177-44b6-8436-508bc589ac4c",
275
275
  "isHook": false,
276
276
  "skipped": false
277
277
  },
@@ -286,10 +286,10 @@
286
286
  "fail": false,
287
287
  "pending": false,
288
288
  "context": null,
289
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update', event => {\n assert_1.default.ok(event instanceof lib_1.NodePyATVDeviceEvent);\n assert_1.default.strictEqual(event.key, 'title');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'My Movie');\n assert_1.default.strictEqual(event.value, 'My Movie');\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
289
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update', event => {\n assert.ok(event instanceof NodePyATVDeviceEvent);\n assert.strictEqual(event.key, 'title');\n assert.strictEqual(event.oldValue, null);\n assert.strictEqual(event.newValue, 'My Movie');\n assert.strictEqual(event.value, 'My Movie');\n assert.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
290
290
  "err": {},
291
- "uuid": "1622af88-884b-4962-8032-3e6a994e5ff3",
292
- "parentUUID": "052c221e-6a8f-41e4-8518-ef9e8b909aa5",
291
+ "uuid": "580d8fbb-9835-461d-b2fe-fafe01a65cb3",
292
+ "parentUUID": "a8174a53-c177-44b6-8436-508bc589ac4c",
293
293
  "isHook": false,
294
294
  "skipped": false
295
295
  },
@@ -297,17 +297,17 @@
297
297
  "title": "should emit update:key event before update",
298
298
  "fullTitle": "NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update:key event before update",
299
299
  "timedOut": false,
300
- "duration": 3,
300
+ "duration": 2,
301
301
  "state": "passed",
302
302
  "speed": "fast",
303
303
  "pass": true,
304
304
  "fail": false,
305
305
  "pending": false,
306
306
  "context": null,
307
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const sort = [];\n yield Promise.race([\n new Promise(cb => {\n device.once('update', () => {\n sort.push('update');\n cb(undefined);\n });\n }),\n new Promise(cb => {\n device.once('update:title', () => {\n sort.push('update:title');\n cb(undefined);\n });\n })\n ]);\n assert_1.default.deepStrictEqual(sort, ['update:title', 'update']);\n});",
307
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const sort = [];\n yield Promise.race([\n new Promise(cb => {\n device.once('update', () => {\n sort.push('update');\n cb(undefined);\n });\n }),\n new Promise(cb => {\n device.once('update:title', () => {\n sort.push('update:title');\n cb(undefined);\n });\n })\n ]);\n assert.deepStrictEqual(sort, ['update:title', 'update']);\n});",
308
308
  "err": {},
309
- "uuid": "d49c7fc5-3c2c-4380-ad9a-eede40cbb4bc",
310
- "parentUUID": "052c221e-6a8f-41e4-8518-ef9e8b909aa5",
309
+ "uuid": "82f49465-c9a3-48b5-ae70-92c332c7ca48",
310
+ "parentUUID": "a8174a53-c177-44b6-8436-508bc589ac4c",
311
311
  "isHook": false,
312
312
  "skipped": false
313
313
  },
@@ -322,10 +322,10 @@
322
322
  "fail": false,
323
323
  "pending": false,
324
324
  "context": null,
325
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n });\n })\n });\n yield new Promise(cb => {\n device.once('error', error => {\n assert_1.default.ok(error instanceof Error);\n assert_1.default.ok(error.toString().includes('invalid credentials: 321'));\n cb(undefined);\n });\n });\n});",
325
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n });\n })\n });\n yield new Promise(cb => {\n device.once('error', error => {\n assert.ok(error instanceof Error);\n assert.ok(error.toString().includes('invalid credentials: 321'));\n cb(undefined);\n });\n });\n});",
326
326
  "err": {},
327
- "uuid": "1dc8506e-40f0-4730-8857-209751ac05b7",
328
- "parentUUID": "052c221e-6a8f-41e4-8518-ef9e8b909aa5",
327
+ "uuid": "8825b234-6ae1-453c-a8b6-97a87bd62f25",
328
+ "parentUUID": "a8174a53-c177-44b6-8436-508bc589ac4c",
329
329
  "isHook": false,
330
330
  "skipped": false
331
331
  },
@@ -333,17 +333,17 @@
333
333
  "title": "should not emit an update if new value is same as old one",
334
334
  "fullTitle": "NodePyATVDeviceEvents applyStateAndEmitEvents() should not emit an update if new value is same as old one",
335
335
  "timedOut": false,
336
- "duration": 4,
336
+ "duration": 2,
337
337
  "state": "passed",
338
338
  "speed": "fast",
339
339
  "pass": true,
340
340
  "fail": false,
341
341
  "pending": false,
342
342
  "context": null,
343
- "code": "return __awaiter(this, void 0, void 0, function* () {\n let spawnCounter = 0;\n let eventCounter = 0;\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n if (spawnCounter === 0) {\n cp.onStdIn(() => cp.end());\n }\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n spawnCounter++;\n if (spawnCounter >= 2) {\n cp.end();\n }\n })\n });\n const listener = () => {\n eventCounter++;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n yield device.getState();\n device.off('update', listener);\n assert_1.default.strictEqual(spawnCounter, 2);\n assert_1.default.strictEqual(eventCounter, 1);\n});",
343
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n let spawnCounter = 0;\n let eventCounter = 0;\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n if (spawnCounter === 0) {\n cp.onStdIn(() => cp.end());\n }\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n spawnCounter++;\n if (spawnCounter >= 2) {\n cp.end();\n }\n })\n });\n const listener = () => {\n eventCounter++;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n yield device.getState();\n device.off('update', listener);\n assert.strictEqual(spawnCounter, 2);\n assert.strictEqual(eventCounter, 1);\n});",
344
344
  "err": {},
345
- "uuid": "2eea51f7-63e0-4002-ae07-e8fe8ab6e83d",
346
- "parentUUID": "052c221e-6a8f-41e4-8518-ef9e8b909aa5",
345
+ "uuid": "c530f765-61e8-4049-aaa7-b487c744e712",
346
+ "parentUUID": "a8174a53-c177-44b6-8436-508bc589ac4c",
347
347
  "isHook": false,
348
348
  "skipped": false
349
349
  },
@@ -351,17 +351,17 @@
351
351
  "title": "should emit error event if event listener throws an exception",
352
352
  "fullTitle": "NodePyATVDeviceEvents applyStateAndEmitEvents() should emit error event if event listener throws an exception",
353
353
  "timedOut": false,
354
- "duration": 2,
354
+ "duration": 1,
355
355
  "state": "passed",
356
356
  "speed": "fast",
357
357
  "pass": true,
358
358
  "fail": false,
359
359
  "pending": false,
360
360
  "context": null,
361
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n let callCounter = 0;\n const error = new Error('This is an error. Be nice.');\n device.once('error', err => {\n assert_1.default.strictEqual(err, error);\n callCounter++;\n });\n const listener = () => {\n throw error;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n device.off('update', listener);\n assert_1.default.strictEqual(callCounter, 1);\n});",
361
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n let callCounter = 0;\n const error = new Error('This is an error. Be nice.');\n device.once('error', err => {\n assert.strictEqual(err, error);\n callCounter++;\n });\n const listener = () => {\n throw error;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n device.off('update', listener);\n assert.strictEqual(callCounter, 1);\n});",
362
362
  "err": {},
363
- "uuid": "9b2f020d-30ba-4754-924d-916c8fce5996",
364
- "parentUUID": "052c221e-6a8f-41e4-8518-ef9e8b909aa5",
363
+ "uuid": "4ad60679-687f-4a48-be40-0cb4b9114e29",
364
+ "parentUUID": "a8174a53-c177-44b6-8436-508bc589ac4c",
365
365
  "isHook": false,
366
366
  "skipped": false
367
367
  },
@@ -376,34 +376,34 @@
376
376
  "fail": false,
377
377
  "pending": false,
378
378
  "context": null,
379
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n datetime: new Date().toJSON(),\n power_state: 'off'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:powerState', event => {\n assert_1.default.ok(event instanceof lib_1.NodePyATVDeviceEvent);\n assert_1.default.strictEqual(event.key, 'powerState');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'off');\n assert_1.default.strictEqual(event.newValue, lib_1.NodePyATVPowerState.off);\n assert_1.default.strictEqual(event.value, 'off');\n assert_1.default.strictEqual(event.value, lib_1.NodePyATVPowerState.off);\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
379
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n datetime: new Date().toJSON(),\n power_state: 'off'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:powerState', event => {\n assert.ok(event instanceof NodePyATVDeviceEvent);\n assert.strictEqual(event.key, 'powerState');\n assert.strictEqual(event.oldValue, null);\n assert.strictEqual(event.newValue, 'off');\n assert.strictEqual(event.newValue, NodePyATVPowerState.off);\n assert.strictEqual(event.value, 'off');\n assert.strictEqual(event.value, NodePyATVPowerState.off);\n assert.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
380
380
  "err": {},
381
- "uuid": "cc080037-6053-43f5-983c-dd46a37d9bbc",
382
- "parentUUID": "052c221e-6a8f-41e4-8518-ef9e8b909aa5",
381
+ "uuid": "bad215b5-e5e2-48fe-a652-bd9cd0b3c199",
382
+ "parentUUID": "a8174a53-c177-44b6-8436-508bc589ac4c",
383
383
  "isHook": false,
384
384
  "skipped": false
385
385
  }
386
386
  ],
387
387
  "suites": [],
388
388
  "passes": [
389
- "a1196d64-f4cf-4251-840e-3bc2d968b7a7",
390
- "1622af88-884b-4962-8032-3e6a994e5ff3",
391
- "d49c7fc5-3c2c-4380-ad9a-eede40cbb4bc",
392
- "1dc8506e-40f0-4730-8857-209751ac05b7",
393
- "2eea51f7-63e0-4002-ae07-e8fe8ab6e83d",
394
- "9b2f020d-30ba-4754-924d-916c8fce5996",
395
- "cc080037-6053-43f5-983c-dd46a37d9bbc"
389
+ "7d4b85e5-f7e4-478b-938f-6f4f31d7d661",
390
+ "580d8fbb-9835-461d-b2fe-fafe01a65cb3",
391
+ "82f49465-c9a3-48b5-ae70-92c332c7ca48",
392
+ "8825b234-6ae1-453c-a8b6-97a87bd62f25",
393
+ "c530f765-61e8-4049-aaa7-b487c744e712",
394
+ "4ad60679-687f-4a48-be40-0cb4b9114e29",
395
+ "bad215b5-e5e2-48fe-a652-bd9cd0b3c199"
396
396
  ],
397
397
  "failures": [],
398
398
  "pending": [],
399
399
  "skipped": [],
400
- "duration": 20,
400
+ "duration": 15,
401
401
  "root": false,
402
402
  "rootEmpty": false,
403
403
  "_timeout": 2000
404
404
  },
405
405
  {
406
- "uuid": "3881f94d-6e32-4df9-90d5-871a252ccb5c",
406
+ "uuid": "455a96bc-00c8-4181-8042-05337105ca9c",
407
407
  "title": "start|stopListening()",
408
408
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
409
409
  "file": "/test/device-events.ts",
@@ -414,17 +414,17 @@
414
414
  "title": "should emit error if spawn fails",
415
415
  "fullTitle": "NodePyATVDeviceEvents start|stopListening() should emit error if spawn fails",
416
416
  "timedOut": false,
417
- "duration": 2,
417
+ "duration": 1,
418
418
  "state": "passed",
419
419
  "speed": "fast",
420
420
  "pass": true,
421
421
  "fail": false,
422
422
  "pending": false,
423
423
  "context": null,
424
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const error = new Error();\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(error).end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.strictEqual(err, error);\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
424
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const error = new Error();\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.error(error).end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert.strictEqual(err, error);\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
425
425
  "err": {},
426
- "uuid": "388458a7-28a4-4e3c-9ee4-0dc5ce8e5787",
427
- "parentUUID": "3881f94d-6e32-4df9-90d5-871a252ccb5c",
426
+ "uuid": "4babde79-9c2c-42c9-938a-2ca876db2c84",
427
+ "parentUUID": "455a96bc-00c8-4181-8042-05337105ca9c",
428
428
  "isHook": false,
429
429
  "skipped": false
430
430
  },
@@ -439,10 +439,10 @@
439
439
  "fail": false,
440
440
  "pending": false,
441
441
  "context": null,
442
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stderr('Hello World!').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.ok(err instanceof Error);\n assert_1.default.ok(err.toString().includes('Got stderr output from pyatv: Hello World!'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
442
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.stderr('Hello World!').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert.ok(err instanceof Error);\n assert.ok(err.toString().includes('Got stderr output from pyatv: Hello World!'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
443
443
  "err": {},
444
- "uuid": "af381392-d20a-4849-8991-6e2316a98ce0",
445
- "parentUUID": "3881f94d-6e32-4df9-90d5-871a252ccb5c",
444
+ "uuid": "0ede0b64-9586-45ac-92ef-c05c29d051e2",
445
+ "parentUUID": "455a96bc-00c8-4181-8042-05337105ca9c",
446
446
  "isHook": false,
447
447
  "skipped": false
448
448
  },
@@ -457,10 +457,10 @@
457
457
  "fail": false,
458
458
  "pending": false,
459
459
  "context": null,
460
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('#').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.ok(err instanceof Error);\n assert_1.default.ok(err.toString().includes('Unable to parse stdout json: SyntaxError: ' +\n 'Unexpected token # in JSON at position 0'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
460
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.stdout('#').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert.ok(err instanceof Error);\n assert.ok(err.toString().includes('Unable to parse stdout json: SyntaxError: ' +\n 'Unexpected token # in JSON at position 0'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
461
461
  "err": {},
462
- "uuid": "5bd91a93-9030-45a2-b3ac-02a08b7cd375",
463
- "parentUUID": "3881f94d-6e32-4df9-90d5-871a252ccb5c",
462
+ "uuid": "a4497468-6ef8-489a-a365-42421a953d15",
463
+ "parentUUID": "455a96bc-00c8-4181-8042-05337105ca9c",
464
464
  "isHook": false,
465
465
  "skipped": false
466
466
  },
@@ -477,30 +477,30 @@
477
477
  "context": null,
478
478
  "code": "",
479
479
  "err": {},
480
- "uuid": "ba574e6c-d481-43e0-af63-a5605f884c62",
481
- "parentUUID": "3881f94d-6e32-4df9-90d5-871a252ccb5c",
480
+ "uuid": "d1a55f6c-7d15-43dc-91e2-a195079a6392",
481
+ "parentUUID": "455a96bc-00c8-4181-8042-05337105ca9c",
482
482
  "isHook": false,
483
483
  "skipped": false
484
484
  }
485
485
  ],
486
486
  "suites": [],
487
487
  "passes": [
488
- "388458a7-28a4-4e3c-9ee4-0dc5ce8e5787",
489
- "af381392-d20a-4849-8991-6e2316a98ce0",
490
- "5bd91a93-9030-45a2-b3ac-02a08b7cd375"
488
+ "4babde79-9c2c-42c9-938a-2ca876db2c84",
489
+ "0ede0b64-9586-45ac-92ef-c05c29d051e2",
490
+ "a4497468-6ef8-489a-a365-42421a953d15"
491
491
  ],
492
492
  "failures": [],
493
493
  "pending": [
494
- "ba574e6c-d481-43e0-af63-a5605f884c62"
494
+ "d1a55f6c-7d15-43dc-91e2-a195079a6392"
495
495
  ],
496
496
  "skipped": [],
497
- "duration": 5,
497
+ "duration": 4,
498
498
  "root": false,
499
499
  "rootEmpty": false,
500
500
  "_timeout": 2000
501
501
  },
502
502
  {
503
- "uuid": "33223dde-fc61-40df-b6ce-ec6dce806e72",
503
+ "uuid": "e89ee4ec-079b-41fe-800b-8216ac76ec60",
504
504
  "title": "addListener() / removeAllListeners()",
505
505
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
506
506
  "file": "/test/device-events.ts",
@@ -511,35 +511,35 @@
511
511
  "title": "should work without any exceptions",
512
512
  "fullTitle": "NodePyATVDeviceEvents addListener() / removeAllListeners() should work without any exceptions",
513
513
  "timedOut": false,
514
- "duration": 0,
514
+ "duration": 1,
515
515
  "state": "passed",
516
516
  "speed": "fast",
517
517
  "pass": true,
518
518
  "fail": false,
519
519
  "pending": false,
520
520
  "context": null,
521
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n device.removeAllListeners('update');\n});",
521
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n device.removeAllListeners('update');\n});",
522
522
  "err": {},
523
- "uuid": "9f23fc17-45f8-4a25-86e5-55700aa7a40f",
524
- "parentUUID": "33223dde-fc61-40df-b6ce-ec6dce806e72",
523
+ "uuid": "eb44f254-3ce0-41bd-91c6-8255e6ad7c09",
524
+ "parentUUID": "e89ee4ec-079b-41fe-800b-8216ac76ec60",
525
525
  "isHook": false,
526
526
  "skipped": false
527
527
  }
528
528
  ],
529
529
  "suites": [],
530
530
  "passes": [
531
- "9f23fc17-45f8-4a25-86e5-55700aa7a40f"
531
+ "eb44f254-3ce0-41bd-91c6-8255e6ad7c09"
532
532
  ],
533
533
  "failures": [],
534
534
  "pending": [],
535
535
  "skipped": [],
536
- "duration": 0,
536
+ "duration": 1,
537
537
  "root": false,
538
538
  "rootEmpty": false,
539
539
  "_timeout": 2000
540
540
  },
541
541
  {
542
- "uuid": "9f79e1c6-3df6-4511-a004-6eb32dfeb954",
542
+ "uuid": "8152fa0b-ad07-4bba-8444-319e1c7c7c45",
543
543
  "title": "emit()",
544
544
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
545
545
  "file": "/test/device-events.ts",
@@ -550,35 +550,35 @@
550
550
  "title": "should work",
551
551
  "fullTitle": "NodePyATVDeviceEvents emit() should work",
552
552
  "timedOut": false,
553
- "duration": 1,
553
+ "duration": 0,
554
554
  "state": "passed",
555
555
  "speed": "fast",
556
556
  "pass": true,
557
557
  "fail": false,
558
558
  "pending": false,
559
559
  "context": null,
560
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst event = new lib_1.NodePyATVDeviceEvent({\n key: 'dateTime',\n old: 'foo',\n new: 'bar',\n device\n});\nlet executions = 0;\ndevice.once('test', (e) => {\n executions++;\n assert_1.default.strictEqual(e, event);\n assert_1.default.strictEqual(executions, 1);\n done();\n});\ndevice.emit('test', event);",
560
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst event = new NodePyATVDeviceEvent({\n key: 'dateTime',\n old: 'foo',\n new: 'bar',\n device\n});\nlet executions = 0;\ndevice.once('test', (e) => {\n executions++;\n assert.strictEqual(e, event);\n assert.strictEqual(executions, 1);\n done();\n});\ndevice.emit('test', event);",
561
561
  "err": {},
562
- "uuid": "8bda53c2-9b09-4176-88d9-a8cb6be4a49b",
563
- "parentUUID": "9f79e1c6-3df6-4511-a004-6eb32dfeb954",
562
+ "uuid": "07c37cdc-026c-42cb-8de7-7d14f5706c47",
563
+ "parentUUID": "8152fa0b-ad07-4bba-8444-319e1c7c7c45",
564
564
  "isHook": false,
565
565
  "skipped": false
566
566
  }
567
567
  ],
568
568
  "suites": [],
569
569
  "passes": [
570
- "8bda53c2-9b09-4176-88d9-a8cb6be4a49b"
570
+ "07c37cdc-026c-42cb-8de7-7d14f5706c47"
571
571
  ],
572
572
  "failures": [],
573
573
  "pending": [],
574
574
  "skipped": [],
575
- "duration": 1,
575
+ "duration": 0,
576
576
  "root": false,
577
577
  "rootEmpty": false,
578
578
  "_timeout": 2000
579
579
  },
580
580
  {
581
- "uuid": "ac1230d1-6cce-4bc4-b108-58f9617b197c",
581
+ "uuid": "ace8d805-bac3-4203-8ea6-5c332d500a5a",
582
582
  "title": "eventNames()",
583
583
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
584
584
  "file": "/test/device-events.ts",
@@ -589,35 +589,35 @@
589
589
  "title": "should work",
590
590
  "fullTitle": "NodePyATVDeviceEvents eventNames() should work",
591
591
  "timedOut": false,
592
- "duration": 0,
592
+ "duration": 1,
593
593
  "state": "passed",
594
594
  "speed": "fast",
595
595
  "pass": true,
596
596
  "fail": false,
597
597
  "pending": false,
598
598
  "context": null,
599
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.eventNames(), ['test']);\ndevice.off('test', listener);",
599
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\ndevice.on('test', listener);\nassert.deepStrictEqual(device.eventNames(), ['test']);\ndevice.off('test', listener);",
600
600
  "err": {},
601
- "uuid": "0f2eb031-19bf-4baf-b799-8016070867da",
602
- "parentUUID": "ac1230d1-6cce-4bc4-b108-58f9617b197c",
601
+ "uuid": "4e52cdbf-cc55-4697-8c69-d76c7467b617",
602
+ "parentUUID": "ace8d805-bac3-4203-8ea6-5c332d500a5a",
603
603
  "isHook": false,
604
604
  "skipped": false
605
605
  }
606
606
  ],
607
607
  "suites": [],
608
608
  "passes": [
609
- "0f2eb031-19bf-4baf-b799-8016070867da"
609
+ "4e52cdbf-cc55-4697-8c69-d76c7467b617"
610
610
  ],
611
611
  "failures": [],
612
612
  "pending": [],
613
613
  "skipped": [],
614
- "duration": 0,
614
+ "duration": 1,
615
615
  "root": false,
616
616
  "rootEmpty": false,
617
617
  "_timeout": 2000
618
618
  },
619
619
  {
620
- "uuid": "4c5c5e57-779d-48c9-b716-42691df8b557",
620
+ "uuid": "7d076084-819d-4c59-b4e8-f9c4980fa1fb",
621
621
  "title": "getMaxListeners()",
622
622
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
623
623
  "file": "/test/device-events.ts",
@@ -635,17 +635,17 @@
635
635
  "fail": false,
636
636
  "pending": false,
637
637
  "context": null,
638
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst result = device.getMaxListeners();\nassert_1.default.ok(typeof result, 'number');\nassert_1.default.ok(result >= 10);",
638
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst result = device.getMaxListeners();\nassert.ok(typeof result, 'number');\nassert.ok(result >= 10);",
639
639
  "err": {},
640
- "uuid": "12abad17-c667-43e6-9526-46e86822b023",
641
- "parentUUID": "4c5c5e57-779d-48c9-b716-42691df8b557",
640
+ "uuid": "0329a570-1f22-4a94-8192-3030b45e9fa2",
641
+ "parentUUID": "7d076084-819d-4c59-b4e8-f9c4980fa1fb",
642
642
  "isHook": false,
643
643
  "skipped": false
644
644
  }
645
645
  ],
646
646
  "suites": [],
647
647
  "passes": [
648
- "12abad17-c667-43e6-9526-46e86822b023"
648
+ "0329a570-1f22-4a94-8192-3030b45e9fa2"
649
649
  ],
650
650
  "failures": [],
651
651
  "pending": [],
@@ -656,7 +656,7 @@
656
656
  "_timeout": 2000
657
657
  },
658
658
  {
659
- "uuid": "853a3805-1ff4-4f51-a43c-2c51aea06d15",
659
+ "uuid": "b2dff023-691c-4b0a-a5f2-575192a09304",
660
660
  "title": "listenerCount()",
661
661
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
662
662
  "file": "/test/device-events.ts",
@@ -674,17 +674,17 @@
674
674
  "fail": false,
675
675
  "pending": false,
676
676
  "context": null,
677
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.listenerCount('test'), 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.listenerCount('test'), 1);\ndevice.off('test', listener);",
677
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert.deepStrictEqual(device.listenerCount('test'), 0);\ndevice.on('test', listener);\nassert.deepStrictEqual(device.listenerCount('test'), 1);\ndevice.off('test', listener);",
678
678
  "err": {},
679
- "uuid": "a72bb7fd-9131-4e21-9712-3c2a43ea142f",
680
- "parentUUID": "853a3805-1ff4-4f51-a43c-2c51aea06d15",
679
+ "uuid": "71d15014-9db1-4733-b23b-4d2b94de1d76",
680
+ "parentUUID": "b2dff023-691c-4b0a-a5f2-575192a09304",
681
681
  "isHook": false,
682
682
  "skipped": false
683
683
  }
684
684
  ],
685
685
  "suites": [],
686
686
  "passes": [
687
- "a72bb7fd-9131-4e21-9712-3c2a43ea142f"
687
+ "71d15014-9db1-4733-b23b-4d2b94de1d76"
688
688
  ],
689
689
  "failures": [],
690
690
  "pending": [],
@@ -695,7 +695,7 @@
695
695
  "_timeout": 2000
696
696
  },
697
697
  {
698
- "uuid": "6c279fda-e707-49b8-962b-253539e4565c",
698
+ "uuid": "6fae8c7d-8f85-42ab-a731-62a6c732dc55",
699
699
  "title": "listeners()",
700
700
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
701
701
  "file": "/test/device-events.ts",
@@ -713,17 +713,17 @@
713
713
  "fail": false,
714
714
  "pending": false,
715
715
  "context": null,
716
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.listeners('test').length, 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.listeners('test').length, 1);\nassert_1.default.deepStrictEqual(device.listeners('test')[0], listener);\ndevice.off('test', listener);",
716
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert.deepStrictEqual(device.listeners('test').length, 0);\ndevice.on('test', listener);\nassert.deepStrictEqual(device.listeners('test').length, 1);\nassert.deepStrictEqual(device.listeners('test')[0], listener);\ndevice.off('test', listener);",
717
717
  "err": {},
718
- "uuid": "022fafaf-7eb9-4d12-bf8a-92dd69df8983",
719
- "parentUUID": "6c279fda-e707-49b8-962b-253539e4565c",
718
+ "uuid": "75de398a-36f0-4158-9946-0e8883ec8652",
719
+ "parentUUID": "6fae8c7d-8f85-42ab-a731-62a6c732dc55",
720
720
  "isHook": false,
721
721
  "skipped": false
722
722
  }
723
723
  ],
724
724
  "suites": [],
725
725
  "passes": [
726
- "022fafaf-7eb9-4d12-bf8a-92dd69df8983"
726
+ "75de398a-36f0-4158-9946-0e8883ec8652"
727
727
  ],
728
728
  "failures": [],
729
729
  "pending": [],
@@ -734,7 +734,7 @@
734
734
  "_timeout": 2000
735
735
  },
736
736
  {
737
- "uuid": "63f38e58-d251-4f78-9c20-e685e8bf53a0",
737
+ "uuid": "906bb4be-9a14-4e27-85b9-fd981406a486",
738
738
  "title": "prependListener()",
739
739
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
740
740
  "file": "/test/device-events.ts",
@@ -745,35 +745,35 @@
745
745
  "title": "should work",
746
746
  "fullTitle": "NodePyATVDeviceEvents prependListener() should work",
747
747
  "timedOut": false,
748
- "duration": 1,
748
+ "duration": 2,
749
749
  "state": "passed",
750
750
  "speed": "fast",
751
751
  "pass": true,
752
752
  "fail": false,
753
753
  "pending": false,
754
754
  "context": null,
755
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\nconst listener = () => {\n device.removeAllListeners('update');\n done();\n};\ndevice.prependListener('update', listener);",
755
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\nconst listener = () => {\n device.removeAllListeners('update');\n done();\n};\ndevice.prependListener('update', listener);",
756
756
  "err": {},
757
- "uuid": "0be25099-4162-40d1-8ff9-a8a8272a06c5",
758
- "parentUUID": "63f38e58-d251-4f78-9c20-e685e8bf53a0",
757
+ "uuid": "bf1124f0-d4d3-4a3d-bf39-2575974895e5",
758
+ "parentUUID": "906bb4be-9a14-4e27-85b9-fd981406a486",
759
759
  "isHook": false,
760
760
  "skipped": false
761
761
  }
762
762
  ],
763
763
  "suites": [],
764
764
  "passes": [
765
- "0be25099-4162-40d1-8ff9-a8a8272a06c5"
765
+ "bf1124f0-d4d3-4a3d-bf39-2575974895e5"
766
766
  ],
767
767
  "failures": [],
768
768
  "pending": [],
769
769
  "skipped": [],
770
- "duration": 1,
770
+ "duration": 2,
771
771
  "root": false,
772
772
  "rootEmpty": false,
773
773
  "_timeout": 2000
774
774
  },
775
775
  {
776
- "uuid": "db313b30-e9fe-4dd8-a6e4-ae1f185cb98f",
776
+ "uuid": "d3dc9485-fe3f-4b01-bd83-ffe9a64a68d9",
777
777
  "title": "prependOnceListener()",
778
778
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
779
779
  "file": "/test/device-events.ts",
@@ -791,17 +791,17 @@
791
791
  "fail": false,
792
792
  "pending": false,
793
793
  "context": null,
794
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\ndevice.prependOnceListener('update', () => done());",
794
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\ndevice.prependOnceListener('update', () => done());",
795
795
  "err": {},
796
- "uuid": "f8bf10df-97cb-4f30-b936-4d0ced202afe",
797
- "parentUUID": "db313b30-e9fe-4dd8-a6e4-ae1f185cb98f",
796
+ "uuid": "edadeed9-435e-4cd1-9ce6-d5944988fb9d",
797
+ "parentUUID": "d3dc9485-fe3f-4b01-bd83-ffe9a64a68d9",
798
798
  "isHook": false,
799
799
  "skipped": false
800
800
  }
801
801
  ],
802
802
  "suites": [],
803
803
  "passes": [
804
- "f8bf10df-97cb-4f30-b936-4d0ced202afe"
804
+ "edadeed9-435e-4cd1-9ce6-d5944988fb9d"
805
805
  ],
806
806
  "failures": [],
807
807
  "pending": [],
@@ -812,7 +812,7 @@
812
812
  "_timeout": 2000
813
813
  },
814
814
  {
815
- "uuid": "3756a739-d912-481e-a4db-57b4f2925fed",
815
+ "uuid": "4bd11d93-c22d-4ff4-9f7d-e037aa62e31a",
816
816
  "title": "rawListeners()",
817
817
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
818
818
  "file": "/test/device-events.ts",
@@ -823,35 +823,35 @@
823
823
  "title": "should work",
824
824
  "fullTitle": "NodePyATVDeviceEvents rawListeners() should work",
825
825
  "timedOut": false,
826
- "duration": 0,
826
+ "duration": 1,
827
827
  "state": "passed",
828
828
  "speed": "fast",
829
829
  "pass": true,
830
830
  "fail": false,
831
831
  "pending": false,
832
832
  "context": null,
833
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.rawListeners('test').length, 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.rawListeners('test').length, 1);\nassert_1.default.deepStrictEqual(device.rawListeners('test')[0], listener);\ndevice.off('test', listener);",
833
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert.deepStrictEqual(device.rawListeners('test').length, 0);\ndevice.on('test', listener);\nassert.deepStrictEqual(device.rawListeners('test').length, 1);\nassert.deepStrictEqual(device.rawListeners('test')[0], listener);\ndevice.off('test', listener);",
834
834
  "err": {},
835
- "uuid": "b343c86b-eb7d-4e9c-9ac2-0614324c4156",
836
- "parentUUID": "3756a739-d912-481e-a4db-57b4f2925fed",
835
+ "uuid": "21ab2942-98a9-4ee1-9a4f-f49dc930a65a",
836
+ "parentUUID": "4bd11d93-c22d-4ff4-9f7d-e037aa62e31a",
837
837
  "isHook": false,
838
838
  "skipped": false
839
839
  }
840
840
  ],
841
841
  "suites": [],
842
842
  "passes": [
843
- "b343c86b-eb7d-4e9c-9ac2-0614324c4156"
843
+ "21ab2942-98a9-4ee1-9a4f-f49dc930a65a"
844
844
  ],
845
845
  "failures": [],
846
846
  "pending": [],
847
847
  "skipped": [],
848
- "duration": 0,
848
+ "duration": 1,
849
849
  "root": false,
850
850
  "rootEmpty": false,
851
851
  "_timeout": 2000
852
852
  },
853
853
  {
854
- "uuid": "b33d6d8a-d90e-4016-88cb-abf80ffc0338",
854
+ "uuid": "6803b1ef-d3f5-41fe-95b8-321f79eece09",
855
855
  "title": "removeListener()",
856
856
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
857
857
  "file": "/test/device-events.ts",
@@ -869,17 +869,17 @@
869
869
  "fail": false,
870
870
  "pending": false,
871
871
  "context": null,
872
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n assert_1.default.deepStrictEqual(device.listenerCount('update'), 1);\n device.removeListener('update', listener);\n assert_1.default.deepStrictEqual(device.listenerCount('update'), 0);\n});",
872
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n assert.deepStrictEqual(device.listenerCount('update'), 1);\n device.removeListener('update', listener);\n assert.deepStrictEqual(device.listenerCount('update'), 0);\n});",
873
873
  "err": {},
874
- "uuid": "69f16d39-bfb7-46e2-b7b8-aeb7ac547abf",
875
- "parentUUID": "b33d6d8a-d90e-4016-88cb-abf80ffc0338",
874
+ "uuid": "ee414ec0-882d-453a-8d09-397590b992e9",
875
+ "parentUUID": "6803b1ef-d3f5-41fe-95b8-321f79eece09",
876
876
  "isHook": false,
877
877
  "skipped": false
878
878
  }
879
879
  ],
880
880
  "suites": [],
881
881
  "passes": [
882
- "69f16d39-bfb7-46e2-b7b8-aeb7ac547abf"
882
+ "ee414ec0-882d-453a-8d09-397590b992e9"
883
883
  ],
884
884
  "failures": [],
885
885
  "pending": [],
@@ -900,7 +900,7 @@
900
900
  "_timeout": 2000
901
901
  },
902
902
  {
903
- "uuid": "6f511911-c585-4f50-ba83-3f29d2a20b6c",
903
+ "uuid": "98915976-a163-42f6-b54d-2e04755a8912",
904
904
  "title": "NodePyATVDevice",
905
905
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
906
906
  "file": "/test/device.ts",
@@ -909,7 +909,7 @@
909
909
  "tests": [],
910
910
  "suites": [
911
911
  {
912
- "uuid": "c69b0445-4294-4ec9-8649-4a371ab4d3b6",
912
+ "uuid": "d5410d46-ecf0-4454-abe7-3a37f01a2546",
913
913
  "title": "get name()",
914
914
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
915
915
  "file": "/test/device.ts",
@@ -927,17 +927,17 @@
927
927
  "fail": false,
928
928
  "pending": false,
929
929
  "context": null,
930
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.name, 'My Testdevice');",
930
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert.strictEqual(device.name, 'My Testdevice');",
931
931
  "err": {},
932
- "uuid": "c226f02a-de91-4b28-a3fc-7ba0d4e2e996",
933
- "parentUUID": "c69b0445-4294-4ec9-8649-4a371ab4d3b6",
932
+ "uuid": "e68c58b9-0564-47a5-8475-1e593055d6e5",
933
+ "parentUUID": "d5410d46-ecf0-4454-abe7-3a37f01a2546",
934
934
  "isHook": false,
935
935
  "skipped": false
936
936
  }
937
937
  ],
938
938
  "suites": [],
939
939
  "passes": [
940
- "c226f02a-de91-4b28-a3fc-7ba0d4e2e996"
940
+ "e68c58b9-0564-47a5-8475-1e593055d6e5"
941
941
  ],
942
942
  "failures": [],
943
943
  "pending": [],
@@ -948,7 +948,7 @@
948
948
  "_timeout": 2000
949
949
  },
950
950
  {
951
- "uuid": "ff2a3392-d053-4545-a7a5-4d63d73a6499",
951
+ "uuid": "26fb687e-d1fa-45a5-9cc1-d6d72074d59a",
952
952
  "title": "get host()",
953
953
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
954
954
  "file": "/test/device.ts",
@@ -966,17 +966,17 @@
966
966
  "fail": false,
967
967
  "pending": false,
968
968
  "context": null,
969
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.host, '192.168.178.2');",
969
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert.strictEqual(device.host, '192.168.178.2');",
970
970
  "err": {},
971
- "uuid": "bd4bdfc0-e261-40c9-861d-84f244644583",
972
- "parentUUID": "ff2a3392-d053-4545-a7a5-4d63d73a6499",
971
+ "uuid": "b19ccebd-3732-4392-ac47-9753c6df403f",
972
+ "parentUUID": "26fb687e-d1fa-45a5-9cc1-d6d72074d59a",
973
973
  "isHook": false,
974
974
  "skipped": false
975
975
  }
976
976
  ],
977
977
  "suites": [],
978
978
  "passes": [
979
- "bd4bdfc0-e261-40c9-861d-84f244644583"
979
+ "b19ccebd-3732-4392-ac47-9753c6df403f"
980
980
  ],
981
981
  "failures": [],
982
982
  "pending": [],
@@ -987,7 +987,7 @@
987
987
  "_timeout": 2000
988
988
  },
989
989
  {
990
- "uuid": "987c5246-4fdc-4efa-8ebf-36f7cf428859",
990
+ "uuid": "3db03ffe-d435-4a01-ab73-92df9ddad807",
991
991
  "title": "get id()",
992
992
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
993
993
  "file": "/test/device.ts",
@@ -1005,17 +1005,17 @@
1005
1005
  "fail": false,
1006
1006
  "pending": false,
1007
1007
  "context": null,
1008
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****'\n});\nassert_1.default.strictEqual(device.id, '*****');",
1008
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****'\n});\nassert.strictEqual(device.id, '*****');",
1009
1009
  "err": {},
1010
- "uuid": "1fd53a56-3bd9-4b64-8823-fd21c39a3510",
1011
- "parentUUID": "987c5246-4fdc-4efa-8ebf-36f7cf428859",
1010
+ "uuid": "357c3abd-20f5-4922-be39-2d2d18682a8d",
1011
+ "parentUUID": "3db03ffe-d435-4a01-ab73-92df9ddad807",
1012
1012
  "isHook": false,
1013
1013
  "skipped": false
1014
1014
  }
1015
1015
  ],
1016
1016
  "suites": [],
1017
1017
  "passes": [
1018
- "1fd53a56-3bd9-4b64-8823-fd21c39a3510"
1018
+ "357c3abd-20f5-4922-be39-2d2d18682a8d"
1019
1019
  ],
1020
1020
  "failures": [],
1021
1021
  "pending": [],
@@ -1026,7 +1026,7 @@
1026
1026
  "_timeout": 2000
1027
1027
  },
1028
1028
  {
1029
- "uuid": "4894328e-d820-4860-992d-397711c74bcf",
1029
+ "uuid": "b0e41ac8-d976-45d9-83c8-d23d8fa9d8a7",
1030
1030
  "title": "get protocol()",
1031
1031
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1032
1032
  "file": "/test/device.ts",
@@ -1044,17 +1044,307 @@
1044
1044
  "fail": false,
1045
1045
  "pending": false,
1046
1046
  "context": null,
1047
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n protocol: types_1.NodePyATVProtocol.airplay\n});\nassert_1.default.strictEqual(device.protocol, types_1.NodePyATVProtocol.airplay);",
1047
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n protocol: NodePyATVProtocol.airplay\n});\nassert.strictEqual(device.protocol, NodePyATVProtocol.airplay);",
1048
+ "err": {},
1049
+ "uuid": "1bb34e23-93b5-47d8-96ae-549532d99088",
1050
+ "parentUUID": "b0e41ac8-d976-45d9-83c8-d23d8fa9d8a7",
1051
+ "isHook": false,
1052
+ "skipped": false
1053
+ }
1054
+ ],
1055
+ "suites": [],
1056
+ "passes": [
1057
+ "1bb34e23-93b5-47d8-96ae-549532d99088"
1058
+ ],
1059
+ "failures": [],
1060
+ "pending": [],
1061
+ "skipped": [],
1062
+ "duration": 0,
1063
+ "root": false,
1064
+ "rootEmpty": false,
1065
+ "_timeout": 2000
1066
+ },
1067
+ {
1068
+ "uuid": "690b005f-e6e0-49c1-bfb8-2fd2e5ea5645",
1069
+ "title": "get model()",
1070
+ "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1071
+ "file": "/test/device.ts",
1072
+ "beforeHooks": [],
1073
+ "afterHooks": [],
1074
+ "tests": [
1075
+ {
1076
+ "title": "should return the model if set by scan",
1077
+ "fullTitle": "NodePyATVDevice get model() should return the model if set by scan",
1078
+ "timedOut": false,
1079
+ "duration": 1,
1080
+ "state": "passed",
1081
+ "speed": "fast",
1082
+ "pass": true,
1083
+ "fail": false,
1084
+ "pending": false,
1085
+ "context": null,
1086
+ "code": "const device = new NodePyATVDevice({\n name: 'Vardagsrum',\n host: '10.0.10.81',\n id: 'xxx',\n model: 'Gen4K'\n});\nassert.strictEqual(device.model, 'Gen4K');",
1087
+ "err": {},
1088
+ "uuid": "b04bb81d-966c-4f6d-a6da-0dad943255bf",
1089
+ "parentUUID": "690b005f-e6e0-49c1-bfb8-2fd2e5ea5645",
1090
+ "isHook": false,
1091
+ "skipped": false
1092
+ },
1093
+ {
1094
+ "title": "should return undefined otherwise",
1095
+ "fullTitle": "NodePyATVDevice get model() should return undefined otherwise",
1096
+ "timedOut": false,
1097
+ "duration": 0,
1098
+ "state": "passed",
1099
+ "speed": "fast",
1100
+ "pass": true,
1101
+ "fail": false,
1102
+ "pending": false,
1103
+ "context": null,
1104
+ "code": "const device = new NodePyATVDevice({\n name: 'Vardagsrum',\n host: '10.0.10.81'\n});\nassert.strictEqual(device.model, undefined);",
1105
+ "err": {},
1106
+ "uuid": "1e7a76b9-1469-4515-b16a-7bb3980a34a6",
1107
+ "parentUUID": "690b005f-e6e0-49c1-bfb8-2fd2e5ea5645",
1108
+ "isHook": false,
1109
+ "skipped": false
1110
+ }
1111
+ ],
1112
+ "suites": [],
1113
+ "passes": [
1114
+ "b04bb81d-966c-4f6d-a6da-0dad943255bf",
1115
+ "1e7a76b9-1469-4515-b16a-7bb3980a34a6"
1116
+ ],
1117
+ "failures": [],
1118
+ "pending": [],
1119
+ "skipped": [],
1120
+ "duration": 1,
1121
+ "root": false,
1122
+ "rootEmpty": false,
1123
+ "_timeout": 2000
1124
+ },
1125
+ {
1126
+ "uuid": "dedc6ebe-f186-4054-a950-eef73fd16e99",
1127
+ "title": "get modelName()",
1128
+ "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1129
+ "file": "/test/device.ts",
1130
+ "beforeHooks": [],
1131
+ "afterHooks": [],
1132
+ "tests": [
1133
+ {
1134
+ "title": "should return the model name if set by scan",
1135
+ "fullTitle": "NodePyATVDevice get modelName() should return the model name if set by scan",
1136
+ "timedOut": false,
1137
+ "duration": 0,
1138
+ "state": "passed",
1139
+ "speed": "fast",
1140
+ "pass": true,
1141
+ "fail": false,
1142
+ "pending": false,
1143
+ "context": null,
1144
+ "code": "const device = new NodePyATVDevice({\n name: 'Vardagsrum',\n host: '10.0.10.81',\n id: 'xxx',\n modelName: 'Apple TV 4K'\n});\nassert.strictEqual(device.modelName, 'Apple TV 4K');",
1145
+ "err": {},
1146
+ "uuid": "5b930ac8-391f-4c46-87ff-94626c6b6608",
1147
+ "parentUUID": "dedc6ebe-f186-4054-a950-eef73fd16e99",
1148
+ "isHook": false,
1149
+ "skipped": false
1150
+ },
1151
+ {
1152
+ "title": "should return undefined otherwise",
1153
+ "fullTitle": "NodePyATVDevice get modelName() should return undefined otherwise",
1154
+ "timedOut": false,
1155
+ "duration": 0,
1156
+ "state": "passed",
1157
+ "speed": "fast",
1158
+ "pass": true,
1159
+ "fail": false,
1160
+ "pending": false,
1161
+ "context": null,
1162
+ "code": "const device = new NodePyATVDevice({\n name: 'Vardagsrum',\n host: '10.0.10.81'\n});\nassert.strictEqual(device.modelName, undefined);",
1163
+ "err": {},
1164
+ "uuid": "55e82148-b710-44a0-a272-6de0536fbb15",
1165
+ "parentUUID": "dedc6ebe-f186-4054-a950-eef73fd16e99",
1166
+ "isHook": false,
1167
+ "skipped": false
1168
+ }
1169
+ ],
1170
+ "suites": [],
1171
+ "passes": [
1172
+ "5b930ac8-391f-4c46-87ff-94626c6b6608",
1173
+ "55e82148-b710-44a0-a272-6de0536fbb15"
1174
+ ],
1175
+ "failures": [],
1176
+ "pending": [],
1177
+ "skipped": [],
1178
+ "duration": 0,
1179
+ "root": false,
1180
+ "rootEmpty": false,
1181
+ "_timeout": 2000
1182
+ },
1183
+ {
1184
+ "uuid": "7ea47f56-f4d5-4360-873f-d96a16bd5cc0",
1185
+ "title": "get os()",
1186
+ "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1187
+ "file": "/test/device.ts",
1188
+ "beforeHooks": [],
1189
+ "afterHooks": [],
1190
+ "tests": [
1191
+ {
1192
+ "title": "should return the operating system if set by scan",
1193
+ "fullTitle": "NodePyATVDevice get os() should return the operating system if set by scan",
1194
+ "timedOut": false,
1195
+ "duration": 0,
1196
+ "state": "passed",
1197
+ "speed": "fast",
1198
+ "pass": true,
1199
+ "fail": false,
1200
+ "pending": false,
1201
+ "context": null,
1202
+ "code": "const device = new NodePyATVDevice({\n name: 'Vardagsrum',\n host: '10.0.10.81',\n id: 'xxx',\n os: 'TvOS'\n});\nassert.strictEqual(device.os, 'TvOS');",
1203
+ "err": {},
1204
+ "uuid": "633705f1-3dc1-4756-9cbd-f8247d612340",
1205
+ "parentUUID": "7ea47f56-f4d5-4360-873f-d96a16bd5cc0",
1206
+ "isHook": false,
1207
+ "skipped": false
1208
+ },
1209
+ {
1210
+ "title": "should return undefined otherwise",
1211
+ "fullTitle": "NodePyATVDevice get os() should return undefined otherwise",
1212
+ "timedOut": false,
1213
+ "duration": 0,
1214
+ "state": "passed",
1215
+ "speed": "fast",
1216
+ "pass": true,
1217
+ "fail": false,
1218
+ "pending": false,
1219
+ "context": null,
1220
+ "code": "const device = new NodePyATVDevice({\n name: 'Vardagsrum',\n host: '10.0.10.81'\n});\nassert.strictEqual(device.os, undefined);",
1221
+ "err": {},
1222
+ "uuid": "12c60617-fbf4-4afb-8013-485007944e5f",
1223
+ "parentUUID": "7ea47f56-f4d5-4360-873f-d96a16bd5cc0",
1224
+ "isHook": false,
1225
+ "skipped": false
1226
+ }
1227
+ ],
1228
+ "suites": [],
1229
+ "passes": [
1230
+ "633705f1-3dc1-4756-9cbd-f8247d612340",
1231
+ "12c60617-fbf4-4afb-8013-485007944e5f"
1232
+ ],
1233
+ "failures": [],
1234
+ "pending": [],
1235
+ "skipped": [],
1236
+ "duration": 0,
1237
+ "root": false,
1238
+ "rootEmpty": false,
1239
+ "_timeout": 2000
1240
+ },
1241
+ {
1242
+ "uuid": "a9a14f98-c5cd-4220-93f8-32723a9e7e19",
1243
+ "title": "get version()",
1244
+ "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1245
+ "file": "/test/device.ts",
1246
+ "beforeHooks": [],
1247
+ "afterHooks": [],
1248
+ "tests": [
1249
+ {
1250
+ "title": "should return the version if set by scan",
1251
+ "fullTitle": "NodePyATVDevice get version() should return the version if set by scan",
1252
+ "timedOut": false,
1253
+ "duration": 0,
1254
+ "state": "passed",
1255
+ "speed": "fast",
1256
+ "pass": true,
1257
+ "fail": false,
1258
+ "pending": false,
1259
+ "context": null,
1260
+ "code": "const device = new NodePyATVDevice({\n name: 'Vardagsrum',\n host: '10.0.10.81',\n id: 'xxx',\n version: '15.5.1'\n});\nassert.strictEqual(device.version, '15.5.1');",
1261
+ "err": {},
1262
+ "uuid": "4867332b-3409-4009-8a97-9f8d3f2da25f",
1263
+ "parentUUID": "a9a14f98-c5cd-4220-93f8-32723a9e7e19",
1264
+ "isHook": false,
1265
+ "skipped": false
1266
+ },
1267
+ {
1268
+ "title": "should return undefined otherwise",
1269
+ "fullTitle": "NodePyATVDevice get version() should return undefined otherwise",
1270
+ "timedOut": false,
1271
+ "duration": 0,
1272
+ "state": "passed",
1273
+ "speed": "fast",
1274
+ "pass": true,
1275
+ "fail": false,
1276
+ "pending": false,
1277
+ "context": null,
1278
+ "code": "const device = new NodePyATVDevice({\n name: 'Vardagsrum',\n host: '10.0.10.81'\n});\nassert.strictEqual(device.version, undefined);",
1279
+ "err": {},
1280
+ "uuid": "8e59bd39-5069-48cb-8869-ba55102d9453",
1281
+ "parentUUID": "a9a14f98-c5cd-4220-93f8-32723a9e7e19",
1282
+ "isHook": false,
1283
+ "skipped": false
1284
+ }
1285
+ ],
1286
+ "suites": [],
1287
+ "passes": [
1288
+ "4867332b-3409-4009-8a97-9f8d3f2da25f",
1289
+ "8e59bd39-5069-48cb-8869-ba55102d9453"
1290
+ ],
1291
+ "failures": [],
1292
+ "pending": [],
1293
+ "skipped": [],
1294
+ "duration": 0,
1295
+ "root": false,
1296
+ "rootEmpty": false,
1297
+ "_timeout": 2000
1298
+ },
1299
+ {
1300
+ "uuid": "24288193-6b55-4d32-b858-7fde20046037",
1301
+ "title": "get services()",
1302
+ "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1303
+ "file": "/test/device.ts",
1304
+ "beforeHooks": [],
1305
+ "afterHooks": [],
1306
+ "tests": [
1307
+ {
1308
+ "title": "should return the services if set by scan",
1309
+ "fullTitle": "NodePyATVDevice get services() should return the services if set by scan",
1310
+ "timedOut": false,
1311
+ "duration": 0,
1312
+ "state": "passed",
1313
+ "speed": "fast",
1314
+ "pass": true,
1315
+ "fail": false,
1316
+ "pending": false,
1317
+ "context": null,
1318
+ "code": "const device = new NodePyATVDevice({\n name: 'Vardagsrum',\n host: '10.0.10.81',\n id: 'xxx',\n services: [\n {\n protocol: NodePyATVProtocol.mrp,\n port: 49152\n },\n {\n protocol: NodePyATVProtocol.airplay,\n port: 7000\n }\n ]\n});\nassert.deepStrictEqual(device.services, [\n {\n protocol: 'mrp',\n port: 49152\n },\n {\n protocol: 'airplay',\n port: 7000\n }\n]);",
1048
1319
  "err": {},
1049
- "uuid": "bc8432e6-0d6d-4d3b-b4cd-097ba07fad3a",
1050
- "parentUUID": "4894328e-d820-4860-992d-397711c74bcf",
1320
+ "uuid": "c9624bd1-785d-45e9-869a-ec01ad988916",
1321
+ "parentUUID": "24288193-6b55-4d32-b858-7fde20046037",
1322
+ "isHook": false,
1323
+ "skipped": false
1324
+ },
1325
+ {
1326
+ "title": "should return undefined otherwise",
1327
+ "fullTitle": "NodePyATVDevice get services() should return undefined otherwise",
1328
+ "timedOut": false,
1329
+ "duration": 0,
1330
+ "state": "passed",
1331
+ "speed": "fast",
1332
+ "pass": true,
1333
+ "fail": false,
1334
+ "pending": false,
1335
+ "context": null,
1336
+ "code": "const device = new NodePyATVDevice({\n name: 'Vardagsrum',\n host: '10.0.10.81'\n});\nassert.strictEqual(device.services, undefined);",
1337
+ "err": {},
1338
+ "uuid": "55a13248-45d2-42f3-b749-0b069a338eb6",
1339
+ "parentUUID": "24288193-6b55-4d32-b858-7fde20046037",
1051
1340
  "isHook": false,
1052
1341
  "skipped": false
1053
1342
  }
1054
1343
  ],
1055
1344
  "suites": [],
1056
1345
  "passes": [
1057
- "bc8432e6-0d6d-4d3b-b4cd-097ba07fad3a"
1346
+ "c9624bd1-785d-45e9-869a-ec01ad988916",
1347
+ "55a13248-45d2-42f3-b749-0b069a338eb6"
1058
1348
  ],
1059
1349
  "failures": [],
1060
1350
  "pending": [],
@@ -1065,7 +1355,7 @@
1065
1355
  "_timeout": 2000
1066
1356
  },
1067
1357
  {
1068
- "uuid": "81fc877b-3ca4-4d6d-82ac-630e70857566",
1358
+ "uuid": "41c91686-c317-46c5-a365-0ab5bc61dcc0",
1069
1359
  "title": "get debug()",
1070
1360
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1071
1361
  "file": "/test/device.ts",
@@ -1076,17 +1366,17 @@
1076
1366
  "title": "should return true if set to true",
1077
1367
  "fullTitle": "NodePyATVDevice get debug() should return true if set to true",
1078
1368
  "timedOut": false,
1079
- "duration": 1,
1369
+ "duration": 0,
1080
1370
  "state": "passed",
1081
1371
  "speed": "fast",
1082
1372
  "pass": true,
1083
1373
  "fail": false,
1084
1374
  "pending": false,
1085
1375
  "context": null,
1086
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);",
1376
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert.strictEqual(device.debug, true);",
1087
1377
  "err": {},
1088
- "uuid": "c62baa8e-1b8a-4dec-90ea-53f290e06f0a",
1089
- "parentUUID": "81fc877b-3ca4-4d6d-82ac-630e70857566",
1378
+ "uuid": "a0e4a971-d587-4787-b76c-f21b680dcd0c",
1379
+ "parentUUID": "41c91686-c317-46c5-a365-0ab5bc61dcc0",
1090
1380
  "isHook": false,
1091
1381
  "skipped": false
1092
1382
  },
@@ -1101,10 +1391,10 @@
1101
1391
  "fail": false,
1102
1392
  "pending": false,
1103
1393
  "context": null,
1104
- "code": "// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nconst device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: fn\n});\nassert_1.default.strictEqual(device.debug, fn);",
1394
+ "code": "// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nconst device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: fn\n});\nassert.strictEqual(device.debug, fn);",
1105
1395
  "err": {},
1106
- "uuid": "7a53686a-0958-4ab1-bddb-f08da4178fea",
1107
- "parentUUID": "81fc877b-3ca4-4d6d-82ac-630e70857566",
1396
+ "uuid": "6e912e42-8f2c-43ea-ad42-e4afdf290ae3",
1397
+ "parentUUID": "41c91686-c317-46c5-a365-0ab5bc61dcc0",
1108
1398
  "isHook": false,
1109
1399
  "skipped": false
1110
1400
  },
@@ -1119,30 +1409,30 @@
1119
1409
  "fail": false,
1120
1410
  "pending": false,
1121
1411
  "context": null,
1122
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.debug, undefined);",
1412
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert.strictEqual(device.debug, undefined);",
1123
1413
  "err": {},
1124
- "uuid": "16e83e10-596b-49f4-9097-cb9a7805a612",
1125
- "parentUUID": "81fc877b-3ca4-4d6d-82ac-630e70857566",
1414
+ "uuid": "97d1ea4e-d9da-4355-9a8b-cbeb206089f1",
1415
+ "parentUUID": "41c91686-c317-46c5-a365-0ab5bc61dcc0",
1126
1416
  "isHook": false,
1127
1417
  "skipped": false
1128
1418
  }
1129
1419
  ],
1130
1420
  "suites": [],
1131
1421
  "passes": [
1132
- "c62baa8e-1b8a-4dec-90ea-53f290e06f0a",
1133
- "7a53686a-0958-4ab1-bddb-f08da4178fea",
1134
- "16e83e10-596b-49f4-9097-cb9a7805a612"
1422
+ "a0e4a971-d587-4787-b76c-f21b680dcd0c",
1423
+ "6e912e42-8f2c-43ea-ad42-e4afdf290ae3",
1424
+ "97d1ea4e-d9da-4355-9a8b-cbeb206089f1"
1135
1425
  ],
1136
1426
  "failures": [],
1137
1427
  "pending": [],
1138
1428
  "skipped": [],
1139
- "duration": 1,
1429
+ "duration": 0,
1140
1430
  "root": false,
1141
1431
  "rootEmpty": false,
1142
1432
  "_timeout": 2000
1143
1433
  },
1144
1434
  {
1145
- "uuid": "64f1925e-964c-4720-9efb-3473c0f67bdc",
1435
+ "uuid": "22612185-8b69-4fac-b700-67010899c7db",
1146
1436
  "title": "set debug()",
1147
1437
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1148
1438
  "file": "/test/device.ts",
@@ -1160,10 +1450,10 @@
1160
1450
  "fail": false,
1161
1451
  "pending": false,
1162
1452
  "context": null,
1163
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.debug, undefined);\ndevice.debug = true;\nassert_1.default.strictEqual(device.debug, true);",
1453
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert.strictEqual(device.debug, undefined);\ndevice.debug = true;\nassert.strictEqual(device.debug, true);",
1164
1454
  "err": {},
1165
- "uuid": "565eba3d-2208-4ca8-bf6a-fd5e0c497d09",
1166
- "parentUUID": "64f1925e-964c-4720-9efb-3473c0f67bdc",
1455
+ "uuid": "a5d2657d-6821-40f6-99bc-45ac8dc2ae13",
1456
+ "parentUUID": "22612185-8b69-4fac-b700-67010899c7db",
1167
1457
  "isHook": false,
1168
1458
  "skipped": false
1169
1459
  },
@@ -1171,17 +1461,17 @@
1171
1461
  "title": "should work for debug = undefined",
1172
1462
  "fullTitle": "NodePyATVDevice set debug() should work for debug = undefined",
1173
1463
  "timedOut": false,
1174
- "duration": 0,
1464
+ "duration": 1,
1175
1465
  "state": "passed",
1176
1466
  "speed": "fast",
1177
1467
  "pass": true,
1178
1468
  "fail": false,
1179
1469
  "pending": false,
1180
1470
  "context": null,
1181
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert_1.default.strictEqual(device.debug, undefined);",
1471
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert.strictEqual(device.debug, undefined);",
1182
1472
  "err": {},
1183
- "uuid": "23f6c4aa-02fc-409b-a720-bab294e76c98",
1184
- "parentUUID": "64f1925e-964c-4720-9efb-3473c0f67bdc",
1473
+ "uuid": "b54a3089-87b1-4dea-ae5d-fbbf8ef2dba9",
1474
+ "parentUUID": "22612185-8b69-4fac-b700-67010899c7db",
1185
1475
  "isHook": false,
1186
1476
  "skipped": false
1187
1477
  },
@@ -1196,10 +1486,10 @@
1196
1486
  "fail": false,
1197
1487
  "pending": false,
1198
1488
  "context": null,
1199
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert_1.default.strictEqual(device.debug, undefined);",
1489
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert.strictEqual(device.debug, undefined);",
1200
1490
  "err": {},
1201
- "uuid": "ecd487a9-bde3-4c6b-bbf6-347083568c8a",
1202
- "parentUUID": "64f1925e-964c-4720-9efb-3473c0f67bdc",
1491
+ "uuid": "043a27ad-638a-478d-a4c9-9bd918ad3812",
1492
+ "parentUUID": "22612185-8b69-4fac-b700-67010899c7db",
1203
1493
  "isHook": false,
1204
1494
  "skipped": false
1205
1495
  },
@@ -1214,31 +1504,31 @@
1214
1504
  "fail": false,
1215
1505
  "pending": false,
1216
1506
  "context": null,
1217
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nassert_1.default.strictEqual(device.debug, undefined);\ndevice.debug = fn;\nassert_1.default.strictEqual(device.debug, fn);",
1507
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nassert.strictEqual(device.debug, undefined);\ndevice.debug = fn;\nassert.strictEqual(device.debug, fn);",
1218
1508
  "err": {},
1219
- "uuid": "0aede7d1-ffb9-446d-b235-b57fced087c4",
1220
- "parentUUID": "64f1925e-964c-4720-9efb-3473c0f67bdc",
1509
+ "uuid": "61a724fc-3ba1-42af-b144-60b1c32b37ff",
1510
+ "parentUUID": "22612185-8b69-4fac-b700-67010899c7db",
1221
1511
  "isHook": false,
1222
1512
  "skipped": false
1223
1513
  }
1224
1514
  ],
1225
1515
  "suites": [],
1226
1516
  "passes": [
1227
- "565eba3d-2208-4ca8-bf6a-fd5e0c497d09",
1228
- "23f6c4aa-02fc-409b-a720-bab294e76c98",
1229
- "ecd487a9-bde3-4c6b-bbf6-347083568c8a",
1230
- "0aede7d1-ffb9-446d-b235-b57fced087c4"
1517
+ "a5d2657d-6821-40f6-99bc-45ac8dc2ae13",
1518
+ "b54a3089-87b1-4dea-ae5d-fbbf8ef2dba9",
1519
+ "043a27ad-638a-478d-a4c9-9bd918ad3812",
1520
+ "61a724fc-3ba1-42af-b144-60b1c32b37ff"
1231
1521
  ],
1232
1522
  "failures": [],
1233
1523
  "pending": [],
1234
1524
  "skipped": [],
1235
- "duration": 0,
1525
+ "duration": 1,
1236
1526
  "root": false,
1237
1527
  "rootEmpty": false,
1238
1528
  "_timeout": 2000
1239
1529
  },
1240
1530
  {
1241
- "uuid": "a040cb76-54e9-4c16-ac3d-d36ad2f2cd9b",
1531
+ "uuid": "b33e351d-3273-47bd-8e1d-afceec47988e",
1242
1532
  "title": "toJSON()",
1243
1533
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1244
1534
  "file": "/test/device.ts",
@@ -1256,10 +1546,10 @@
1256
1546
  "fail": false,
1257
1547
  "pending": false,
1258
1548
  "context": null,
1259
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n});\nassert_1.default.deepEqual(device.toJSON(), {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n});",
1549
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: NodePyATVProtocol.airplay\n});\nassert.deepEqual(device.toJSON(), {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: NodePyATVProtocol.airplay\n});",
1260
1550
  "err": {},
1261
- "uuid": "7c9b36da-445e-49ac-846a-f35efdfdcf4e",
1262
- "parentUUID": "a040cb76-54e9-4c16-ac3d-d36ad2f2cd9b",
1551
+ "uuid": "f3ca6f24-36a7-443d-bd3b-408da36522aa",
1552
+ "parentUUID": "b33e351d-3273-47bd-8e1d-afceec47988e",
1263
1553
  "isHook": false,
1264
1554
  "skipped": false
1265
1555
  },
@@ -1274,18 +1564,18 @@
1274
1564
  "fail": false,
1275
1565
  "pending": false,
1276
1566
  "context": null,
1277
- "code": "const config = {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n};\nconst deviceA = new device_1.default(config);\nconst deviceB = new device_1.default(deviceA.toJSON());\nassert_1.default.deepEqual(deviceB.toJSON(), config);",
1567
+ "code": "const config = {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: NodePyATVProtocol.airplay\n};\nconst deviceA = new NodePyATVDevice(config);\nconst deviceB = new NodePyATVDevice(deviceA.toJSON());\nassert.deepEqual(deviceB.toJSON(), config);",
1278
1568
  "err": {},
1279
- "uuid": "956a4079-8f7f-4f5f-a981-23a3f77c9b38",
1280
- "parentUUID": "a040cb76-54e9-4c16-ac3d-d36ad2f2cd9b",
1569
+ "uuid": "39b1ed31-cd64-4bc4-ae70-e8ee8e4f82a3",
1570
+ "parentUUID": "b33e351d-3273-47bd-8e1d-afceec47988e",
1281
1571
  "isHook": false,
1282
1572
  "skipped": false
1283
1573
  }
1284
1574
  ],
1285
1575
  "suites": [],
1286
1576
  "passes": [
1287
- "7c9b36da-445e-49ac-846a-f35efdfdcf4e",
1288
- "956a4079-8f7f-4f5f-a981-23a3f77c9b38"
1577
+ "f3ca6f24-36a7-443d-bd3b-408da36522aa",
1578
+ "39b1ed31-cd64-4bc4-ae70-e8ee8e4f82a3"
1289
1579
  ],
1290
1580
  "failures": [],
1291
1581
  "pending": [],
@@ -1296,7 +1586,7 @@
1296
1586
  "_timeout": 2000
1297
1587
  },
1298
1588
  {
1299
- "uuid": "099f1003-3819-4b80-882f-2fa363c66f55",
1589
+ "uuid": "9d867fe8-2981-4ac4-942c-b98e9310ae27",
1300
1590
  "title": "toString()",
1301
1591
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1302
1592
  "file": "/test/device.ts",
@@ -1307,35 +1597,35 @@
1307
1597
  "title": "should work",
1308
1598
  "fullTitle": "NodePyATVDevice toString() should work",
1309
1599
  "timedOut": false,
1310
- "duration": 0,
1600
+ "duration": 1,
1311
1601
  "state": "passed",
1312
1602
  "speed": "fast",
1313
1603
  "pass": true,
1314
1604
  "fail": false,
1315
1605
  "pending": false,
1316
1606
  "context": null,
1317
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.toString(), 'NodePyATVDevice(My Testdevice, 192.168.178.2)');",
1607
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert.strictEqual(device.toString(), 'NodePyATVDevice(My Testdevice, 192.168.178.2)');",
1318
1608
  "err": {},
1319
- "uuid": "4f1ce6e3-f28b-4e7e-9590-efee98b80cce",
1320
- "parentUUID": "099f1003-3819-4b80-882f-2fa363c66f55",
1609
+ "uuid": "cff5b144-523f-4378-b994-578e6f99b39b",
1610
+ "parentUUID": "9d867fe8-2981-4ac4-942c-b98e9310ae27",
1321
1611
  "isHook": false,
1322
1612
  "skipped": false
1323
1613
  }
1324
1614
  ],
1325
1615
  "suites": [],
1326
1616
  "passes": [
1327
- "4f1ce6e3-f28b-4e7e-9590-efee98b80cce"
1617
+ "cff5b144-523f-4378-b994-578e6f99b39b"
1328
1618
  ],
1329
1619
  "failures": [],
1330
1620
  "pending": [],
1331
1621
  "skipped": [],
1332
- "duration": 0,
1622
+ "duration": 1,
1333
1623
  "root": false,
1334
1624
  "rootEmpty": false,
1335
1625
  "_timeout": 2000
1336
1626
  },
1337
1627
  {
1338
- "uuid": "af2270ce-035f-41ff-85a7-07b05d3a4c70",
1628
+ "uuid": "1baac27c-cbb9-408f-bb71-3c6b6414601e",
1339
1629
  "title": "getState()",
1340
1630
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1341
1631
  "file": "/test/device.ts",
@@ -1355,8 +1645,8 @@
1355
1645
  "context": null,
1356
1646
  "code": "",
1357
1647
  "err": {},
1358
- "uuid": "12779896-0700-42f3-ab02-82ecba90059c",
1359
- "parentUUID": "af2270ce-035f-41ff-85a7-07b05d3a4c70",
1648
+ "uuid": "9412ebf9-96ca-409e-b052-e395e8e55a20",
1649
+ "parentUUID": "1baac27c-cbb9-408f-bb71-3c6b6414601e",
1360
1650
  "isHook": false,
1361
1651
  "skipped": false
1362
1652
  },
@@ -1364,17 +1654,17 @@
1364
1654
  "title": "should work",
1365
1655
  "fullTitle": "NodePyATVDevice getState() should work",
1366
1656
  "timedOut": false,
1367
- "duration": 2,
1657
+ "duration": 1,
1368
1658
  "state": "passed",
1369
1659
  "speed": "fast",
1370
1660
  "pass": true,
1371
1661
  "fail": false,
1372
1662
  "pending": false,
1373
1663
  "context": null,
1374
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const result = yield device.getState();\n assert_1.default.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: types_1.NodePyATVMediaType.video,\n deviceState: types_1.NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: types_1.NodePyATVShuffleState.off,\n repeat: types_1.NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n });\n});",
1664
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const result = yield device.getState();\n assert.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: NodePyATVMediaType.video,\n deviceState: NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: NodePyATVShuffleState.off,\n repeat: NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n });\n});",
1375
1665
  "err": {},
1376
- "uuid": "01ec89e6-f40e-4c34-9ae2-64b740dc2854",
1377
- "parentUUID": "af2270ce-035f-41ff-85a7-07b05d3a4c70",
1666
+ "uuid": "c5ecbab3-031d-44d2-b4eb-4a26ce43c8eb",
1667
+ "parentUUID": "1baac27c-cbb9-408f-bb71-3c6b6414601e",
1378
1668
  "isHook": false,
1379
1669
  "skipped": false
1380
1670
  },
@@ -1389,10 +1679,10 @@
1389
1679
  "fail": false,
1390
1680
  "pending": false,
1391
1681
  "context": null,
1392
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n });\n })\n });\n assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield device.getState();\n }), /Got pyatv Error: invalid credentials: 321/);\n});",
1682
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n });\n })\n });\n assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield device.getState();\n }), /Got pyatv Error: invalid credentials: 321/);\n});",
1393
1683
  "err": {},
1394
- "uuid": "82a0a030-8958-4278-bd38-c711e6d7e112",
1395
- "parentUUID": "af2270ce-035f-41ff-85a7-07b05d3a4c70",
1684
+ "uuid": "54464566-1689-4637-81e6-4df23a156654",
1685
+ "parentUUID": "1baac27c-cbb9-408f-bb71-3c6b6414601e",
1396
1686
  "isHook": false,
1397
1687
  "skipped": false
1398
1688
  },
@@ -1407,10 +1697,10 @@
1407
1697
  "fail": false,
1408
1698
  "pending": false,
1409
1699
  "context": null,
1410
- "code": "return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: new Date().toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n const secondResult = yield device.getState();\n assert_1.default.strictEqual(firstResult.dateTime, secondResult.dateTime);\n assert_1.default.strictEqual(executions, 1);\n});",
1700
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: new Date().toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n const secondResult = yield device.getState();\n assert.strictEqual(firstResult.dateTime, secondResult.dateTime);\n assert.strictEqual(executions, 1);\n});",
1411
1701
  "err": {},
1412
- "uuid": "0fca7ea9-8b7c-471b-84f5-8e9940012916",
1413
- "parentUUID": "af2270ce-035f-41ff-85a7-07b05d3a4c70",
1702
+ "uuid": "e77ebe94-88b7-4e97-bb03-a329556021d4",
1703
+ "parentUUID": "1baac27c-cbb9-408f-bb71-3c6b6414601e",
1414
1704
  "isHook": false,
1415
1705
  "skipped": false
1416
1706
  },
@@ -1418,40 +1708,40 @@
1418
1708
  "title": "should update the position if cache was used",
1419
1709
  "fullTitle": "NodePyATVDevice getState() should update the position if cache was used",
1420
1710
  "timedOut": false,
1421
- "duration": 2,
1711
+ "duration": 1,
1422
1712
  "state": "passed",
1423
1713
  "speed": "fast",
1424
1714
  "pass": true,
1425
1715
  "fail": false,
1426
1716
  "pending": false,
1427
1717
  "context": null,
1428
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: new Date(new Date().getTime() - 1000).toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n assert_1.default.strictEqual(firstResult.position, 27);\n const secondResult = yield device.getState();\n assert_1.default.ok(secondResult.position);\n assert_1.default.ok(secondResult.position > 27, `Position should be > 27, was ${secondResult.position}`);\n assert_1.default.ok(secondResult.position < 30, `Position should be > 27, was ${secondResult.position}`);\n});",
1718
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n datetime: new Date(new Date().getTime() - 1000).toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n assert.strictEqual(firstResult.position, 27);\n const secondResult = yield device.getState();\n assert.ok(secondResult.position);\n assert.ok(secondResult.position > 27, `Position should be > 27, was ${secondResult.position}`);\n assert.ok(secondResult.position < 30, `Position should be > 27, was ${secondResult.position}`);\n});",
1429
1719
  "err": {},
1430
- "uuid": "76157dd1-b9f5-4021-be74-ed5c83e80510",
1431
- "parentUUID": "af2270ce-035f-41ff-85a7-07b05d3a4c70",
1720
+ "uuid": "d5739395-4a7e-4623-8176-b003b58ef049",
1721
+ "parentUUID": "1baac27c-cbb9-408f-bb71-3c6b6414601e",
1432
1722
  "isHook": false,
1433
1723
  "skipped": false
1434
1724
  }
1435
1725
  ],
1436
1726
  "suites": [],
1437
1727
  "passes": [
1438
- "01ec89e6-f40e-4c34-9ae2-64b740dc2854",
1439
- "82a0a030-8958-4278-bd38-c711e6d7e112",
1440
- "0fca7ea9-8b7c-471b-84f5-8e9940012916",
1441
- "76157dd1-b9f5-4021-be74-ed5c83e80510"
1728
+ "c5ecbab3-031d-44d2-b4eb-4a26ce43c8eb",
1729
+ "54464566-1689-4637-81e6-4df23a156654",
1730
+ "e77ebe94-88b7-4e97-bb03-a329556021d4",
1731
+ "d5739395-4a7e-4623-8176-b003b58ef049"
1442
1732
  ],
1443
1733
  "failures": [],
1444
1734
  "pending": [
1445
- "12779896-0700-42f3-ab02-82ecba90059c"
1735
+ "9412ebf9-96ca-409e-b052-e395e8e55a20"
1446
1736
  ],
1447
1737
  "skipped": [],
1448
- "duration": 6,
1738
+ "duration": 4,
1449
1739
  "root": false,
1450
1740
  "rootEmpty": false,
1451
1741
  "_timeout": 2000
1452
1742
  },
1453
1743
  {
1454
- "uuid": "27a4e819-749a-4fa1-af9f-9174dfce4dff",
1744
+ "uuid": "5c8b49eb-2024-48ec-9ef6-dd3eceea2e03",
1455
1745
  "title": "clearState()",
1456
1746
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1457
1747
  "file": "/test/device.ts",
@@ -1462,35 +1752,35 @@
1462
1752
  "title": "should work",
1463
1753
  "fullTitle": "NodePyATVDevice clearState() should work",
1464
1754
  "timedOut": false,
1465
- "duration": 3,
1755
+ "duration": 2,
1466
1756
  "state": "passed",
1467
1757
  "speed": "fast",
1468
1758
  "pass": true,
1469
1759
  "fail": false,
1470
1760
  "pending": false,
1471
1761
  "context": null,
1472
- "code": "return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n title: 'Solo: A Star Wars Story'\n });\n })\n });\n assert_1.default.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n device.clearState();\n assert_1.default.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n assert_1.default.strictEqual(executions, 2);\n});",
1762
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n title: 'Solo: A Star Wars Story'\n });\n })\n });\n assert.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n device.clearState();\n assert.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n assert.strictEqual(executions, 2);\n});",
1473
1763
  "err": {},
1474
- "uuid": "cc695905-c2a0-490c-a76b-631ae09a2284",
1475
- "parentUUID": "27a4e819-749a-4fa1-af9f-9174dfce4dff",
1764
+ "uuid": "ec5f06de-d4e7-4189-a51d-eeed9e56a459",
1765
+ "parentUUID": "5c8b49eb-2024-48ec-9ef6-dd3eceea2e03",
1476
1766
  "isHook": false,
1477
1767
  "skipped": false
1478
1768
  }
1479
1769
  ],
1480
1770
  "suites": [],
1481
1771
  "passes": [
1482
- "cc695905-c2a0-490c-a76b-631ae09a2284"
1772
+ "ec5f06de-d4e7-4189-a51d-eeed9e56a459"
1483
1773
  ],
1484
1774
  "failures": [],
1485
1775
  "pending": [],
1486
1776
  "skipped": [],
1487
- "duration": 3,
1777
+ "duration": 2,
1488
1778
  "root": false,
1489
1779
  "rootEmpty": false,
1490
1780
  "_timeout": 2000
1491
1781
  },
1492
1782
  {
1493
- "uuid": "79deb56e-dcfe-4ab1-a2be-2b8f4b9e0d2a",
1783
+ "uuid": "05353edb-2b70-4460-b682-e923145d349b",
1494
1784
  "title": "getDateTime()",
1495
1785
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1496
1786
  "file": "/test/device.ts",
@@ -1508,17 +1798,17 @@
1508
1798
  "fail": false,
1509
1799
  "pending": false,
1510
1800
  "context": null,
1511
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: new Date().toJSON()\n });\n })\n });\n const result = yield device.getDateTime();\n assert_1.default.ok(result instanceof Date);\n});",
1801
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n datetime: new Date().toJSON()\n });\n })\n });\n const result = yield device.getDateTime();\n assert.ok(result instanceof Date);\n});",
1512
1802
  "err": {},
1513
- "uuid": "cd2eb50a-0fa4-4728-9a0e-8955bc86f54a",
1514
- "parentUUID": "79deb56e-dcfe-4ab1-a2be-2b8f4b9e0d2a",
1803
+ "uuid": "00f29809-d04a-4b71-845e-870c9e987147",
1804
+ "parentUUID": "05353edb-2b70-4460-b682-e923145d349b",
1515
1805
  "isHook": false,
1516
1806
  "skipped": false
1517
1807
  }
1518
1808
  ],
1519
1809
  "suites": [],
1520
1810
  "passes": [
1521
- "cd2eb50a-0fa4-4728-9a0e-8955bc86f54a"
1811
+ "00f29809-d04a-4b71-845e-870c9e987147"
1522
1812
  ],
1523
1813
  "failures": [],
1524
1814
  "pending": [],
@@ -1529,7 +1819,7 @@
1529
1819
  "_timeout": 2000
1530
1820
  },
1531
1821
  {
1532
- "uuid": "be9429cd-6169-43cc-9963-09e604a70d90",
1822
+ "uuid": "9026a3f7-d9bb-4939-a598-f933ea742782",
1533
1823
  "title": "getHash()",
1534
1824
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1535
1825
  "file": "/test/device.ts",
@@ -1547,17 +1837,17 @@
1547
1837
  "fail": false,
1548
1838
  "pending": false,
1549
1839
  "context": null,
1550
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n hash: '12345'\n });\n })\n });\n const result = yield device.getHash();\n assert_1.default.strictEqual(result, '12345');\n});",
1840
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n hash: '12345'\n });\n })\n });\n const result = yield device.getHash();\n assert.strictEqual(result, '12345');\n});",
1551
1841
  "err": {},
1552
- "uuid": "b4591ce6-e465-426f-a2b2-ade2f0e705a0",
1553
- "parentUUID": "be9429cd-6169-43cc-9963-09e604a70d90",
1842
+ "uuid": "3b26cf9d-f08c-4b71-bf50-1c0290c6dad4",
1843
+ "parentUUID": "9026a3f7-d9bb-4939-a598-f933ea742782",
1554
1844
  "isHook": false,
1555
1845
  "skipped": false
1556
1846
  }
1557
1847
  ],
1558
1848
  "suites": [],
1559
1849
  "passes": [
1560
- "b4591ce6-e465-426f-a2b2-ade2f0e705a0"
1850
+ "3b26cf9d-f08c-4b71-bf50-1c0290c6dad4"
1561
1851
  ],
1562
1852
  "failures": [],
1563
1853
  "pending": [],
@@ -1568,7 +1858,7 @@
1568
1858
  "_timeout": 2000
1569
1859
  },
1570
1860
  {
1571
- "uuid": "693a2451-9405-4fba-9da6-6d88b79cec58",
1861
+ "uuid": "c99cc177-1bba-473b-b1fb-143994fcd4e0",
1572
1862
  "title": "getMediaType()",
1573
1863
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1574
1864
  "file": "/test/device.ts",
@@ -1579,35 +1869,35 @@
1579
1869
  "title": "should work",
1580
1870
  "fullTitle": "NodePyATVDevice getMediaType() should work",
1581
1871
  "timedOut": false,
1582
- "duration": 2,
1872
+ "duration": 1,
1583
1873
  "state": "passed",
1584
1874
  "speed": "fast",
1585
1875
  "pass": true,
1586
1876
  "fail": false,
1587
1877
  "pending": false,
1588
1878
  "context": null,
1589
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n media_type: 'video'\n });\n })\n });\n const result = yield device.getMediaType();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVMediaType.video);\n assert_1.default.deepStrictEqual(result, 'video');\n});",
1879
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n media_type: 'video'\n });\n })\n });\n const result = yield device.getMediaType();\n assert.deepStrictEqual(result, NodePyATVMediaType.video);\n assert.deepStrictEqual(result, 'video');\n});",
1590
1880
  "err": {},
1591
- "uuid": "86e4fec7-3530-496e-888d-b0c51d399b0a",
1592
- "parentUUID": "693a2451-9405-4fba-9da6-6d88b79cec58",
1881
+ "uuid": "da48cb19-66d3-4e8b-bf2e-e534fc59d521",
1882
+ "parentUUID": "c99cc177-1bba-473b-b1fb-143994fcd4e0",
1593
1883
  "isHook": false,
1594
1884
  "skipped": false
1595
1885
  }
1596
1886
  ],
1597
1887
  "suites": [],
1598
1888
  "passes": [
1599
- "86e4fec7-3530-496e-888d-b0c51d399b0a"
1889
+ "da48cb19-66d3-4e8b-bf2e-e534fc59d521"
1600
1890
  ],
1601
1891
  "failures": [],
1602
1892
  "pending": [],
1603
1893
  "skipped": [],
1604
- "duration": 2,
1894
+ "duration": 1,
1605
1895
  "root": false,
1606
1896
  "rootEmpty": false,
1607
1897
  "_timeout": 2000
1608
1898
  },
1609
1899
  {
1610
- "uuid": "354936a2-c92b-4c79-98a4-ae0fac3a5102",
1900
+ "uuid": "36a9a37e-26c7-4a76-a3e7-e456de9a9136",
1611
1901
  "title": "getDeviceState()",
1612
1902
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1613
1903
  "file": "/test/device.ts",
@@ -1618,35 +1908,35 @@
1618
1908
  "title": "should work",
1619
1909
  "fullTitle": "NodePyATVDevice getDeviceState() should work",
1620
1910
  "timedOut": false,
1621
- "duration": 2,
1911
+ "duration": 1,
1622
1912
  "state": "passed",
1623
1913
  "speed": "fast",
1624
1914
  "pass": true,
1625
1915
  "fail": false,
1626
1916
  "pending": false,
1627
1917
  "context": null,
1628
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n device_state: 'seeking'\n });\n })\n });\n const result = yield device.getDeviceState();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVDeviceState.seeking);\n assert_1.default.deepStrictEqual(result, 'seeking');\n});",
1918
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n device_state: 'seeking'\n });\n })\n });\n const result = yield device.getDeviceState();\n assert.deepStrictEqual(result, NodePyATVDeviceState.seeking);\n assert.deepStrictEqual(result, 'seeking');\n});",
1629
1919
  "err": {},
1630
- "uuid": "d4484d2e-2cfe-4ffc-bda2-98856a397248",
1631
- "parentUUID": "354936a2-c92b-4c79-98a4-ae0fac3a5102",
1920
+ "uuid": "023b7f72-011e-42f5-bd7c-425bbfaeb063",
1921
+ "parentUUID": "36a9a37e-26c7-4a76-a3e7-e456de9a9136",
1632
1922
  "isHook": false,
1633
1923
  "skipped": false
1634
1924
  }
1635
1925
  ],
1636
1926
  "suites": [],
1637
1927
  "passes": [
1638
- "d4484d2e-2cfe-4ffc-bda2-98856a397248"
1928
+ "023b7f72-011e-42f5-bd7c-425bbfaeb063"
1639
1929
  ],
1640
1930
  "failures": [],
1641
1931
  "pending": [],
1642
1932
  "skipped": [],
1643
- "duration": 2,
1933
+ "duration": 1,
1644
1934
  "root": false,
1645
1935
  "rootEmpty": false,
1646
1936
  "_timeout": 2000
1647
1937
  },
1648
1938
  {
1649
- "uuid": "7846f841-e566-4712-82dd-1cc4e606e33f",
1939
+ "uuid": "d2983ef5-1f14-4ae3-b493-d85228412e6a",
1650
1940
  "title": "getTitle()",
1651
1941
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1652
1942
  "file": "/test/device.ts",
@@ -1664,17 +1954,17 @@
1664
1954
  "fail": false,
1665
1955
  "pending": false,
1666
1956
  "context": null,
1667
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const result = yield device.getTitle();\n assert_1.default.strictEqual(result, 'My Movie');\n});",
1957
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const result = yield device.getTitle();\n assert.strictEqual(result, 'My Movie');\n});",
1668
1958
  "err": {},
1669
- "uuid": "72bc5581-5d71-4a55-ad17-c2cf1a1a0402",
1670
- "parentUUID": "7846f841-e566-4712-82dd-1cc4e606e33f",
1959
+ "uuid": "dabf92f8-28c3-454a-a946-608107e4d159",
1960
+ "parentUUID": "d2983ef5-1f14-4ae3-b493-d85228412e6a",
1671
1961
  "isHook": false,
1672
1962
  "skipped": false
1673
1963
  }
1674
1964
  ],
1675
1965
  "suites": [],
1676
1966
  "passes": [
1677
- "72bc5581-5d71-4a55-ad17-c2cf1a1a0402"
1967
+ "dabf92f8-28c3-454a-a946-608107e4d159"
1678
1968
  ],
1679
1969
  "failures": [],
1680
1970
  "pending": [],
@@ -1685,7 +1975,7 @@
1685
1975
  "_timeout": 2000
1686
1976
  },
1687
1977
  {
1688
- "uuid": "c00a861d-5ba9-4273-8eca-32313b54bd9d",
1978
+ "uuid": "ec6554db-561d-4e96-9687-1d773ccccfff",
1689
1979
  "title": "getArtist()",
1690
1980
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1691
1981
  "file": "/test/device.ts",
@@ -1696,35 +1986,35 @@
1696
1986
  "title": "should work",
1697
1987
  "fullTitle": "NodePyATVDevice getArtist() should work",
1698
1988
  "timedOut": false,
1699
- "duration": 2,
1989
+ "duration": 1,
1700
1990
  "state": "passed",
1701
1991
  "speed": "fast",
1702
1992
  "pass": true,
1703
1993
  "fail": false,
1704
1994
  "pending": false,
1705
1995
  "context": null,
1706
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n artist: 'My Artist'\n });\n })\n });\n const result = yield device.getArtist();\n assert_1.default.strictEqual(result, 'My Artist');\n});",
1996
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n artist: 'My Artist'\n });\n })\n });\n const result = yield device.getArtist();\n assert.strictEqual(result, 'My Artist');\n});",
1707
1997
  "err": {},
1708
- "uuid": "7a400a9d-78bc-4ac8-b76a-0c578e329574",
1709
- "parentUUID": "c00a861d-5ba9-4273-8eca-32313b54bd9d",
1998
+ "uuid": "0f969b06-7dc4-4cd4-aaf7-a0636a7fb68f",
1999
+ "parentUUID": "ec6554db-561d-4e96-9687-1d773ccccfff",
1710
2000
  "isHook": false,
1711
2001
  "skipped": false
1712
2002
  }
1713
2003
  ],
1714
2004
  "suites": [],
1715
2005
  "passes": [
1716
- "7a400a9d-78bc-4ac8-b76a-0c578e329574"
2006
+ "0f969b06-7dc4-4cd4-aaf7-a0636a7fb68f"
1717
2007
  ],
1718
2008
  "failures": [],
1719
2009
  "pending": [],
1720
2010
  "skipped": [],
1721
- "duration": 2,
2011
+ "duration": 1,
1722
2012
  "root": false,
1723
2013
  "rootEmpty": false,
1724
2014
  "_timeout": 2000
1725
2015
  },
1726
2016
  {
1727
- "uuid": "76fac5a2-fc79-48c6-a782-517b7575d271",
2017
+ "uuid": "a47a1655-6bcf-41c7-8d9a-591e37251a3a",
1728
2018
  "title": "getAlbum()",
1729
2019
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1730
2020
  "file": "/test/device.ts",
@@ -1742,17 +2032,17 @@
1742
2032
  "fail": false,
1743
2033
  "pending": false,
1744
2034
  "context": null,
1745
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n album: 'My ALbum'\n });\n })\n });\n const result = yield device.getAlbum();\n assert_1.default.strictEqual(result, 'My ALbum');\n});",
2035
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n album: 'My ALbum'\n });\n })\n });\n const result = yield device.getAlbum();\n assert.strictEqual(result, 'My ALbum');\n});",
1746
2036
  "err": {},
1747
- "uuid": "5c160fd9-e6f9-4a53-81df-f36cd914b512",
1748
- "parentUUID": "76fac5a2-fc79-48c6-a782-517b7575d271",
2037
+ "uuid": "06a6572c-6737-4027-87fd-cdb0d64c5d13",
2038
+ "parentUUID": "a47a1655-6bcf-41c7-8d9a-591e37251a3a",
1749
2039
  "isHook": false,
1750
2040
  "skipped": false
1751
2041
  }
1752
2042
  ],
1753
2043
  "suites": [],
1754
2044
  "passes": [
1755
- "5c160fd9-e6f9-4a53-81df-f36cd914b512"
2045
+ "06a6572c-6737-4027-87fd-cdb0d64c5d13"
1756
2046
  ],
1757
2047
  "failures": [],
1758
2048
  "pending": [],
@@ -1763,7 +2053,7 @@
1763
2053
  "_timeout": 2000
1764
2054
  },
1765
2055
  {
1766
- "uuid": "99f70212-36cb-4249-a56e-de9958c82e1c",
2056
+ "uuid": "609655d5-173d-4caa-a6f1-e52b74693a13",
1767
2057
  "title": "getGenre()",
1768
2058
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1769
2059
  "file": "/test/device.ts",
@@ -1774,35 +2064,35 @@
1774
2064
  "title": "should work",
1775
2065
  "fullTitle": "NodePyATVDevice getGenre() should work",
1776
2066
  "timedOut": false,
1777
- "duration": 2,
2067
+ "duration": 1,
1778
2068
  "state": "passed",
1779
2069
  "speed": "fast",
1780
2070
  "pass": true,
1781
2071
  "fail": false,
1782
2072
  "pending": false,
1783
2073
  "context": null,
1784
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n genre: 'My Genre'\n });\n })\n });\n const result = yield device.getGenre();\n assert_1.default.strictEqual(result, 'My Genre');\n});",
2074
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n genre: 'My Genre'\n });\n })\n });\n const result = yield device.getGenre();\n assert.strictEqual(result, 'My Genre');\n});",
1785
2075
  "err": {},
1786
- "uuid": "e36cef65-4819-48cb-a74d-3b78a72e7ad1",
1787
- "parentUUID": "99f70212-36cb-4249-a56e-de9958c82e1c",
2076
+ "uuid": "a47cf005-e74d-4eea-bf55-b9bb209b4612",
2077
+ "parentUUID": "609655d5-173d-4caa-a6f1-e52b74693a13",
1788
2078
  "isHook": false,
1789
2079
  "skipped": false
1790
2080
  }
1791
2081
  ],
1792
2082
  "suites": [],
1793
2083
  "passes": [
1794
- "e36cef65-4819-48cb-a74d-3b78a72e7ad1"
2084
+ "a47cf005-e74d-4eea-bf55-b9bb209b4612"
1795
2085
  ],
1796
2086
  "failures": [],
1797
2087
  "pending": [],
1798
2088
  "skipped": [],
1799
- "duration": 2,
2089
+ "duration": 1,
1800
2090
  "root": false,
1801
2091
  "rootEmpty": false,
1802
2092
  "_timeout": 2000
1803
2093
  },
1804
2094
  {
1805
- "uuid": "003cf574-5333-434d-bbb0-6e490d2e2e20",
2095
+ "uuid": "55bb439d-a83e-46f7-b83f-dfa08285b1cf",
1806
2096
  "title": "getTotalTime()",
1807
2097
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1808
2098
  "file": "/test/device.ts",
@@ -1813,35 +2103,35 @@
1813
2103
  "title": "should work",
1814
2104
  "fullTitle": "NodePyATVDevice getTotalTime() should work",
1815
2105
  "timedOut": false,
1816
- "duration": 1,
2106
+ "duration": 2,
1817
2107
  "state": "passed",
1818
2108
  "speed": "fast",
1819
2109
  "pass": true,
1820
2110
  "fail": false,
1821
2111
  "pending": false,
1822
2112
  "context": null,
1823
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n total_time: 45\n });\n })\n });\n const result = yield device.getTotalTime();\n assert_1.default.strictEqual(result, 45);\n});",
2113
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n total_time: 45\n });\n })\n });\n const result = yield device.getTotalTime();\n assert.strictEqual(result, 45);\n});",
1824
2114
  "err": {},
1825
- "uuid": "c95ecd9f-f946-41de-a1c8-18d55416a575",
1826
- "parentUUID": "003cf574-5333-434d-bbb0-6e490d2e2e20",
2115
+ "uuid": "88a0c08f-b963-4c35-b386-0930f43f3736",
2116
+ "parentUUID": "55bb439d-a83e-46f7-b83f-dfa08285b1cf",
1827
2117
  "isHook": false,
1828
2118
  "skipped": false
1829
2119
  }
1830
2120
  ],
1831
2121
  "suites": [],
1832
2122
  "passes": [
1833
- "c95ecd9f-f946-41de-a1c8-18d55416a575"
2123
+ "88a0c08f-b963-4c35-b386-0930f43f3736"
1834
2124
  ],
1835
2125
  "failures": [],
1836
2126
  "pending": [],
1837
2127
  "skipped": [],
1838
- "duration": 1,
2128
+ "duration": 2,
1839
2129
  "root": false,
1840
2130
  "rootEmpty": false,
1841
2131
  "_timeout": 2000
1842
2132
  },
1843
2133
  {
1844
- "uuid": "98653a88-851a-4445-b985-cf96bca61d9d",
2134
+ "uuid": "797dbd70-b71f-4b02-a2f8-59cdc9576b63",
1845
2135
  "title": "getPosition()",
1846
2136
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1847
2137
  "file": "/test/device.ts",
@@ -1852,35 +2142,35 @@
1852
2142
  "title": "should work",
1853
2143
  "fullTitle": "NodePyATVDevice getPosition() should work",
1854
2144
  "timedOut": false,
1855
- "duration": 2,
2145
+ "duration": 1,
1856
2146
  "state": "passed",
1857
2147
  "speed": "fast",
1858
2148
  "pass": true,
1859
2149
  "fail": false,
1860
2150
  "pending": false,
1861
2151
  "context": null,
1862
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n position: 30\n });\n })\n });\n const result = yield device.getPosition();\n assert_1.default.strictEqual(result, 30);\n});",
2152
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n position: 30\n });\n })\n });\n const result = yield device.getPosition();\n assert.strictEqual(result, 30);\n});",
1863
2153
  "err": {},
1864
- "uuid": "6591dd71-f2cc-48f6-a66b-5687ab8dd857",
1865
- "parentUUID": "98653a88-851a-4445-b985-cf96bca61d9d",
2154
+ "uuid": "02ead937-a167-4d22-8cbc-d4124f77c1ec",
2155
+ "parentUUID": "797dbd70-b71f-4b02-a2f8-59cdc9576b63",
1866
2156
  "isHook": false,
1867
2157
  "skipped": false
1868
2158
  }
1869
2159
  ],
1870
2160
  "suites": [],
1871
2161
  "passes": [
1872
- "6591dd71-f2cc-48f6-a66b-5687ab8dd857"
2162
+ "02ead937-a167-4d22-8cbc-d4124f77c1ec"
1873
2163
  ],
1874
2164
  "failures": [],
1875
2165
  "pending": [],
1876
2166
  "skipped": [],
1877
- "duration": 2,
2167
+ "duration": 1,
1878
2168
  "root": false,
1879
2169
  "rootEmpty": false,
1880
2170
  "_timeout": 2000
1881
2171
  },
1882
2172
  {
1883
- "uuid": "f920c65a-0739-41c1-bdfc-1536dabd80e4",
2173
+ "uuid": "d7fe44ab-65f3-4eee-a1c8-190be10ccac1",
1884
2174
  "title": "getShuffle()",
1885
2175
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1886
2176
  "file": "/test/device.ts",
@@ -1891,35 +2181,35 @@
1891
2181
  "title": "should work",
1892
2182
  "fullTitle": "NodePyATVDevice getShuffle() should work",
1893
2183
  "timedOut": false,
1894
- "duration": 2,
2184
+ "duration": 1,
1895
2185
  "state": "passed",
1896
2186
  "speed": "fast",
1897
2187
  "pass": true,
1898
2188
  "fail": false,
1899
2189
  "pending": false,
1900
2190
  "context": null,
1901
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n shuffle: 'songs'\n });\n })\n });\n const result = yield device.getShuffle();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVShuffleState.songs);\n assert_1.default.deepStrictEqual(result, 'songs');\n});",
2191
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n shuffle: 'songs'\n });\n })\n });\n const result = yield device.getShuffle();\n assert.deepStrictEqual(result, NodePyATVShuffleState.songs);\n assert.deepStrictEqual(result, 'songs');\n});",
1902
2192
  "err": {},
1903
- "uuid": "2756bf14-72f1-42da-8015-8ce95271d49c",
1904
- "parentUUID": "f920c65a-0739-41c1-bdfc-1536dabd80e4",
2193
+ "uuid": "45294e1c-edb1-41c3-bac5-78eacb6c6e93",
2194
+ "parentUUID": "d7fe44ab-65f3-4eee-a1c8-190be10ccac1",
1905
2195
  "isHook": false,
1906
2196
  "skipped": false
1907
2197
  }
1908
2198
  ],
1909
2199
  "suites": [],
1910
2200
  "passes": [
1911
- "2756bf14-72f1-42da-8015-8ce95271d49c"
2201
+ "45294e1c-edb1-41c3-bac5-78eacb6c6e93"
1912
2202
  ],
1913
2203
  "failures": [],
1914
2204
  "pending": [],
1915
2205
  "skipped": [],
1916
- "duration": 2,
2206
+ "duration": 1,
1917
2207
  "root": false,
1918
2208
  "rootEmpty": false,
1919
2209
  "_timeout": 2000
1920
2210
  },
1921
2211
  {
1922
- "uuid": "e41ef748-9727-444d-b006-dfb3818da54e",
2212
+ "uuid": "1bf3806a-b675-4c21-b2ec-f968e746ce80",
1923
2213
  "title": "getRepeat()",
1924
2214
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1925
2215
  "file": "/test/device.ts",
@@ -1930,35 +2220,35 @@
1930
2220
  "title": "should work",
1931
2221
  "fullTitle": "NodePyATVDevice getRepeat() should work",
1932
2222
  "timedOut": false,
1933
- "duration": 1,
2223
+ "duration": 2,
1934
2224
  "state": "passed",
1935
2225
  "speed": "fast",
1936
2226
  "pass": true,
1937
2227
  "fail": false,
1938
2228
  "pending": false,
1939
2229
  "context": null,
1940
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n repeat: 'all'\n });\n })\n });\n const result = yield device.getRepeat();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVRepeatState.all);\n assert_1.default.deepStrictEqual(result, 'all');\n});",
2230
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n repeat: 'all'\n });\n })\n });\n const result = yield device.getRepeat();\n assert.deepStrictEqual(result, NodePyATVRepeatState.all);\n assert.deepStrictEqual(result, 'all');\n});",
1941
2231
  "err": {},
1942
- "uuid": "5920d425-3883-47c5-8871-320b302a36ca",
1943
- "parentUUID": "e41ef748-9727-444d-b006-dfb3818da54e",
2232
+ "uuid": "173b3b66-a4f8-458f-9269-5bfffb99ab03",
2233
+ "parentUUID": "1bf3806a-b675-4c21-b2ec-f968e746ce80",
1944
2234
  "isHook": false,
1945
2235
  "skipped": false
1946
2236
  }
1947
2237
  ],
1948
2238
  "suites": [],
1949
2239
  "passes": [
1950
- "5920d425-3883-47c5-8871-320b302a36ca"
2240
+ "173b3b66-a4f8-458f-9269-5bfffb99ab03"
1951
2241
  ],
1952
2242
  "failures": [],
1953
2243
  "pending": [],
1954
2244
  "skipped": [],
1955
- "duration": 1,
2245
+ "duration": 2,
1956
2246
  "root": false,
1957
2247
  "rootEmpty": false,
1958
2248
  "_timeout": 2000
1959
2249
  },
1960
2250
  {
1961
- "uuid": "14ccd360-5690-4418-8bbb-20e6c658034b",
2251
+ "uuid": "4a991d74-e1bd-4856-91fb-218b9cc7d9a8",
1962
2252
  "title": "getApp()",
1963
2253
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1964
2254
  "file": "/test/device.ts",
@@ -1976,17 +2266,17 @@
1976
2266
  "fail": false,
1977
2267
  "pending": false,
1978
2268
  "context": null,
1979
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n app: 'My App'\n });\n })\n });\n const result = yield device.getApp();\n assert_1.default.strictEqual(result, 'My App');\n});",
2269
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n app: 'My App'\n });\n })\n });\n const result = yield device.getApp();\n assert.strictEqual(result, 'My App');\n});",
1980
2270
  "err": {},
1981
- "uuid": "6be04110-e765-46f5-9b05-1f00e3a01e7a",
1982
- "parentUUID": "14ccd360-5690-4418-8bbb-20e6c658034b",
2271
+ "uuid": "30ce73f4-026c-4f11-9b7f-b800e7a81f32",
2272
+ "parentUUID": "4a991d74-e1bd-4856-91fb-218b9cc7d9a8",
1983
2273
  "isHook": false,
1984
2274
  "skipped": false
1985
2275
  }
1986
2276
  ],
1987
2277
  "suites": [],
1988
2278
  "passes": [
1989
- "6be04110-e765-46f5-9b05-1f00e3a01e7a"
2279
+ "30ce73f4-026c-4f11-9b7f-b800e7a81f32"
1990
2280
  ],
1991
2281
  "failures": [],
1992
2282
  "pending": [],
@@ -1997,7 +2287,7 @@
1997
2287
  "_timeout": 2000
1998
2288
  },
1999
2289
  {
2000
- "uuid": "d9fa8865-1e9f-418a-8756-41f8f8cb46ba",
2290
+ "uuid": "888d36d7-0cad-40c6-af6e-c990b048e6fe",
2001
2291
  "title": "getAppId()",
2002
2292
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2003
2293
  "file": "/test/device.ts",
@@ -2015,17 +2305,17 @@
2015
2305
  "fail": false,
2016
2306
  "pending": false,
2017
2307
  "context": null,
2018
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n app_id: 'app.example.com'\n });\n })\n });\n const result = yield device.getAppId();\n assert_1.default.strictEqual(result, 'app.example.com');\n});",
2308
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n app_id: 'app.example.com'\n });\n })\n });\n const result = yield device.getAppId();\n assert.strictEqual(result, 'app.example.com');\n});",
2019
2309
  "err": {},
2020
- "uuid": "dfba2972-a9b4-4012-84b1-e156883a8cd5",
2021
- "parentUUID": "d9fa8865-1e9f-418a-8756-41f8f8cb46ba",
2310
+ "uuid": "844981dd-03c4-455d-a354-568865dcce27",
2311
+ "parentUUID": "888d36d7-0cad-40c6-af6e-c990b048e6fe",
2022
2312
  "isHook": false,
2023
2313
  "skipped": false
2024
2314
  }
2025
2315
  ],
2026
2316
  "suites": [],
2027
2317
  "passes": [
2028
- "dfba2972-a9b4-4012-84b1-e156883a8cd5"
2318
+ "844981dd-03c4-455d-a354-568865dcce27"
2029
2319
  ],
2030
2320
  "failures": [],
2031
2321
  "pending": [],
@@ -2036,7 +2326,7 @@
2036
2326
  "_timeout": 2000
2037
2327
  },
2038
2328
  {
2039
- "uuid": "ca473234-7fa0-4852-8b6e-684dbd4f9925",
2329
+ "uuid": "38691fd8-89e9-435e-989b-f2f9e5323e43",
2040
2330
  "title": "pressKey()",
2041
2331
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2042
2332
  "file": "/test/device.ts",
@@ -2047,17 +2337,17 @@
2047
2337
  "title": "should work with valid key",
2048
2338
  "fullTitle": "NodePyATVDevice pressKey() should work with valid key",
2049
2339
  "timedOut": false,
2050
- "duration": 2,
2340
+ "duration": 1,
2051
2341
  "state": "passed",
2052
2342
  "speed": "fast",
2053
2343
  "pass": true,
2054
2344
  "fail": false,
2055
2345
  "pending": false,
2056
2346
  "context": null,
2057
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n yield device.pressKey(types_1.NodePyATVKeys.home);\n});",
2347
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n yield device.pressKey(NodePyATVKeys.home);\n});",
2058
2348
  "err": {},
2059
- "uuid": "b35eee36-87b0-4354-8a66-f2d27c9f546d",
2060
- "parentUUID": "ca473234-7fa0-4852-8b6e-684dbd4f9925",
2349
+ "uuid": "c89b35d1-6956-49e5-8738-8935b1e62d65",
2350
+ "parentUUID": "38691fd8-89e9-435e-989b-f2f9e5323e43",
2061
2351
  "isHook": false,
2062
2352
  "skipped": false
2063
2353
  },
@@ -2072,10 +2362,10 @@
2072
2362
  "fail": false,
2073
2363
  "pending": false,
2074
2364
  "context": null,
2075
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n // @ts-ignore\n yield device.pressKey('foo');\n }), /Unsupported key value foo/);\n});",
2365
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n });\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n // @ts-ignore\n yield device.pressKey('foo');\n }), /Unsupported key value foo/);\n});",
2076
2366
  "err": {},
2077
- "uuid": "9f573e63-ac25-44a1-8d31-824123b4da42",
2078
- "parentUUID": "ca473234-7fa0-4852-8b6e-684dbd4f9925",
2367
+ "uuid": "8abf51a4-de71-44fb-baf2-1fd3f80a41c1",
2368
+ "parentUUID": "38691fd8-89e9-435e-989b-f2f9e5323e43",
2079
2369
  "isHook": false,
2080
2370
  "skipped": false
2081
2371
  },
@@ -2083,37 +2373,37 @@
2083
2373
  "title": "should throw error if pyatv result is not success",
2084
2374
  "fullTitle": "NodePyATVDevice pressKey() should throw error if pyatv result is not success",
2085
2375
  "timedOut": false,
2086
- "duration": 2,
2376
+ "duration": 1,
2087
2377
  "state": "passed",
2088
2378
  "speed": "fast",
2089
2379
  "pass": true,
2090
2380
  "fail": false,
2091
2381
  "pending": false,
2092
2382
  "context": null,
2093
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"failure\"}');\n })\n });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield device.pressKey(types_1.NodePyATVKeys.home);\n }), /Unable to parse pyatv response/);\n});",
2383
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"failure\"}');\n })\n });\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield device.pressKey(NodePyATVKeys.home);\n }), /Unable to parse pyatv response/);\n});",
2094
2384
  "err": {},
2095
- "uuid": "d8a928c7-4bc8-4d0a-bdfe-6b259d4e3403",
2096
- "parentUUID": "ca473234-7fa0-4852-8b6e-684dbd4f9925",
2385
+ "uuid": "dd3b4330-ea13-4850-ae7c-3bb97590a026",
2386
+ "parentUUID": "38691fd8-89e9-435e-989b-f2f9e5323e43",
2097
2387
  "isHook": false,
2098
2388
  "skipped": false
2099
2389
  }
2100
2390
  ],
2101
2391
  "suites": [],
2102
2392
  "passes": [
2103
- "b35eee36-87b0-4354-8a66-f2d27c9f546d",
2104
- "9f573e63-ac25-44a1-8d31-824123b4da42",
2105
- "d8a928c7-4bc8-4d0a-bdfe-6b259d4e3403"
2393
+ "c89b35d1-6956-49e5-8738-8935b1e62d65",
2394
+ "8abf51a4-de71-44fb-baf2-1fd3f80a41c1",
2395
+ "dd3b4330-ea13-4850-ae7c-3bb97590a026"
2106
2396
  ],
2107
2397
  "failures": [],
2108
2398
  "pending": [],
2109
2399
  "skipped": [],
2110
- "duration": 5,
2400
+ "duration": 3,
2111
2401
  "root": false,
2112
2402
  "rootEmpty": false,
2113
2403
  "_timeout": 2000
2114
2404
  },
2115
2405
  {
2116
- "uuid": "8b7e9e36-d576-4104-b162-48a69036f7ea",
2406
+ "uuid": "f59579a4-c8dd-4f76-a202-12f3c7825f28",
2117
2407
  "title": "down()",
2118
2408
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2119
2409
  "file": "/test/device.ts",
@@ -2131,17 +2421,17 @@
2131
2421
  "fail": false,
2132
2422
  "pending": false,
2133
2423
  "context": null,
2134
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2424
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2135
2425
  "err": {},
2136
- "uuid": "9b384eb7-b9ba-4019-8f25-40775fc36a4e",
2137
- "parentUUID": "8b7e9e36-d576-4104-b162-48a69036f7ea",
2426
+ "uuid": "2a9cac1c-9f48-48a9-83f2-01715a8dbeca",
2427
+ "parentUUID": "f59579a4-c8dd-4f76-a202-12f3c7825f28",
2138
2428
  "isHook": false,
2139
2429
  "skipped": false
2140
2430
  }
2141
2431
  ],
2142
2432
  "suites": [],
2143
2433
  "passes": [
2144
- "9b384eb7-b9ba-4019-8f25-40775fc36a4e"
2434
+ "2a9cac1c-9f48-48a9-83f2-01715a8dbeca"
2145
2435
  ],
2146
2436
  "failures": [],
2147
2437
  "pending": [],
@@ -2152,7 +2442,7 @@
2152
2442
  "_timeout": 2000
2153
2443
  },
2154
2444
  {
2155
- "uuid": "4af1a313-ac09-454c-ad5c-e0268373460f",
2445
+ "uuid": "6dabfaba-bc02-4657-a538-3bacb92be14f",
2156
2446
  "title": "home()",
2157
2447
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2158
2448
  "file": "/test/device.ts",
@@ -2170,17 +2460,17 @@
2170
2460
  "fail": false,
2171
2461
  "pending": false,
2172
2462
  "context": null,
2173
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2463
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2174
2464
  "err": {},
2175
- "uuid": "ba9e87ee-8b13-4c3a-b84d-844ec542477b",
2176
- "parentUUID": "4af1a313-ac09-454c-ad5c-e0268373460f",
2465
+ "uuid": "03ed9a8c-7a45-415b-9b5e-0846b98d0b92",
2466
+ "parentUUID": "6dabfaba-bc02-4657-a538-3bacb92be14f",
2177
2467
  "isHook": false,
2178
2468
  "skipped": false
2179
2469
  }
2180
2470
  ],
2181
2471
  "suites": [],
2182
2472
  "passes": [
2183
- "ba9e87ee-8b13-4c3a-b84d-844ec542477b"
2473
+ "03ed9a8c-7a45-415b-9b5e-0846b98d0b92"
2184
2474
  ],
2185
2475
  "failures": [],
2186
2476
  "pending": [],
@@ -2191,7 +2481,7 @@
2191
2481
  "_timeout": 2000
2192
2482
  },
2193
2483
  {
2194
- "uuid": "20dd1107-6cd8-403e-b826-a9efca434b5c",
2484
+ "uuid": "82a696da-7637-40c5-8836-73a05847be47",
2195
2485
  "title": "homeHold()",
2196
2486
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2197
2487
  "file": "/test/device.ts",
@@ -2202,35 +2492,35 @@
2202
2492
  "title": "should work",
2203
2493
  "fullTitle": "NodePyATVDevice homeHold() should work",
2204
2494
  "timedOut": false,
2205
- "duration": 1,
2495
+ "duration": 2,
2206
2496
  "state": "passed",
2207
2497
  "speed": "fast",
2208
2498
  "pass": true,
2209
2499
  "fail": false,
2210
2500
  "pending": false,
2211
2501
  "context": null,
2212
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2502
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2213
2503
  "err": {},
2214
- "uuid": "8bee10c7-a47d-43d2-80c8-49f6d42f17b3",
2215
- "parentUUID": "20dd1107-6cd8-403e-b826-a9efca434b5c",
2504
+ "uuid": "638b9729-a9dc-4b2e-9796-aaf73fed6a07",
2505
+ "parentUUID": "82a696da-7637-40c5-8836-73a05847be47",
2216
2506
  "isHook": false,
2217
2507
  "skipped": false
2218
2508
  }
2219
2509
  ],
2220
2510
  "suites": [],
2221
2511
  "passes": [
2222
- "8bee10c7-a47d-43d2-80c8-49f6d42f17b3"
2512
+ "638b9729-a9dc-4b2e-9796-aaf73fed6a07"
2223
2513
  ],
2224
2514
  "failures": [],
2225
2515
  "pending": [],
2226
2516
  "skipped": [],
2227
- "duration": 1,
2517
+ "duration": 2,
2228
2518
  "root": false,
2229
2519
  "rootEmpty": false,
2230
2520
  "_timeout": 2000
2231
2521
  },
2232
2522
  {
2233
- "uuid": "55c6c115-4229-47e7-a850-ec013a063f7f",
2523
+ "uuid": "1bceef48-1523-4144-b62e-f4c8627f282c",
2234
2524
  "title": "left()",
2235
2525
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2236
2526
  "file": "/test/device.ts",
@@ -2248,17 +2538,17 @@
2248
2538
  "fail": false,
2249
2539
  "pending": false,
2250
2540
  "context": null,
2251
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2541
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2252
2542
  "err": {},
2253
- "uuid": "31bb7214-e4d5-4151-8302-b511526dc8f5",
2254
- "parentUUID": "55c6c115-4229-47e7-a850-ec013a063f7f",
2543
+ "uuid": "b3feeedf-4fcb-41db-a96f-a138a8c25266",
2544
+ "parentUUID": "1bceef48-1523-4144-b62e-f4c8627f282c",
2255
2545
  "isHook": false,
2256
2546
  "skipped": false
2257
2547
  }
2258
2548
  ],
2259
2549
  "suites": [],
2260
2550
  "passes": [
2261
- "31bb7214-e4d5-4151-8302-b511526dc8f5"
2551
+ "b3feeedf-4fcb-41db-a96f-a138a8c25266"
2262
2552
  ],
2263
2553
  "failures": [],
2264
2554
  "pending": [],
@@ -2269,7 +2559,7 @@
2269
2559
  "_timeout": 2000
2270
2560
  },
2271
2561
  {
2272
- "uuid": "f0e52a66-f4ce-447d-85da-7aced001b85b",
2562
+ "uuid": "8092b308-560c-4594-80bc-9dc0d8c0c44b",
2273
2563
  "title": "menu()",
2274
2564
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2275
2565
  "file": "/test/device.ts",
@@ -2287,17 +2577,17 @@
2287
2577
  "fail": false,
2288
2578
  "pending": false,
2289
2579
  "context": null,
2290
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2580
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2291
2581
  "err": {},
2292
- "uuid": "0b596225-a00b-4f41-863f-73c55c336576",
2293
- "parentUUID": "f0e52a66-f4ce-447d-85da-7aced001b85b",
2582
+ "uuid": "c852d238-7a39-4931-95ca-0a7aebb27a5a",
2583
+ "parentUUID": "8092b308-560c-4594-80bc-9dc0d8c0c44b",
2294
2584
  "isHook": false,
2295
2585
  "skipped": false
2296
2586
  }
2297
2587
  ],
2298
2588
  "suites": [],
2299
2589
  "passes": [
2300
- "0b596225-a00b-4f41-863f-73c55c336576"
2590
+ "c852d238-7a39-4931-95ca-0a7aebb27a5a"
2301
2591
  ],
2302
2592
  "failures": [],
2303
2593
  "pending": [],
@@ -2308,7 +2598,7 @@
2308
2598
  "_timeout": 2000
2309
2599
  },
2310
2600
  {
2311
- "uuid": "5b3d4aab-7c24-4340-a409-80d653977d05",
2601
+ "uuid": "7eecf809-d01f-462e-90f9-f88b9d813465",
2312
2602
  "title": "next()",
2313
2603
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2314
2604
  "file": "/test/device.ts",
@@ -2319,35 +2609,35 @@
2319
2609
  "title": "should work",
2320
2610
  "fullTitle": "NodePyATVDevice next() should work",
2321
2611
  "timedOut": false,
2322
- "duration": 1,
2612
+ "duration": 2,
2323
2613
  "state": "passed",
2324
2614
  "speed": "fast",
2325
2615
  "pass": true,
2326
2616
  "fail": false,
2327
2617
  "pending": false,
2328
2618
  "context": null,
2329
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2619
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2330
2620
  "err": {},
2331
- "uuid": "18237bc4-8add-4cb8-8663-4879aed362f3",
2332
- "parentUUID": "5b3d4aab-7c24-4340-a409-80d653977d05",
2621
+ "uuid": "0cc4d4d2-91d6-46ea-8a45-d1802d0c02f4",
2622
+ "parentUUID": "7eecf809-d01f-462e-90f9-f88b9d813465",
2333
2623
  "isHook": false,
2334
2624
  "skipped": false
2335
2625
  }
2336
2626
  ],
2337
2627
  "suites": [],
2338
2628
  "passes": [
2339
- "18237bc4-8add-4cb8-8663-4879aed362f3"
2629
+ "0cc4d4d2-91d6-46ea-8a45-d1802d0c02f4"
2340
2630
  ],
2341
2631
  "failures": [],
2342
2632
  "pending": [],
2343
2633
  "skipped": [],
2344
- "duration": 1,
2634
+ "duration": 2,
2345
2635
  "root": false,
2346
2636
  "rootEmpty": false,
2347
2637
  "_timeout": 2000
2348
2638
  },
2349
2639
  {
2350
- "uuid": "497f9053-e40d-444c-a530-e073ae683da2",
2640
+ "uuid": "73b6e26a-b1a5-4711-9c37-4066b7e69a8a",
2351
2641
  "title": "pause()",
2352
2642
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2353
2643
  "file": "/test/device.ts",
@@ -2365,17 +2655,17 @@
2365
2655
  "fail": false,
2366
2656
  "pending": false,
2367
2657
  "context": null,
2368
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2658
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2369
2659
  "err": {},
2370
- "uuid": "9c37b71c-71d8-4cda-a6aa-b4c96017812b",
2371
- "parentUUID": "497f9053-e40d-444c-a530-e073ae683da2",
2660
+ "uuid": "2882ffec-dd62-4ba1-9459-7d654b2ab498",
2661
+ "parentUUID": "73b6e26a-b1a5-4711-9c37-4066b7e69a8a",
2372
2662
  "isHook": false,
2373
2663
  "skipped": false
2374
2664
  }
2375
2665
  ],
2376
2666
  "suites": [],
2377
2667
  "passes": [
2378
- "9c37b71c-71d8-4cda-a6aa-b4c96017812b"
2668
+ "2882ffec-dd62-4ba1-9459-7d654b2ab498"
2379
2669
  ],
2380
2670
  "failures": [],
2381
2671
  "pending": [],
@@ -2386,7 +2676,7 @@
2386
2676
  "_timeout": 2000
2387
2677
  },
2388
2678
  {
2389
- "uuid": "1f9baeeb-e878-44e0-a71e-6d03ea2cb277",
2679
+ "uuid": "6ef960c5-5684-40ca-9fb9-a35a57fe961a",
2390
2680
  "title": "play()",
2391
2681
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2392
2682
  "file": "/test/device.ts",
@@ -2397,35 +2687,35 @@
2397
2687
  "title": "should work",
2398
2688
  "fullTitle": "NodePyATVDevice play() should work",
2399
2689
  "timedOut": false,
2400
- "duration": 1,
2690
+ "duration": 2,
2401
2691
  "state": "passed",
2402
2692
  "speed": "fast",
2403
2693
  "pass": true,
2404
2694
  "fail": false,
2405
2695
  "pending": false,
2406
2696
  "context": null,
2407
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2697
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2408
2698
  "err": {},
2409
- "uuid": "0e353ece-cea4-42b4-9e73-6feb0c793b23",
2410
- "parentUUID": "1f9baeeb-e878-44e0-a71e-6d03ea2cb277",
2699
+ "uuid": "bfe8383f-dc8f-4d40-a51e-26be92626750",
2700
+ "parentUUID": "6ef960c5-5684-40ca-9fb9-a35a57fe961a",
2411
2701
  "isHook": false,
2412
2702
  "skipped": false
2413
2703
  }
2414
2704
  ],
2415
2705
  "suites": [],
2416
2706
  "passes": [
2417
- "0e353ece-cea4-42b4-9e73-6feb0c793b23"
2707
+ "bfe8383f-dc8f-4d40-a51e-26be92626750"
2418
2708
  ],
2419
2709
  "failures": [],
2420
2710
  "pending": [],
2421
2711
  "skipped": [],
2422
- "duration": 1,
2712
+ "duration": 2,
2423
2713
  "root": false,
2424
2714
  "rootEmpty": false,
2425
2715
  "_timeout": 2000
2426
2716
  },
2427
2717
  {
2428
- "uuid": "4aabbcd2-cd52-4a74-8262-08a0237d37cf",
2718
+ "uuid": "4a6d77b5-236e-4491-b9c9-4c99dfd06450",
2429
2719
  "title": "playPause()",
2430
2720
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2431
2721
  "file": "/test/device.ts",
@@ -2443,17 +2733,17 @@
2443
2733
  "fail": false,
2444
2734
  "pending": false,
2445
2735
  "context": null,
2446
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2736
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2447
2737
  "err": {},
2448
- "uuid": "ac84b457-d4e6-44e4-b0a8-2936d665ab4b",
2449
- "parentUUID": "4aabbcd2-cd52-4a74-8262-08a0237d37cf",
2738
+ "uuid": "6d1de8f7-490b-4410-b48b-ff7e657f522a",
2739
+ "parentUUID": "4a6d77b5-236e-4491-b9c9-4c99dfd06450",
2450
2740
  "isHook": false,
2451
2741
  "skipped": false
2452
2742
  }
2453
2743
  ],
2454
2744
  "suites": [],
2455
2745
  "passes": [
2456
- "ac84b457-d4e6-44e4-b0a8-2936d665ab4b"
2746
+ "6d1de8f7-490b-4410-b48b-ff7e657f522a"
2457
2747
  ],
2458
2748
  "failures": [],
2459
2749
  "pending": [],
@@ -2464,7 +2754,7 @@
2464
2754
  "_timeout": 2000
2465
2755
  },
2466
2756
  {
2467
- "uuid": "c706cd82-e48a-4f44-8595-8c6612a04353",
2757
+ "uuid": "7ec2603b-8ab6-48ee-9d49-9091d0510f9b",
2468
2758
  "title": "previous()",
2469
2759
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2470
2760
  "file": "/test/device.ts",
@@ -2482,17 +2772,17 @@
2482
2772
  "fail": false,
2483
2773
  "pending": false,
2484
2774
  "context": null,
2485
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2775
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2486
2776
  "err": {},
2487
- "uuid": "0d05200d-1d14-40a6-a915-9a2602233950",
2488
- "parentUUID": "c706cd82-e48a-4f44-8595-8c6612a04353",
2777
+ "uuid": "3d545031-085f-4757-9f42-e126e52fc352",
2778
+ "parentUUID": "7ec2603b-8ab6-48ee-9d49-9091d0510f9b",
2489
2779
  "isHook": false,
2490
2780
  "skipped": false
2491
2781
  }
2492
2782
  ],
2493
2783
  "suites": [],
2494
2784
  "passes": [
2495
- "0d05200d-1d14-40a6-a915-9a2602233950"
2785
+ "3d545031-085f-4757-9f42-e126e52fc352"
2496
2786
  ],
2497
2787
  "failures": [],
2498
2788
  "pending": [],
@@ -2503,7 +2793,7 @@
2503
2793
  "_timeout": 2000
2504
2794
  },
2505
2795
  {
2506
- "uuid": "9c4e1e1c-fc50-4d69-a07e-83bd27151ab8",
2796
+ "uuid": "a7ef6a35-a52a-44bd-afc6-f162c3dd4f61",
2507
2797
  "title": "right()",
2508
2798
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2509
2799
  "file": "/test/device.ts",
@@ -2521,17 +2811,17 @@
2521
2811
  "fail": false,
2522
2812
  "pending": false,
2523
2813
  "context": null,
2524
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2814
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2525
2815
  "err": {},
2526
- "uuid": "863f3cd2-9056-49d4-9c21-69e9cd23824d",
2527
- "parentUUID": "9c4e1e1c-fc50-4d69-a07e-83bd27151ab8",
2816
+ "uuid": "fcf2955c-0c16-4d59-a29e-04dae12bfe40",
2817
+ "parentUUID": "a7ef6a35-a52a-44bd-afc6-f162c3dd4f61",
2528
2818
  "isHook": false,
2529
2819
  "skipped": false
2530
2820
  }
2531
2821
  ],
2532
2822
  "suites": [],
2533
2823
  "passes": [
2534
- "863f3cd2-9056-49d4-9c21-69e9cd23824d"
2824
+ "fcf2955c-0c16-4d59-a29e-04dae12bfe40"
2535
2825
  ],
2536
2826
  "failures": [],
2537
2827
  "pending": [],
@@ -2542,7 +2832,7 @@
2542
2832
  "_timeout": 2000
2543
2833
  },
2544
2834
  {
2545
- "uuid": "aeaf8d4a-1450-4e03-a2a8-6784f4758ec0",
2835
+ "uuid": "516589be-3b09-4e22-9416-3ae364ad8bac",
2546
2836
  "title": "select()",
2547
2837
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2548
2838
  "file": "/test/device.ts",
@@ -2560,17 +2850,17 @@
2560
2850
  "fail": false,
2561
2851
  "pending": false,
2562
2852
  "context": null,
2563
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2853
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2564
2854
  "err": {},
2565
- "uuid": "c062a364-3ff7-4b7b-96c1-ed1464480ba0",
2566
- "parentUUID": "aeaf8d4a-1450-4e03-a2a8-6784f4758ec0",
2855
+ "uuid": "27647ae9-c15b-4fc2-82de-2b1ca8727b47",
2856
+ "parentUUID": "516589be-3b09-4e22-9416-3ae364ad8bac",
2567
2857
  "isHook": false,
2568
2858
  "skipped": false
2569
2859
  }
2570
2860
  ],
2571
2861
  "suites": [],
2572
2862
  "passes": [
2573
- "c062a364-3ff7-4b7b-96c1-ed1464480ba0"
2863
+ "27647ae9-c15b-4fc2-82de-2b1ca8727b47"
2574
2864
  ],
2575
2865
  "failures": [],
2576
2866
  "pending": [],
@@ -2581,7 +2871,7 @@
2581
2871
  "_timeout": 2000
2582
2872
  },
2583
2873
  {
2584
- "uuid": "c4b4649b-e5cd-4809-83e6-0b23416a909c",
2874
+ "uuid": "2abe477c-dec5-43bf-9322-a7f5f771027d",
2585
2875
  "title": "skipBackward()",
2586
2876
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2587
2877
  "file": "/test/device.ts",
@@ -2592,35 +2882,35 @@
2592
2882
  "title": "should work",
2593
2883
  "fullTitle": "NodePyATVDevice skipBackward() should work",
2594
2884
  "timedOut": false,
2595
- "duration": 1,
2885
+ "duration": 2,
2596
2886
  "state": "passed",
2597
2887
  "speed": "fast",
2598
2888
  "pass": true,
2599
2889
  "fail": false,
2600
2890
  "pending": false,
2601
2891
  "context": null,
2602
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2892
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2603
2893
  "err": {},
2604
- "uuid": "23eed14c-b53e-4efc-998d-090cb9f9a507",
2605
- "parentUUID": "c4b4649b-e5cd-4809-83e6-0b23416a909c",
2894
+ "uuid": "24b34988-15ba-451f-8598-f2c63dcc161d",
2895
+ "parentUUID": "2abe477c-dec5-43bf-9322-a7f5f771027d",
2606
2896
  "isHook": false,
2607
2897
  "skipped": false
2608
2898
  }
2609
2899
  ],
2610
2900
  "suites": [],
2611
2901
  "passes": [
2612
- "23eed14c-b53e-4efc-998d-090cb9f9a507"
2902
+ "24b34988-15ba-451f-8598-f2c63dcc161d"
2613
2903
  ],
2614
2904
  "failures": [],
2615
2905
  "pending": [],
2616
2906
  "skipped": [],
2617
- "duration": 1,
2907
+ "duration": 2,
2618
2908
  "root": false,
2619
2909
  "rootEmpty": false,
2620
2910
  "_timeout": 2000
2621
2911
  },
2622
2912
  {
2623
- "uuid": "d486ba88-8884-4eb3-a2d7-5e1bd6bc8948",
2913
+ "uuid": "8b164acf-8b0e-4ef5-a443-6cbeb0957fa0",
2624
2914
  "title": "skipForward()",
2625
2915
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2626
2916
  "file": "/test/device.ts",
@@ -2638,17 +2928,17 @@
2638
2928
  "fail": false,
2639
2929
  "pending": false,
2640
2930
  "context": null,
2641
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2931
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2642
2932
  "err": {},
2643
- "uuid": "26f18c1c-e1fe-483b-8e05-ff5b4f8fe353",
2644
- "parentUUID": "d486ba88-8884-4eb3-a2d7-5e1bd6bc8948",
2933
+ "uuid": "e375c506-5951-4516-b6b6-e59489d0e2e5",
2934
+ "parentUUID": "8b164acf-8b0e-4ef5-a443-6cbeb0957fa0",
2645
2935
  "isHook": false,
2646
2936
  "skipped": false
2647
2937
  }
2648
2938
  ],
2649
2939
  "suites": [],
2650
2940
  "passes": [
2651
- "26f18c1c-e1fe-483b-8e05-ff5b4f8fe353"
2941
+ "e375c506-5951-4516-b6b6-e59489d0e2e5"
2652
2942
  ],
2653
2943
  "failures": [],
2654
2944
  "pending": [],
@@ -2659,7 +2949,7 @@
2659
2949
  "_timeout": 2000
2660
2950
  },
2661
2951
  {
2662
- "uuid": "a3620219-af42-43fc-945f-6af6310ac1c3",
2952
+ "uuid": "0ea97c77-2347-43e4-803d-042cc35bbce2",
2663
2953
  "title": "stop()",
2664
2954
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2665
2955
  "file": "/test/device.ts",
@@ -2670,35 +2960,35 @@
2670
2960
  "title": "should work",
2671
2961
  "fullTitle": "NodePyATVDevice stop() should work",
2672
2962
  "timedOut": false,
2673
- "duration": 1,
2963
+ "duration": 2,
2674
2964
  "state": "passed",
2675
2965
  "speed": "fast",
2676
2966
  "pass": true,
2677
2967
  "fail": false,
2678
2968
  "pending": false,
2679
2969
  "context": null,
2680
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2970
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2681
2971
  "err": {},
2682
- "uuid": "cd07bea3-b89e-4700-9d21-b936f70393f3",
2683
- "parentUUID": "a3620219-af42-43fc-945f-6af6310ac1c3",
2972
+ "uuid": "9d37eb27-a5bd-4cbe-9a8c-524f0b904e10",
2973
+ "parentUUID": "0ea97c77-2347-43e4-803d-042cc35bbce2",
2684
2974
  "isHook": false,
2685
2975
  "skipped": false
2686
2976
  }
2687
2977
  ],
2688
2978
  "suites": [],
2689
2979
  "passes": [
2690
- "cd07bea3-b89e-4700-9d21-b936f70393f3"
2980
+ "9d37eb27-a5bd-4cbe-9a8c-524f0b904e10"
2691
2981
  ],
2692
2982
  "failures": [],
2693
2983
  "pending": [],
2694
2984
  "skipped": [],
2695
- "duration": 1,
2985
+ "duration": 2,
2696
2986
  "root": false,
2697
2987
  "rootEmpty": false,
2698
2988
  "_timeout": 2000
2699
2989
  },
2700
2990
  {
2701
- "uuid": "3612d63b-484a-4385-8f2c-0c890eeddb19",
2991
+ "uuid": "101bcf46-8072-4847-8a75-a4afb7de1e3a",
2702
2992
  "title": "suspend()",
2703
2993
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2704
2994
  "file": "/test/device.ts",
@@ -2716,17 +3006,17 @@
2716
3006
  "fail": false,
2717
3007
  "pending": false,
2718
3008
  "context": null,
2719
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
3009
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2720
3010
  "err": {},
2721
- "uuid": "b583964e-ffc4-47fd-a1cd-8e2f83331fc7",
2722
- "parentUUID": "3612d63b-484a-4385-8f2c-0c890eeddb19",
3011
+ "uuid": "13e47ce5-68ca-437d-bdac-e57bd4670522",
3012
+ "parentUUID": "101bcf46-8072-4847-8a75-a4afb7de1e3a",
2723
3013
  "isHook": false,
2724
3014
  "skipped": false
2725
3015
  }
2726
3016
  ],
2727
3017
  "suites": [],
2728
3018
  "passes": [
2729
- "b583964e-ffc4-47fd-a1cd-8e2f83331fc7"
3019
+ "13e47ce5-68ca-437d-bdac-e57bd4670522"
2730
3020
  ],
2731
3021
  "failures": [],
2732
3022
  "pending": [],
@@ -2737,7 +3027,7 @@
2737
3027
  "_timeout": 2000
2738
3028
  },
2739
3029
  {
2740
- "uuid": "af6cead2-23f9-4786-8973-b34d0b79a55e",
3030
+ "uuid": "a5bee082-aea4-4a4b-928b-afcfd50cb4c2",
2741
3031
  "title": "topMenu()",
2742
3032
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2743
3033
  "file": "/test/device.ts",
@@ -2748,35 +3038,35 @@
2748
3038
  "title": "should work",
2749
3039
  "fullTitle": "NodePyATVDevice topMenu() should work",
2750
3040
  "timedOut": false,
2751
- "duration": 1,
3041
+ "duration": 0,
2752
3042
  "state": "passed",
2753
3043
  "speed": "fast",
2754
3044
  "pass": true,
2755
3045
  "fail": false,
2756
3046
  "pending": false,
2757
3047
  "context": null,
2758
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
3048
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2759
3049
  "err": {},
2760
- "uuid": "521c6dc6-a388-45c7-a9f1-d686eb0ec265",
2761
- "parentUUID": "af6cead2-23f9-4786-8973-b34d0b79a55e",
3050
+ "uuid": "4089e9c6-f98f-4168-8757-da115ddd543f",
3051
+ "parentUUID": "a5bee082-aea4-4a4b-928b-afcfd50cb4c2",
2762
3052
  "isHook": false,
2763
3053
  "skipped": false
2764
3054
  }
2765
3055
  ],
2766
3056
  "suites": [],
2767
3057
  "passes": [
2768
- "521c6dc6-a388-45c7-a9f1-d686eb0ec265"
3058
+ "4089e9c6-f98f-4168-8757-da115ddd543f"
2769
3059
  ],
2770
3060
  "failures": [],
2771
3061
  "pending": [],
2772
3062
  "skipped": [],
2773
- "duration": 1,
3063
+ "duration": 0,
2774
3064
  "root": false,
2775
3065
  "rootEmpty": false,
2776
3066
  "_timeout": 2000
2777
3067
  },
2778
3068
  {
2779
- "uuid": "f597439e-6c9b-4fa1-b53d-5a5518fb78f5",
3069
+ "uuid": "6f36c03d-04ac-44d1-9ba8-6f83797fc6b5",
2780
3070
  "title": "up()",
2781
3071
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2782
3072
  "file": "/test/device.ts",
@@ -2787,35 +3077,35 @@
2787
3077
  "title": "should work",
2788
3078
  "fullTitle": "NodePyATVDevice up() should work",
2789
3079
  "timedOut": false,
2790
- "duration": 2,
3080
+ "duration": 1,
2791
3081
  "state": "passed",
2792
3082
  "speed": "fast",
2793
3083
  "pass": true,
2794
3084
  "fail": false,
2795
3085
  "pending": false,
2796
3086
  "context": null,
2797
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
3087
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2798
3088
  "err": {},
2799
- "uuid": "8749fedb-33e2-4067-82e9-eb6d1d3e58e7",
2800
- "parentUUID": "f597439e-6c9b-4fa1-b53d-5a5518fb78f5",
3089
+ "uuid": "d3799292-2cc5-434e-8dbb-d1f39cdd36ff",
3090
+ "parentUUID": "6f36c03d-04ac-44d1-9ba8-6f83797fc6b5",
2801
3091
  "isHook": false,
2802
3092
  "skipped": false
2803
3093
  }
2804
3094
  ],
2805
3095
  "suites": [],
2806
3096
  "passes": [
2807
- "8749fedb-33e2-4067-82e9-eb6d1d3e58e7"
3097
+ "d3799292-2cc5-434e-8dbb-d1f39cdd36ff"
2808
3098
  ],
2809
3099
  "failures": [],
2810
3100
  "pending": [],
2811
3101
  "skipped": [],
2812
- "duration": 2,
3102
+ "duration": 1,
2813
3103
  "root": false,
2814
3104
  "rootEmpty": false,
2815
3105
  "_timeout": 2000
2816
3106
  },
2817
3107
  {
2818
- "uuid": "2d3a3e12-e026-4e1b-ad33-f290d534e1b3",
3108
+ "uuid": "37f0d83f-1167-473a-a218-60bdea6b879d",
2819
3109
  "title": "volumeDown()",
2820
3110
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2821
3111
  "file": "/test/device.ts",
@@ -2826,35 +3116,35 @@
2826
3116
  "title": "should work",
2827
3117
  "fullTitle": "NodePyATVDevice volumeDown() should work",
2828
3118
  "timedOut": false,
2829
- "duration": 2,
3119
+ "duration": 1,
2830
3120
  "state": "passed",
2831
3121
  "speed": "fast",
2832
3122
  "pass": true,
2833
3123
  "fail": false,
2834
3124
  "pending": false,
2835
3125
  "context": null,
2836
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
3126
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2837
3127
  "err": {},
2838
- "uuid": "edfd3b9c-5eb3-4f57-afe7-3fdbd890b21b",
2839
- "parentUUID": "2d3a3e12-e026-4e1b-ad33-f290d534e1b3",
3128
+ "uuid": "294dd404-e0b6-47c0-8be7-e9fa451b0888",
3129
+ "parentUUID": "37f0d83f-1167-473a-a218-60bdea6b879d",
2840
3130
  "isHook": false,
2841
3131
  "skipped": false
2842
3132
  }
2843
3133
  ],
2844
3134
  "suites": [],
2845
3135
  "passes": [
2846
- "edfd3b9c-5eb3-4f57-afe7-3fdbd890b21b"
3136
+ "294dd404-e0b6-47c0-8be7-e9fa451b0888"
2847
3137
  ],
2848
3138
  "failures": [],
2849
3139
  "pending": [],
2850
3140
  "skipped": [],
2851
- "duration": 2,
3141
+ "duration": 1,
2852
3142
  "root": false,
2853
3143
  "rootEmpty": false,
2854
3144
  "_timeout": 2000
2855
3145
  },
2856
3146
  {
2857
- "uuid": "d7e73174-35da-4922-9bce-32b641b55b36",
3147
+ "uuid": "116c7f31-76b8-430a-97eb-58fbeac1be1c",
2858
3148
  "title": "volumeUp()",
2859
3149
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2860
3150
  "file": "/test/device.ts",
@@ -2865,35 +3155,35 @@
2865
3155
  "title": "should work",
2866
3156
  "fullTitle": "NodePyATVDevice volumeUp() should work",
2867
3157
  "timedOut": false,
2868
- "duration": 1,
3158
+ "duration": 2,
2869
3159
  "state": "passed",
2870
3160
  "speed": "fast",
2871
3161
  "pass": true,
2872
3162
  "fail": false,
2873
3163
  "pending": false,
2874
3164
  "context": null,
2875
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
3165
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2876
3166
  "err": {},
2877
- "uuid": "9bac72b1-1d5a-4235-a2cc-60ce29a53ff6",
2878
- "parentUUID": "d7e73174-35da-4922-9bce-32b641b55b36",
3167
+ "uuid": "9d46ea1f-7be8-4a3d-a0ec-609fd76de921",
3168
+ "parentUUID": "116c7f31-76b8-430a-97eb-58fbeac1be1c",
2879
3169
  "isHook": false,
2880
3170
  "skipped": false
2881
3171
  }
2882
3172
  ],
2883
3173
  "suites": [],
2884
3174
  "passes": [
2885
- "9bac72b1-1d5a-4235-a2cc-60ce29a53ff6"
3175
+ "9d46ea1f-7be8-4a3d-a0ec-609fd76de921"
2886
3176
  ],
2887
3177
  "failures": [],
2888
3178
  "pending": [],
2889
3179
  "skipped": [],
2890
- "duration": 1,
3180
+ "duration": 2,
2891
3181
  "root": false,
2892
3182
  "rootEmpty": false,
2893
3183
  "_timeout": 2000
2894
3184
  },
2895
3185
  {
2896
- "uuid": "c525b09d-fb5c-4801-878d-1285a64a863e",
3186
+ "uuid": "0cb31bfb-740b-4998-bb48-8ef72dc02e96",
2897
3187
  "title": "wakeup()",
2898
3188
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2899
3189
  "file": "/test/device.ts",
@@ -2911,17 +3201,17 @@
2911
3201
  "fail": false,
2912
3202
  "pending": false,
2913
3203
  "context": null,
2914
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
3204
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2915
3205
  "err": {},
2916
- "uuid": "b66b6f93-cc6f-45e2-a097-a9707174f79c",
2917
- "parentUUID": "c525b09d-fb5c-4801-878d-1285a64a863e",
3206
+ "uuid": "4674c412-98c0-4ce5-992d-18424c9639c4",
3207
+ "parentUUID": "0cb31bfb-740b-4998-bb48-8ef72dc02e96",
2918
3208
  "isHook": false,
2919
3209
  "skipped": false
2920
3210
  }
2921
3211
  ],
2922
3212
  "suites": [],
2923
3213
  "passes": [
2924
- "b66b6f93-cc6f-45e2-a097-a9707174f79c"
3214
+ "4674c412-98c0-4ce5-992d-18424c9639c4"
2925
3215
  ],
2926
3216
  "failures": [],
2927
3217
  "pending": [],
@@ -2932,7 +3222,7 @@
2932
3222
  "_timeout": 2000
2933
3223
  },
2934
3224
  {
2935
- "uuid": "36e80514-b209-4075-b605-4a7762a33448",
3225
+ "uuid": "673e68f5-9758-4b90-b235-226395ca8ff3",
2936
3226
  "title": "turnOff()",
2937
3227
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2938
3228
  "file": "/test/device.ts",
@@ -2950,17 +3240,17 @@
2950
3240
  "fail": false,
2951
3241
  "pending": false,
2952
3242
  "context": null,
2953
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
3243
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2954
3244
  "err": {},
2955
- "uuid": "8e9b9d84-a43f-44bd-b1d5-cf91b8a36cc9",
2956
- "parentUUID": "36e80514-b209-4075-b605-4a7762a33448",
3245
+ "uuid": "472f596e-354e-4cbb-aa25-b1c11227ea09",
3246
+ "parentUUID": "673e68f5-9758-4b90-b235-226395ca8ff3",
2957
3247
  "isHook": false,
2958
3248
  "skipped": false
2959
3249
  }
2960
3250
  ],
2961
3251
  "suites": [],
2962
3252
  "passes": [
2963
- "8e9b9d84-a43f-44bd-b1d5-cf91b8a36cc9"
3253
+ "472f596e-354e-4cbb-aa25-b1c11227ea09"
2964
3254
  ],
2965
3255
  "failures": [],
2966
3256
  "pending": [],
@@ -2971,7 +3261,7 @@
2971
3261
  "_timeout": 2000
2972
3262
  },
2973
3263
  {
2974
- "uuid": "0cf36634-5bac-4eeb-84d7-194ca48d7c2d",
3264
+ "uuid": "af0914cb-eacd-4f0d-aa37-75e634770a70",
2975
3265
  "title": "turnOn()",
2976
3266
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2977
3267
  "file": "/test/device.ts",
@@ -2989,17 +3279,17 @@
2989
3279
  "fail": false,
2990
3280
  "pending": false,
2991
3281
  "context": null,
2992
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
3282
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2993
3283
  "err": {},
2994
- "uuid": "16a4d25a-1b4e-4f31-abf5-c83768ae52ad",
2995
- "parentUUID": "0cf36634-5bac-4eeb-84d7-194ca48d7c2d",
3284
+ "uuid": "44ad9906-9336-4aee-af0c-abad13fa5d18",
3285
+ "parentUUID": "af0914cb-eacd-4f0d-aa37-75e634770a70",
2996
3286
  "isHook": false,
2997
3287
  "skipped": false
2998
3288
  }
2999
3289
  ],
3000
3290
  "suites": [],
3001
3291
  "passes": [
3002
- "16a4d25a-1b4e-4f31-abf5-c83768ae52ad"
3292
+ "44ad9906-9336-4aee-af0c-abad13fa5d18"
3003
3293
  ],
3004
3294
  "failures": [],
3005
3295
  "pending": [],
@@ -3020,7 +3310,7 @@
3020
3310
  "_timeout": 2000
3021
3311
  },
3022
3312
  {
3023
- "uuid": "997afe77-cd7b-42e7-98e8-6f87b2fd66f5",
3313
+ "uuid": "9678dcbc-9b9a-44d7-96f5-cb19865d4281",
3024
3314
  "title": "NodePyATVInstance",
3025
3315
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3026
3316
  "file": "/test/instance.ts",
@@ -3029,7 +3319,7 @@
3029
3319
  "tests": [],
3030
3320
  "suites": [
3031
3321
  {
3032
- "uuid": "3171ba08-9bb8-4d00-b64f-dd945b6594f3",
3322
+ "uuid": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3033
3323
  "title": "static version()",
3034
3324
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3035
3325
  "file": "/test/instance.ts",
@@ -3040,17 +3330,17 @@
3040
3330
  "title": "should work with pyatv [L]",
3041
3331
  "fullTitle": "NodePyATVInstance static version() should work with pyatv [L]",
3042
3332
  "timedOut": false,
3043
- "duration": 695,
3333
+ "duration": 521,
3044
3334
  "state": "passed",
3045
3335
  "speed": "slow",
3046
3336
  "pass": true,
3047
3337
  "fail": false,
3048
3338
  "pending": false,
3049
3339
  "context": null,
3050
- "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(4000);\n const result = yield index_1.default.version();\n if (result.pyatv === null) {\n throw new Error('No version found for pyatv. Is it installed in test environment?');\n }\n assert_1.default.equal(typeof result.pyatv, 'string', 'result.pyatv is a string');\n assert_1.default.ok(result.pyatv.length >= 5, 'result.pyatv has content');\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n assert_1.default.strictEqual(result.module, require(__dirname + '/../package.json').version || null);\n});",
3340
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(4000);\n const result = yield NodePyATVInstance.version();\n if (result.pyatv === null) {\n throw new Error('No version found for pyatv. Is it installed in test environment?');\n }\n assert.equal(typeof result.pyatv, 'string', 'result.pyatv is a string');\n assert.ok(result.pyatv.length >= 5, 'result.pyatv has content');\n assert.strictEqual(result.module, version);\n});",
3051
3341
  "err": {},
3052
- "uuid": "a4d2538d-cacd-4c6c-8a45-01d94233b188",
3053
- "parentUUID": "3171ba08-9bb8-4d00-b64f-dd945b6594f3",
3342
+ "uuid": "ab5f0c3a-1ca1-42b1-b840-ba72a5e94690",
3343
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3054
3344
  "isHook": false,
3055
3345
  "skipped": false
3056
3346
  },
@@ -3065,10 +3355,10 @@
3065
3355
  "fail": false,
3066
3356
  "pending": false,
3067
3357
  "context": null,
3068
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.code(1);\n cp.end('atvremote 0.7.4');\n })\n });\n assert_1.default.ok(result.pyatv);\n assert_1.default.strictEqual(result.pyatv, '0.7.4');\n});",
3358
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp => {\n cp.code(1);\n cp.end('atvremote 0.7.4');\n })\n });\n assert.ok(result.pyatv);\n assert.strictEqual(result.pyatv, '0.7.4');\n});",
3069
3359
  "err": {},
3070
- "uuid": "9388232e-7f20-47a9-8e50-0b89a63b081c",
3071
- "parentUUID": "3171ba08-9bb8-4d00-b64f-dd945b6594f3",
3360
+ "uuid": "ba7827b4-9e28-4679-9ea6-d6efa90237f4",
3361
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3072
3362
  "isHook": false,
3073
3363
  "skipped": false
3074
3364
  },
@@ -3083,10 +3373,10 @@
3083
3373
  "fail": false,
3084
3374
  "pending": false,
3085
3375
  "context": null,
3086
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n noColors: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n assert_1.default.strictEqual(result.module, require(__dirname + '/../package.json').version || null);\n});",
3376
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n noColors: true,\n spawn: createFakeSpawn(cp => cp.code(1).end())\n });\n assert.strictEqual(result.module, version);\n});",
3087
3377
  "err": {},
3088
- "uuid": "66098b5d-f242-4b28-bcc1-0abef074630b",
3089
- "parentUUID": "3171ba08-9bb8-4d00-b64f-dd945b6594f3",
3378
+ "uuid": "7a446270-fff6-47dc-b0ab-ce0fabb036cf",
3379
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3090
3380
  "isHook": false,
3091
3381
  "skipped": false
3092
3382
  },
@@ -3101,10 +3391,10 @@
3101
3391
  "fail": false,
3102
3392
  "pending": false,
3103
3393
  "context": null,
3104
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n atvremotePath: '/foo/bar',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), '/foo/bar');\n cp.code(1).end();\n })\n });\n});",
3394
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.version({\n atvremotePath: '/foo/bar',\n spawn: createFakeSpawn(cp => {\n assert.strictEqual(cp.cmd(), '/foo/bar');\n cp.code(1).end();\n })\n });\n});",
3105
3395
  "err": {},
3106
- "uuid": "ae6d9dbc-dab1-46b3-8aaf-5f3de5035350",
3107
- "parentUUID": "3171ba08-9bb8-4d00-b64f-dd945b6594f3",
3396
+ "uuid": "f34bcd84-01f3-4c87-8429-a2847b816044",
3397
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3108
3398
  "isHook": false,
3109
3399
  "skipped": false
3110
3400
  },
@@ -3119,10 +3409,10 @@
3119
3409
  "fail": false,
3120
3410
  "pending": false,
3121
3411
  "context": null,
3122
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n debug: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n});",
3412
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.version({\n debug: true,\n spawn: createFakeSpawn(cp => cp.code(1).end())\n });\n});",
3123
3413
  "err": {},
3124
- "uuid": "ffbaa108-c1a3-49fc-9634-5ec2207a084c",
3125
- "parentUUID": "3171ba08-9bb8-4d00-b64f-dd945b6594f3",
3414
+ "uuid": "b5e92442-fe6b-42e2-91f9-8e8b2e2e5107",
3415
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3126
3416
  "isHook": false,
3127
3417
  "skipped": false
3128
3418
  },
@@ -3137,10 +3427,10 @@
3137
3427
  "fail": false,
3138
3428
  "pending": false,
3139
3429
  "context": null,
3140
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n debug: () => { },\n noColors: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n});",
3430
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.version({\n debug: () => {\n // no debug log\n },\n noColors: true,\n spawn: createFakeSpawn(cp => cp.code(1).end())\n });\n});",
3141
3431
  "err": {},
3142
- "uuid": "7c920244-d9ac-443a-b6e3-38757e67b941",
3143
- "parentUUID": "3171ba08-9bb8-4d00-b64f-dd945b6594f3",
3432
+ "uuid": "e2cdb1a1-2686-4287-823a-b97843eccddd",
3433
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3144
3434
  "isHook": false,
3145
3435
  "skipped": false
3146
3436
  },
@@ -3148,17 +3438,17 @@
3148
3438
  "title": "should return null on pyatv stderr output",
3149
3439
  "fullTitle": "NodePyATVInstance static version() should return null on pyatv stderr output",
3150
3440
  "timedOut": false,
3151
- "duration": 1,
3441
+ "duration": 2,
3152
3442
  "state": "passed",
3153
3443
  "speed": "fast",
3154
3444
  "pass": true,
3155
3445
  "fail": false,
3156
3446
  "pending": false,
3157
3447
  "context": null,
3158
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.stderr('Hello World!').code(123).end())\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});",
3448
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp => cp.stderr('Hello World!').code(123).end())\n });\n assert.strictEqual(result.pyatv, null);\n});",
3159
3449
  "err": {},
3160
- "uuid": "614a45e1-94e8-4e13-9ef1-a313e0679c4b",
3161
- "parentUUID": "3171ba08-9bb8-4d00-b64f-dd945b6594f3",
3450
+ "uuid": "97dc8fb5-3850-44fe-b3a3-329411286e97",
3451
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3162
3452
  "isHook": false,
3163
3453
  "skipped": false
3164
3454
  },
@@ -3166,17 +3456,17 @@
3166
3456
  "title": "should return null on pyatv error",
3167
3457
  "fullTitle": "NodePyATVInstance static version() should return null on pyatv error",
3168
3458
  "timedOut": false,
3169
- "duration": 2,
3459
+ "duration": 1,
3170
3460
  "state": "passed",
3171
3461
  "speed": "fast",
3172
3462
  "pass": true,
3173
3463
  "fail": false,
3174
3464
  "pending": false,
3175
3465
  "context": null,
3176
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('Hello world!')).end();\n })\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});",
3466
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp => {\n cp.error(new Error('Hello world!')).end();\n })\n });\n assert.strictEqual(result.pyatv, null);\n});",
3177
3467
  "err": {},
3178
- "uuid": "71d6804d-5e79-48b4-bc83-e40597073a70",
3179
- "parentUUID": "3171ba08-9bb8-4d00-b64f-dd945b6594f3",
3468
+ "uuid": "6ce4f2cb-21de-4589-8935-4ba68b5a9ba0",
3469
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3180
3470
  "isHook": false,
3181
3471
  "skipped": false
3182
3472
  },
@@ -3184,81 +3474,43 @@
3184
3474
  "title": "should return null on invalid pyatv version",
3185
3475
  "fullTitle": "NodePyATVInstance static version() should return null on invalid pyatv version",
3186
3476
  "timedOut": false,
3187
- "duration": 1,
3188
- "state": "passed",
3189
- "speed": "fast",
3190
- "pass": true,
3191
- "fail": false,
3192
- "pending": false,
3193
- "context": null,
3194
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 42').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});",
3195
- "err": {},
3196
- "uuid": "5f9d9356-aab9-4af4-8148-226b30e10457",
3197
- "parentUUID": "3171ba08-9bb8-4d00-b64f-dd945b6594f3",
3198
- "isHook": false,
3199
- "skipped": false
3200
- },
3201
- {
3202
- "title": "should return null on empty module version",
3203
- "fullTitle": "NodePyATVInstance static version() should return null on empty module version",
3204
- "timedOut": false,
3205
- "duration": 1,
3206
- "state": "passed",
3207
- "speed": "fast",
3208
- "pass": true,
3209
- "fail": false,
3210
- "pending": false,
3211
- "context": null,
3212
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const path = require.resolve(__dirname + '/../package.json');\n require(path);\n const cache = require.cache[path];\n assert_1.default.ok(cache, 'package.json is in require cache');\n cache.exports = {};\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.7.4').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.module, null);\n});",
3213
- "err": {},
3214
- "uuid": "e8337bcf-bc4d-4073-a508-3b9b1e04df9b",
3215
- "parentUUID": "3171ba08-9bb8-4d00-b64f-dd945b6594f3",
3216
- "isHook": false,
3217
- "skipped": false
3218
- },
3219
- {
3220
- "title": "should return null on invalid module version",
3221
- "fullTitle": "NodePyATVInstance static version() should return null on invalid module version",
3222
- "timedOut": false,
3223
- "duration": 1,
3477
+ "duration": 2,
3224
3478
  "state": "passed",
3225
3479
  "speed": "fast",
3226
3480
  "pass": true,
3227
3481
  "fail": false,
3228
3482
  "pending": false,
3229
3483
  "context": null,
3230
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const path = require.resolve(__dirname + '/../package.json');\n require(path);\n const cache = require.cache[path];\n assert_1.default.ok(cache, 'package.json is in require cache');\n cache.exports = { version: 42 };\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.7.4').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.module, null);\n});",
3484
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp => {\n cp.stdout('atvremote 42').code(1).end();\n })\n });\n assert.strictEqual(result.pyatv, null);\n});",
3231
3485
  "err": {},
3232
- "uuid": "f1d4e641-f621-4f89-a302-1d057292c4f9",
3233
- "parentUUID": "3171ba08-9bb8-4d00-b64f-dd945b6594f3",
3486
+ "uuid": "00e73ddf-b759-4521-bb2b-9a9ab6555855",
3487
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3234
3488
  "isHook": false,
3235
3489
  "skipped": false
3236
3490
  }
3237
3491
  ],
3238
3492
  "suites": [],
3239
3493
  "passes": [
3240
- "a4d2538d-cacd-4c6c-8a45-01d94233b188",
3241
- "9388232e-7f20-47a9-8e50-0b89a63b081c",
3242
- "66098b5d-f242-4b28-bcc1-0abef074630b",
3243
- "ae6d9dbc-dab1-46b3-8aaf-5f3de5035350",
3244
- "ffbaa108-c1a3-49fc-9634-5ec2207a084c",
3245
- "7c920244-d9ac-443a-b6e3-38757e67b941",
3246
- "614a45e1-94e8-4e13-9ef1-a313e0679c4b",
3247
- "71d6804d-5e79-48b4-bc83-e40597073a70",
3248
- "5f9d9356-aab9-4af4-8148-226b30e10457",
3249
- "e8337bcf-bc4d-4073-a508-3b9b1e04df9b",
3250
- "f1d4e641-f621-4f89-a302-1d057292c4f9"
3494
+ "ab5f0c3a-1ca1-42b1-b840-ba72a5e94690",
3495
+ "ba7827b4-9e28-4679-9ea6-d6efa90237f4",
3496
+ "7a446270-fff6-47dc-b0ab-ce0fabb036cf",
3497
+ "f34bcd84-01f3-4c87-8429-a2847b816044",
3498
+ "b5e92442-fe6b-42e2-91f9-8e8b2e2e5107",
3499
+ "e2cdb1a1-2686-4287-823a-b97843eccddd",
3500
+ "97dc8fb5-3850-44fe-b3a3-329411286e97",
3501
+ "6ce4f2cb-21de-4589-8935-4ba68b5a9ba0",
3502
+ "00e73ddf-b759-4521-bb2b-9a9ab6555855"
3251
3503
  ],
3252
3504
  "failures": [],
3253
3505
  "pending": [],
3254
3506
  "skipped": [],
3255
- "duration": 709,
3507
+ "duration": 534,
3256
3508
  "root": false,
3257
3509
  "rootEmpty": false,
3258
3510
  "_timeout": 2000
3259
3511
  },
3260
3512
  {
3261
- "uuid": "1240dc0e-2814-42ad-ad92-2c6f6170e880",
3513
+ "uuid": "d99b51c0-e173-4137-8979-38d0a6851a0b",
3262
3514
  "title": "static check()",
3263
3515
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3264
3516
  "file": "/test/instance.ts",
@@ -3269,17 +3521,17 @@
3269
3521
  "title": "should resolve in test environment [L]",
3270
3522
  "fullTitle": "NodePyATVInstance static check() should resolve in test environment [L]",
3271
3523
  "timedOut": false,
3272
- "duration": 6082,
3524
+ "duration": 5835,
3273
3525
  "state": "passed",
3274
3526
  "speed": "slow",
3275
3527
  "pass": true,
3276
3528
  "fail": false,
3277
3529
  "pending": false,
3278
3530
  "context": null,
3279
- "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(12000);\n yield index_1.default.check();\n});",
3531
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(12000);\n yield NodePyATVInstance.check();\n});",
3280
3532
  "err": {},
3281
- "uuid": "5e76e749-e9a6-4fb7-9761-dd35beb6bc91",
3282
- "parentUUID": "1240dc0e-2814-42ad-ad92-2c6f6170e880",
3533
+ "uuid": "71657004-9970-48e4-8cb1-2479e454b26f",
3534
+ "parentUUID": "d99b51c0-e173-4137-8979-38d0a6851a0b",
3283
3535
  "isHook": false,
3284
3536
  "skipped": false
3285
3537
  },
@@ -3294,10 +3546,10 @@
3294
3546
  "fail": false,
3295
3547
  "pending": false,
3296
3548
  "context": null,
3297
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});",
3549
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.check({\n spawn: createFakeSpawn(cp => {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});",
3298
3550
  "err": {},
3299
- "uuid": "cf03e43e-a88b-40c6-af99-0f678e826623",
3300
- "parentUUID": "1240dc0e-2814-42ad-ad92-2c6f6170e880",
3551
+ "uuid": "8fb699d7-a5c4-4864-8769-79e2eac5a428",
3552
+ "parentUUID": "d99b51c0-e173-4137-8979-38d0a6851a0b",
3301
3553
  "isHook": false,
3302
3554
  "skipped": false
3303
3555
  },
@@ -3312,10 +3564,10 @@
3312
3564
  "fail": false,
3313
3565
  "pending": false,
3314
3566
  "context": null,
3315
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.5.1').code(1).end();\n })\n });\n }), /Found pyatv, but unforunately it's too old. Please update pyatv./);\n});",
3567
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.check({\n spawn: createFakeSpawn(cp => {\n cp.stdout('atvremote 0.5.1').code(1).end();\n })\n });\n }), /Found pyatv, but unforunately it's too old. Please update pyatv./);\n});",
3316
3568
  "err": {},
3317
- "uuid": "6bfb5d53-5c17-4e1f-8a74-e4a0c0aab3bc",
3318
- "parentUUID": "1240dc0e-2814-42ad-ad92-2c6f6170e880",
3569
+ "uuid": "0ecc3104-d3de-4709-b0dc-83136c7be32b",
3570
+ "parentUUID": "d99b51c0-e173-4137-8979-38d0a6851a0b",
3319
3571
  "isHook": false,
3320
3572
  "skipped": false
3321
3573
  },
@@ -3330,31 +3582,31 @@
3330
3582
  "fail": false,
3331
3583
  "pending": false,
3332
3584
  "context": null,
3333
- "code": "return __awaiter(this, void 0, void 0, function* () {\n let i = 0;\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n if (i === 0) {\n cp.stdout('atvremote 0.7.0').code(1).end();\n i++;\n }\n else {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n }\n })\n });\n }), /Unable to scan for devices/);\n});",
3585
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n let i = 0;\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.check({\n spawn: createFakeSpawn(cp => {\n if (i === 0) {\n cp.stdout('atvremote 0.7.0').code(1).end();\n i++;\n }\n else {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n }\n })\n });\n }), /Unable to scan for devices/);\n});",
3334
3586
  "err": {},
3335
- "uuid": "e950f804-404f-4323-9bd1-c79606cd3d9a",
3336
- "parentUUID": "1240dc0e-2814-42ad-ad92-2c6f6170e880",
3587
+ "uuid": "4a8dac9d-7a76-42f7-8ce0-f22e6232b315",
3588
+ "parentUUID": "d99b51c0-e173-4137-8979-38d0a6851a0b",
3337
3589
  "isHook": false,
3338
3590
  "skipped": false
3339
3591
  }
3340
3592
  ],
3341
3593
  "suites": [],
3342
3594
  "passes": [
3343
- "5e76e749-e9a6-4fb7-9761-dd35beb6bc91",
3344
- "cf03e43e-a88b-40c6-af99-0f678e826623",
3345
- "6bfb5d53-5c17-4e1f-8a74-e4a0c0aab3bc",
3346
- "e950f804-404f-4323-9bd1-c79606cd3d9a"
3595
+ "71657004-9970-48e4-8cb1-2479e454b26f",
3596
+ "8fb699d7-a5c4-4864-8769-79e2eac5a428",
3597
+ "0ecc3104-d3de-4709-b0dc-83136c7be32b",
3598
+ "4a8dac9d-7a76-42f7-8ce0-f22e6232b315"
3347
3599
  ],
3348
3600
  "failures": [],
3349
3601
  "pending": [],
3350
3602
  "skipped": [],
3351
- "duration": 6089,
3603
+ "duration": 5842,
3352
3604
  "root": false,
3353
3605
  "rootEmpty": false,
3354
3606
  "_timeout": 2000
3355
3607
  },
3356
3608
  {
3357
- "uuid": "ea8ef98f-d050-4064-8122-b0d922e5c1d7",
3609
+ "uuid": "851073f2-2490-4119-80a1-35ec098d8afa",
3358
3610
  "title": "static find()",
3359
3611
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3360
3612
  "file": "/test/instance.ts",
@@ -3365,17 +3617,17 @@
3365
3617
  "title": "should work [L]",
3366
3618
  "fullTitle": "NodePyATVInstance static find() should work [L]",
3367
3619
  "timedOut": false,
3368
- "duration": 5547,
3620
+ "duration": 5421,
3369
3621
  "state": "passed",
3370
3622
  "speed": "slow",
3371
3623
  "pass": true,
3372
3624
  "fail": false,
3373
3625
  "pending": false,
3374
3626
  "context": null,
3375
- "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(8000);\n const result = yield index_1.default.find();\n assert_1.default.ok(Array.isArray(result));\n});",
3627
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(8000);\n const result = yield NodePyATVInstance.find();\n assert.ok(Array.isArray(result));\n});",
3376
3628
  "err": {},
3377
- "uuid": "bfc40df9-cc44-4de7-8a47-1ce6df5cf7df",
3378
- "parentUUID": "ea8ef98f-d050-4064-8122-b0d922e5c1d7",
3629
+ "uuid": "b528f3ae-9b3e-48d0-8a54-08bddfcc502d",
3630
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3379
3631
  "isHook": false,
3380
3632
  "skipped": false
3381
3633
  },
@@ -3383,17 +3635,17 @@
3383
3635
  "title": "should handle option.atvscriptPath",
3384
3636
  "fullTitle": "NodePyATVInstance static find() should handle option.atvscriptPath",
3385
3637
  "timedOut": false,
3386
- "duration": 1,
3638
+ "duration": 2,
3387
3639
  "state": "passed",
3388
3640
  "speed": "fast",
3389
3641
  "pass": true,
3390
3642
  "fail": false,
3391
3643
  "pending": false,
3392
3644
  "context": null,
3393
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n atvscriptPath: '/foo/bar',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), '/foo/bar');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});",
3645
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n atvscriptPath: '/foo/bar',\n spawn: createFakeSpawn(cp => {\n assert.strictEqual(cp.cmd(), '/foo/bar');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});",
3394
3646
  "err": {},
3395
- "uuid": "da600eba-85d7-4c99-a910-67f0abc8c5ca",
3396
- "parentUUID": "ea8ef98f-d050-4064-8122-b0d922e5c1d7",
3647
+ "uuid": "4ec49899-037b-4b62-a4b0-753e57283e8b",
3648
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3397
3649
  "isHook": false,
3398
3650
  "skipped": false
3399
3651
  },
@@ -3408,10 +3660,10 @@
3408
3660
  "fail": false,
3409
3661
  "pending": false,
3410
3662
  "context": null,
3411
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stderr('Hello World!').code(1).end();\n })\n });\n }), /Unable to execute request/);\n});",
3663
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp => {\n cp.stderr('Hello World!').code(1).end();\n })\n });\n }), /Unable to execute request/);\n});",
3412
3664
  "err": {},
3413
- "uuid": "e8d16e35-cca3-45d0-888d-0c269b7425b8",
3414
- "parentUUID": "ea8ef98f-d050-4064-8122-b0d922e5c1d7",
3665
+ "uuid": "80bd4f52-e882-421e-b265-5a83b8541938",
3666
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3415
3667
  "isHook": false,
3416
3668
  "skipped": false
3417
3669
  },
@@ -3426,10 +3678,10 @@
3426
3678
  "fail": false,
3427
3679
  "pending": false,
3428
3680
  "context": null,
3429
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('Hello world!')).code(1).end();\n })\n });\n }), /Hello world!/);\n});",
3681
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp => {\n cp.error(new Error('Hello world!')).code(1).end();\n })\n });\n }), /Hello world!/);\n});",
3430
3682
  "err": {},
3431
- "uuid": "7bf8d9e6-8b80-454c-8f8c-821e3a2f05d2",
3432
- "parentUUID": "ea8ef98f-d050-4064-8122-b0d922e5c1d7",
3683
+ "uuid": "4be1701e-11ef-404d-b157-18d6d45b2342",
3684
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3433
3685
  "isHook": false,
3434
3686
  "skipped": false
3435
3687
  },
@@ -3437,17 +3689,17 @@
3437
3689
  "title": "should throw error if atvscript result is not valid json",
3438
3690
  "fullTitle": "NodePyATVInstance static find() should throw error if atvscript result is not valid json",
3439
3691
  "timedOut": false,
3440
- "duration": 1,
3692
+ "duration": 2,
3441
3693
  "state": "passed",
3442
3694
  "speed": "fast",
3443
3695
  "pass": true,
3444
3696
  "fail": false,
3445
3697
  "pending": false,
3446
3698
  "context": null,
3447
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout(JSON.stringify({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).substr(1)).end();\n })\n });\n }), /Unable to parse result/);\n});",
3699
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp => {\n cp.stdout(JSON.stringify({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).substr(1)).end();\n })\n });\n }), /Unable to parse result/);\n});",
3448
3700
  "err": {},
3449
- "uuid": "09ad8f38-93ad-400d-83a2-6d6ca2a99e95",
3450
- "parentUUID": "ea8ef98f-d050-4064-8122-b0d922e5c1d7",
3701
+ "uuid": "78343953-fde3-4ca6-b2f9-09d12414a457",
3702
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3451
3703
  "isHook": false,
3452
3704
  "skipped": false
3453
3705
  },
@@ -3455,17 +3707,17 @@
3455
3707
  "title": "should throw error if atvscript result is not successfull",
3456
3708
  "fullTitle": "NodePyATVInstance static find() should throw error if atvscript result is not successfull",
3457
3709
  "timedOut": false,
3458
- "duration": 2,
3710
+ "duration": 1,
3459
3711
  "state": "passed",
3460
3712
  "speed": "fast",
3461
3713
  "pass": true,
3462
3714
  "fail": false,
3463
3715
  "pending": false,
3464
3716
  "context": null,
3465
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout({\n result: 'error'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});",
3717
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp => {\n cp.stdout({\n result: 'error'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});",
3466
3718
  "err": {},
3467
- "uuid": "87e26d2f-9b58-4255-b402-720afe755263",
3468
- "parentUUID": "ea8ef98f-d050-4064-8122-b0d922e5c1d7",
3719
+ "uuid": "e0dfa098-872a-41a2-9e61-f936a4f7f9e0",
3720
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3469
3721
  "isHook": false,
3470
3722
  "skipped": false
3471
3723
  },
@@ -3473,6 +3725,24 @@
3473
3725
  "title": "should throw error if atvscript result is without device array",
3474
3726
  "fullTitle": "NodePyATVInstance static find() should throw error if atvscript result is without device array",
3475
3727
  "timedOut": false,
3728
+ "duration": 2,
3729
+ "state": "passed",
3730
+ "speed": "fast",
3731
+ "pass": true,
3732
+ "fail": false,
3733
+ "pending": false,
3734
+ "context": null,
3735
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp => {\n cp.stdout({\n result: 'success'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});",
3736
+ "err": {},
3737
+ "uuid": "fae023cd-6c5b-4a3b-b0ff-ebe3eeeced84",
3738
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3739
+ "isHook": false,
3740
+ "skipped": false
3741
+ },
3742
+ {
3743
+ "title": "should work if devices are without device_info / services",
3744
+ "fullTitle": "NodePyATVInstance static find() should work if devices are without device_info / services",
3745
+ "timedOut": false,
3476
3746
  "duration": 1,
3477
3747
  "state": "passed",
3478
3748
  "speed": "fast",
@@ -3480,34 +3750,54 @@
3480
3750
  "fail": false,
3481
3751
  "pending": false,
3482
3752
  "context": null,
3483
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout({\n result: 'success'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});",
3753
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const devices = yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp => {\n cp.stdout({\n result: 'success',\n datetime: '2020-11-06T20:47:30.840022+01:00',\n devices: [\n {\n name: 'Vardagsrum',\n address: '10.0.10.81',\n identifier: 'xxx'\n }\n ]\n }).code(1).end();\n })\n });\n assert.strictEqual(devices.length, 1);\n assert.strictEqual(devices[0].name, 'Vardagsrum');\n assert.strictEqual(devices[0].host, '10.0.10.81');\n assert.strictEqual(devices[0].id, 'xxx');\n assert.strictEqual(devices[0].model, undefined);\n assert.strictEqual(devices[0].modelName, undefined);\n assert.strictEqual(devices[0].os, undefined);\n assert.strictEqual(devices[0].version, undefined);\n assert.deepStrictEqual(devices[0].services, undefined);\n});",
3754
+ "err": {},
3755
+ "uuid": "26e967c6-5bfe-4268-93e1-14aec4b34832",
3756
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3757
+ "isHook": false,
3758
+ "skipped": false
3759
+ },
3760
+ {
3761
+ "title": "should work if devices are with device_info / services",
3762
+ "fullTitle": "NodePyATVInstance static find() should work if devices are with device_info / services",
3763
+ "timedOut": false,
3764
+ "duration": 2,
3765
+ "state": "passed",
3766
+ "speed": "fast",
3767
+ "pass": true,
3768
+ "fail": false,
3769
+ "pending": false,
3770
+ "context": null,
3771
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const devices = yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp => {\n cp.stdout({\n result: 'success',\n datetime: '2020-11-06T20:47:30.840022+01:00',\n devices: [\n {\n name: 'Vardagsrum',\n address: '10.0.10.81',\n identifier: 'xxx',\n device_info: {\n 'model': 'Gen4K',\n 'model_str': 'Apple TV 4K',\n 'operating_system': 'TvOS',\n 'version': '15.5.1'\n },\n services: [\n {\n protocol: 'mrp',\n port: 49152\n },\n {\n protocol: 'airplay',\n port: 7000\n }\n ]\n }\n ]\n }).code(1).end();\n })\n });\n assert.strictEqual(devices.length, 1);\n assert.strictEqual(devices[0].name, 'Vardagsrum');\n assert.strictEqual(devices[0].host, '10.0.10.81');\n assert.strictEqual(devices[0].id, 'xxx');\n assert.strictEqual(devices[0].model, 'Gen4K');\n assert.strictEqual(devices[0].modelName, 'Apple TV 4K');\n assert.strictEqual(devices[0].os, 'TvOS');\n assert.strictEqual(devices[0].version, '15.5.1');\n assert.deepStrictEqual(devices[0].services, [\n {\n protocol: NodePyATVProtocol.mrp,\n port: 49152\n },\n {\n protocol: NodePyATVProtocol.airplay,\n port: 7000\n }\n ]);\n});",
3484
3772
  "err": {},
3485
- "uuid": "fa357cd7-4390-4302-a310-ab1a1ffc2953",
3486
- "parentUUID": "ea8ef98f-d050-4064-8122-b0d922e5c1d7",
3773
+ "uuid": "03513a77-3fc3-4156-a18a-8aec35ddaf0c",
3774
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3487
3775
  "isHook": false,
3488
3776
  "skipped": false
3489
3777
  }
3490
3778
  ],
3491
3779
  "suites": [],
3492
3780
  "passes": [
3493
- "bfc40df9-cc44-4de7-8a47-1ce6df5cf7df",
3494
- "da600eba-85d7-4c99-a910-67f0abc8c5ca",
3495
- "e8d16e35-cca3-45d0-888d-0c269b7425b8",
3496
- "7bf8d9e6-8b80-454c-8f8c-821e3a2f05d2",
3497
- "09ad8f38-93ad-400d-83a2-6d6ca2a99e95",
3498
- "87e26d2f-9b58-4255-b402-720afe755263",
3499
- "fa357cd7-4390-4302-a310-ab1a1ffc2953"
3781
+ "b528f3ae-9b3e-48d0-8a54-08bddfcc502d",
3782
+ "4ec49899-037b-4b62-a4b0-753e57283e8b",
3783
+ "80bd4f52-e882-421e-b265-5a83b8541938",
3784
+ "4be1701e-11ef-404d-b157-18d6d45b2342",
3785
+ "78343953-fde3-4ca6-b2f9-09d12414a457",
3786
+ "e0dfa098-872a-41a2-9e61-f936a4f7f9e0",
3787
+ "fae023cd-6c5b-4a3b-b0ff-ebe3eeeced84",
3788
+ "26e967c6-5bfe-4268-93e1-14aec4b34832",
3789
+ "03513a77-3fc3-4156-a18a-8aec35ddaf0c"
3500
3790
  ],
3501
3791
  "failures": [],
3502
3792
  "pending": [],
3503
3793
  "skipped": [],
3504
- "duration": 5555,
3794
+ "duration": 5434,
3505
3795
  "root": false,
3506
3796
  "rootEmpty": false,
3507
3797
  "_timeout": 2000
3508
3798
  },
3509
3799
  {
3510
- "uuid": "c6bc53be-49b5-403b-99ff-bec6dfd6d265",
3800
+ "uuid": "07ab515f-a0c3-4391-a3d1-48ec82395496",
3511
3801
  "title": "static device()",
3512
3802
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3513
3803
  "file": "/test/instance.ts",
@@ -3525,17 +3815,17 @@
3525
3815
  "fail": false,
3526
3816
  "pending": false,
3527
3817
  "context": null,
3528
- "code": "const device = index_1.default.device({ host: '192.168.178.6', name: 'My Testdevice' });\nassert_1.default.strictEqual(device.host, '192.168.178.6');\nassert_1.default.strictEqual(device.name, 'My Testdevice');",
3818
+ "code": "const device = NodePyATVInstance.device({ host: '192.168.178.6', name: 'My Testdevice' });\nassert.strictEqual(device.host, '192.168.178.6');\nassert.strictEqual(device.name, 'My Testdevice');",
3529
3819
  "err": {},
3530
- "uuid": "3c21de9f-c8a4-481f-a1c7-a8dec21424e3",
3531
- "parentUUID": "c6bc53be-49b5-403b-99ff-bec6dfd6d265",
3820
+ "uuid": "3b47b23e-4096-4316-9781-b431a585d002",
3821
+ "parentUUID": "07ab515f-a0c3-4391-a3d1-48ec82395496",
3532
3822
  "isHook": false,
3533
3823
  "skipped": false
3534
3824
  }
3535
3825
  ],
3536
3826
  "suites": [],
3537
3827
  "passes": [
3538
- "3c21de9f-c8a4-481f-a1c7-a8dec21424e3"
3828
+ "3b47b23e-4096-4316-9781-b431a585d002"
3539
3829
  ],
3540
3830
  "failures": [],
3541
3831
  "pending": [],
@@ -3546,7 +3836,7 @@
3546
3836
  "_timeout": 2000
3547
3837
  },
3548
3838
  {
3549
- "uuid": "03f7bfa3-5dec-4cf2-876b-52f340b3c1fd",
3839
+ "uuid": "17d8357d-e005-4454-a457-89a50eceef9a",
3550
3840
  "title": "version()",
3551
3841
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3552
3842
  "file": "/test/instance.ts",
@@ -3557,35 +3847,35 @@
3557
3847
  "title": "should merge options from constructor",
3558
3848
  "fullTitle": "NodePyATVInstance version() should merge options from constructor",
3559
3849
  "timedOut": false,
3560
- "duration": 1,
3850
+ "duration": 2,
3561
3851
  "state": "passed",
3562
3852
  "speed": "fast",
3563
3853
  "pass": true,
3564
3854
  "fail": false,
3565
3855
  "pending": false,
3566
3856
  "context": null,
3567
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvremotePath: 'test' });\n yield i.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.code(1).end();\n })\n });\n});",
3857
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ atvremotePath: 'test' });\n yield i.version({\n spawn: createFakeSpawn(cp => {\n assert.strictEqual(cp.cmd(), 'test');\n cp.code(1).end();\n })\n });\n});",
3568
3858
  "err": {},
3569
- "uuid": "7ca899d8-0b68-45d0-ba1c-4db6214ad995",
3570
- "parentUUID": "03f7bfa3-5dec-4cf2-876b-52f340b3c1fd",
3859
+ "uuid": "35327520-0a9c-4d47-9caa-c9be325af9bc",
3860
+ "parentUUID": "17d8357d-e005-4454-a457-89a50eceef9a",
3571
3861
  "isHook": false,
3572
3862
  "skipped": false
3573
3863
  }
3574
3864
  ],
3575
3865
  "suites": [],
3576
3866
  "passes": [
3577
- "7ca899d8-0b68-45d0-ba1c-4db6214ad995"
3867
+ "35327520-0a9c-4d47-9caa-c9be325af9bc"
3578
3868
  ],
3579
3869
  "failures": [],
3580
3870
  "pending": [],
3581
3871
  "skipped": [],
3582
- "duration": 1,
3872
+ "duration": 2,
3583
3873
  "root": false,
3584
3874
  "rootEmpty": false,
3585
3875
  "_timeout": 2000
3586
3876
  },
3587
3877
  {
3588
- "uuid": "03d8f017-3496-4fc2-ba88-9662d442cbc2",
3878
+ "uuid": "59a89e21-e64d-48d4-93db-d4bac2826874",
3589
3879
  "title": "check()",
3590
3880
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3591
3881
  "file": "/test/instance.ts",
@@ -3603,17 +3893,17 @@
3603
3893
  "fail": false,
3604
3894
  "pending": false,
3605
3895
  "context": null,
3606
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvremotePath: 'test' });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield i.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});",
3896
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ atvremotePath: 'test' });\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield i.check({\n spawn: createFakeSpawn(cp => {\n assert.strictEqual(cp.cmd(), 'test');\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});",
3607
3897
  "err": {},
3608
- "uuid": "15f43107-5652-464e-868c-72203d92958c",
3609
- "parentUUID": "03d8f017-3496-4fc2-ba88-9662d442cbc2",
3898
+ "uuid": "bb571aa9-1cb9-4529-915f-3f123082801d",
3899
+ "parentUUID": "59a89e21-e64d-48d4-93db-d4bac2826874",
3610
3900
  "isHook": false,
3611
3901
  "skipped": false
3612
3902
  }
3613
3903
  ],
3614
3904
  "suites": [],
3615
3905
  "passes": [
3616
- "15f43107-5652-464e-868c-72203d92958c"
3906
+ "bb571aa9-1cb9-4529-915f-3f123082801d"
3617
3907
  ],
3618
3908
  "failures": [],
3619
3909
  "pending": [],
@@ -3624,7 +3914,7 @@
3624
3914
  "_timeout": 2000
3625
3915
  },
3626
3916
  {
3627
- "uuid": "47cebf61-900b-4537-91c1-4e3d172b7ebc",
3917
+ "uuid": "e2b9695a-2816-42ab-bd6a-b2f7cf1b2eaf",
3628
3918
  "title": "find()",
3629
3919
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3630
3920
  "file": "/test/instance.ts",
@@ -3635,35 +3925,35 @@
3635
3925
  "title": "should merge options from constructor",
3636
3926
  "fullTitle": "NodePyATVInstance find() should merge options from constructor",
3637
3927
  "timedOut": false,
3638
- "duration": 2,
3928
+ "duration": 1,
3639
3929
  "state": "passed",
3640
3930
  "speed": "fast",
3641
3931
  "pass": true,
3642
3932
  "fail": false,
3643
3933
  "pending": false,
3644
3934
  "context": null,
3645
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvscriptPath: 'test' });\n yield i.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});",
3935
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ atvscriptPath: 'test' });\n yield i.find({\n spawn: createFakeSpawn(cp => {\n assert.strictEqual(cp.cmd(), 'test');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});",
3646
3936
  "err": {},
3647
- "uuid": "7ffeb2e0-e5d7-49e8-8319-ae471ab4988d",
3648
- "parentUUID": "47cebf61-900b-4537-91c1-4e3d172b7ebc",
3937
+ "uuid": "eeecb453-d0b0-451c-8197-64474a6ee423",
3938
+ "parentUUID": "e2b9695a-2816-42ab-bd6a-b2f7cf1b2eaf",
3649
3939
  "isHook": false,
3650
3940
  "skipped": false
3651
3941
  }
3652
3942
  ],
3653
3943
  "suites": [],
3654
3944
  "passes": [
3655
- "7ffeb2e0-e5d7-49e8-8319-ae471ab4988d"
3945
+ "eeecb453-d0b0-451c-8197-64474a6ee423"
3656
3946
  ],
3657
3947
  "failures": [],
3658
3948
  "pending": [],
3659
3949
  "skipped": [],
3660
- "duration": 2,
3950
+ "duration": 1,
3661
3951
  "root": false,
3662
3952
  "rootEmpty": false,
3663
3953
  "_timeout": 2000
3664
3954
  },
3665
3955
  {
3666
- "uuid": "c2707a59-052d-4239-8d20-152e17d82a8a",
3956
+ "uuid": "ac14fbc7-66f4-4f0e-8296-2a1c749354ca",
3667
3957
  "title": "device()",
3668
3958
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3669
3959
  "file": "/test/instance.ts",
@@ -3681,17 +3971,17 @@
3681
3971
  "fail": false,
3682
3972
  "pending": false,
3683
3973
  "context": null,
3684
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ debug: true });\n const d = i.device({ name: 'My Testdevice', host: '192.168.178.2' });\n assert_1.default.deepStrictEqual(d.debug, true);\n});",
3974
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ debug: true });\n const d = i.device({ name: 'My Testdevice', host: '192.168.178.2' });\n assert.deepStrictEqual(d.debug, true);\n});",
3685
3975
  "err": {},
3686
- "uuid": "54636636-9cbb-4a64-806a-d1c03810d053",
3687
- "parentUUID": "c2707a59-052d-4239-8d20-152e17d82a8a",
3976
+ "uuid": "1a789f31-bc22-453d-ba48-a24b975502b7",
3977
+ "parentUUID": "ac14fbc7-66f4-4f0e-8296-2a1c749354ca",
3688
3978
  "isHook": false,
3689
3979
  "skipped": false
3690
3980
  }
3691
3981
  ],
3692
3982
  "suites": [],
3693
3983
  "passes": [
3694
- "54636636-9cbb-4a64-806a-d1c03810d053"
3984
+ "1a789f31-bc22-453d-ba48-a24b975502b7"
3695
3985
  ],
3696
3986
  "failures": [],
3697
3987
  "pending": [],
@@ -3702,7 +3992,7 @@
3702
3992
  "_timeout": 2000
3703
3993
  },
3704
3994
  {
3705
- "uuid": "087da17c-786d-4721-be97-4e81e7571843",
3995
+ "uuid": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3706
3996
  "title": "Type Exports",
3707
3997
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3708
3998
  "file": "/test/instance.ts",
@@ -3720,10 +4010,10 @@
3720
4010
  "fail": false,
3721
4011
  "pending": false,
3722
4012
  "context": null,
3723
- "code": "assert_1.default.ok(index_1.NodePyATVProtocol);",
4013
+ "code": "assert.ok(NodePyATVProtocol);",
3724
4014
  "err": {},
3725
- "uuid": "22e4b389-3533-4bed-99bf-c26b8ccbb24f",
3726
- "parentUUID": "087da17c-786d-4721-be97-4e81e7571843",
4015
+ "uuid": "93e53b82-10e5-4163-b8da-4f57836f39ed",
4016
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3727
4017
  "isHook": false,
3728
4018
  "skipped": false
3729
4019
  },
@@ -3738,10 +4028,10 @@
3738
4028
  "fail": false,
3739
4029
  "pending": false,
3740
4030
  "context": null,
3741
- "code": "assert_1.default.ok(index_1.NodePyATVMediaType);",
4031
+ "code": "assert.ok(NodePyATVMediaType);",
3742
4032
  "err": {},
3743
- "uuid": "fec1292b-a9ef-412d-8b2f-56b7e0901263",
3744
- "parentUUID": "087da17c-786d-4721-be97-4e81e7571843",
4033
+ "uuid": "0970efe9-43b0-4b34-bac2-536638b02983",
4034
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3745
4035
  "isHook": false,
3746
4036
  "skipped": false
3747
4037
  },
@@ -3756,10 +4046,10 @@
3756
4046
  "fail": false,
3757
4047
  "pending": false,
3758
4048
  "context": null,
3759
- "code": "assert_1.default.ok(index_1.NodePyATVDeviceEvent);",
4049
+ "code": "assert.ok(NodePyATVDeviceEvent);",
3760
4050
  "err": {},
3761
- "uuid": "f0640f19-dfb9-485a-93e7-fe541d0c080a",
3762
- "parentUUID": "087da17c-786d-4721-be97-4e81e7571843",
4051
+ "uuid": "d1d312a9-05c9-4b3a-bd17-0d65cc6bcac9",
4052
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3763
4053
  "isHook": false,
3764
4054
  "skipped": false
3765
4055
  },
@@ -3774,10 +4064,10 @@
3774
4064
  "fail": false,
3775
4065
  "pending": false,
3776
4066
  "context": null,
3777
- "code": "assert_1.default.ok(index_1.NodePyATVDeviceState);",
4067
+ "code": "assert.ok(NodePyATVDeviceState);",
3778
4068
  "err": {},
3779
- "uuid": "a6164494-9939-4ca7-9186-4e866f18476c",
3780
- "parentUUID": "087da17c-786d-4721-be97-4e81e7571843",
4069
+ "uuid": "41afc5e8-9d40-4e59-badb-29469d1c8d36",
4070
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3781
4071
  "isHook": false,
3782
4072
  "skipped": false
3783
4073
  },
@@ -3792,10 +4082,10 @@
3792
4082
  "fail": false,
3793
4083
  "pending": false,
3794
4084
  "context": null,
3795
- "code": "assert_1.default.ok(index_1.NodePyATVRepeatState);",
4085
+ "code": "assert.ok(NodePyATVRepeatState);",
3796
4086
  "err": {},
3797
- "uuid": "1cb09079-b09b-4336-955c-5ad7e4011f04",
3798
- "parentUUID": "087da17c-786d-4721-be97-4e81e7571843",
4087
+ "uuid": "c96454a1-93c2-40f1-8a74-cbf6ab7cdea0",
4088
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3799
4089
  "isHook": false,
3800
4090
  "skipped": false
3801
4091
  },
@@ -3810,10 +4100,10 @@
3810
4100
  "fail": false,
3811
4101
  "pending": false,
3812
4102
  "context": null,
3813
- "code": "assert_1.default.ok(index_1.NodePyATVShuffleState);",
4103
+ "code": "assert.ok(NodePyATVShuffleState);",
3814
4104
  "err": {},
3815
- "uuid": "c60f97a5-00e8-48fc-b796-059c1a0c970a",
3816
- "parentUUID": "087da17c-786d-4721-be97-4e81e7571843",
4105
+ "uuid": "264a0756-3189-4969-b403-9503fe3ba462",
4106
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3817
4107
  "isHook": false,
3818
4108
  "skipped": false
3819
4109
  },
@@ -3828,10 +4118,10 @@
3828
4118
  "fail": false,
3829
4119
  "pending": false,
3830
4120
  "context": null,
3831
- "code": "assert_1.default.ok(index_1.NodePyATVKeys);",
4121
+ "code": "assert.ok(NodePyATVKeys);",
3832
4122
  "err": {},
3833
- "uuid": "a5e717cf-8fba-447b-9cce-efcdff641fcf",
3834
- "parentUUID": "087da17c-786d-4721-be97-4e81e7571843",
4123
+ "uuid": "f514053a-62a7-431e-8b29-8580c83df0df",
4124
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3835
4125
  "isHook": false,
3836
4126
  "skipped": false
3837
4127
  },
@@ -3846,10 +4136,10 @@
3846
4136
  "fail": false,
3847
4137
  "pending": false,
3848
4138
  "context": null,
3849
- "code": "assert_1.default.ok(index_1.NodePyATVListenerState);",
4139
+ "code": "assert.ok(NodePyATVListenerState);",
3850
4140
  "err": {},
3851
- "uuid": "eaed2400-41e1-48a3-ad92-18be824a2ab4",
3852
- "parentUUID": "087da17c-786d-4721-be97-4e81e7571843",
4141
+ "uuid": "106d2da9-bc8c-4ca7-a762-f49920c2db19",
4142
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3853
4143
  "isHook": false,
3854
4144
  "skipped": false
3855
4145
  },
@@ -3864,25 +4154,25 @@
3864
4154
  "fail": false,
3865
4155
  "pending": false,
3866
4156
  "context": null,
3867
- "code": "assert_1.default.ok(index_1.NodePyATVPowerState);",
4157
+ "code": "assert.ok(NodePyATVPowerState);",
3868
4158
  "err": {},
3869
- "uuid": "84624466-0cd2-4d7d-8bb0-44bcd1838bb9",
3870
- "parentUUID": "087da17c-786d-4721-be97-4e81e7571843",
4159
+ "uuid": "9804449d-038c-4f2f-9f52-490df6c41492",
4160
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3871
4161
  "isHook": false,
3872
4162
  "skipped": false
3873
4163
  }
3874
4164
  ],
3875
4165
  "suites": [],
3876
4166
  "passes": [
3877
- "22e4b389-3533-4bed-99bf-c26b8ccbb24f",
3878
- "fec1292b-a9ef-412d-8b2f-56b7e0901263",
3879
- "f0640f19-dfb9-485a-93e7-fe541d0c080a",
3880
- "a6164494-9939-4ca7-9186-4e866f18476c",
3881
- "1cb09079-b09b-4336-955c-5ad7e4011f04",
3882
- "c60f97a5-00e8-48fc-b796-059c1a0c970a",
3883
- "a5e717cf-8fba-447b-9cce-efcdff641fcf",
3884
- "eaed2400-41e1-48a3-ad92-18be824a2ab4",
3885
- "84624466-0cd2-4d7d-8bb0-44bcd1838bb9"
4167
+ "93e53b82-10e5-4163-b8da-4f57836f39ed",
4168
+ "0970efe9-43b0-4b34-bac2-536638b02983",
4169
+ "d1d312a9-05c9-4b3a-bd17-0d65cc6bcac9",
4170
+ "41afc5e8-9d40-4e59-badb-29469d1c8d36",
4171
+ "c96454a1-93c2-40f1-8a74-cbf6ab7cdea0",
4172
+ "264a0756-3189-4969-b403-9503fe3ba462",
4173
+ "f514053a-62a7-431e-8b29-8580c83df0df",
4174
+ "106d2da9-bc8c-4ca7-a762-f49920c2db19",
4175
+ "9804449d-038c-4f2f-9f52-490df6c41492"
3886
4176
  ],
3887
4177
  "failures": [],
3888
4178
  "pending": [],
@@ -3903,7 +4193,7 @@
3903
4193
  "_timeout": 2000
3904
4194
  },
3905
4195
  {
3906
- "uuid": "f31a2a8a-9ba9-45de-9a49-f4447128069b",
4196
+ "uuid": "aafcba3e-007b-48b5-8d38-95a3e994fb9b",
3907
4197
  "title": "Tools",
3908
4198
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
3909
4199
  "file": "/test/tools.ts",
@@ -3912,7 +4202,7 @@
3912
4202
  "tests": [],
3913
4203
  "suites": [
3914
4204
  {
3915
- "uuid": "05ccd23f-c4e5-4fc4-aff6-aad127e798b0",
4205
+ "uuid": "a4434259-769f-4bc7-9f67-1164e240a75d",
3916
4206
  "title": "addRequestId() / removeRequestId()",
3917
4207
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
3918
4208
  "file": "/test/tools.ts",
@@ -3930,10 +4220,10 @@
3930
4220
  "fail": false,
3931
4221
  "pending": false,
3932
4222
  "context": null,
3933
- "code": "const id = (0, tools_1.addRequestId)();\nassert_1.default.strictEqual(typeof id, 'string');\n(0, tools_1.removeRequestId)(id);",
4223
+ "code": "const id = addRequestId();\nassert.strictEqual(typeof id, 'string');\nremoveRequestId(id);",
3934
4224
  "err": {},
3935
- "uuid": "273933ea-dee2-4a92-9631-4e52d805ac95",
3936
- "parentUUID": "05ccd23f-c4e5-4fc4-aff6-aad127e798b0",
4225
+ "uuid": "24514ef3-be8f-4ec5-843d-79d8e9cf867f",
4226
+ "parentUUID": "a4434259-769f-4bc7-9f67-1164e240a75d",
3937
4227
  "isHook": false,
3938
4228
  "skipped": false
3939
4229
  },
@@ -3948,18 +4238,18 @@
3948
4238
  "fail": false,
3949
4239
  "pending": false,
3950
4240
  "context": null,
3951
- "code": "(0, tools_1.removeRequestId)('FOO');",
4241
+ "code": "removeRequestId('FOO');",
3952
4242
  "err": {},
3953
- "uuid": "0f5ee77b-2a16-41e8-850c-dccbeb80ed41",
3954
- "parentUUID": "05ccd23f-c4e5-4fc4-aff6-aad127e798b0",
4243
+ "uuid": "601b08b0-2f6d-4d39-90b0-e9ec976c7389",
4244
+ "parentUUID": "a4434259-769f-4bc7-9f67-1164e240a75d",
3955
4245
  "isHook": false,
3956
4246
  "skipped": false
3957
4247
  }
3958
4248
  ],
3959
4249
  "suites": [],
3960
4250
  "passes": [
3961
- "273933ea-dee2-4a92-9631-4e52d805ac95",
3962
- "0f5ee77b-2a16-41e8-850c-dccbeb80ed41"
4251
+ "24514ef3-be8f-4ec5-843d-79d8e9cf867f",
4252
+ "601b08b0-2f6d-4d39-90b0-e9ec976c7389"
3963
4253
  ],
3964
4254
  "failures": [],
3965
4255
  "pending": [],
@@ -3970,7 +4260,7 @@
3970
4260
  "_timeout": 2000
3971
4261
  },
3972
4262
  {
3973
- "uuid": "661e68ed-8455-4a89-a32c-e4e46557317e",
4263
+ "uuid": "15c85a06-3d78-46a7-bd1b-a78959d7bbe1",
3974
4264
  "title": "debug()",
3975
4265
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
3976
4266
  "file": "/test/tools.ts",
@@ -3988,10 +4278,10 @@
3988
4278
  "fail": false,
3989
4279
  "pending": false,
3990
4280
  "context": null,
3991
- "code": "(0, tools_1.debug)('TEST', 'Hello World.', {});",
4281
+ "code": "debug('TEST', 'Hello World.', {});",
3992
4282
  "err": {},
3993
- "uuid": "1a1da7db-53d3-4d33-b51d-c10c83b9541b",
3994
- "parentUUID": "661e68ed-8455-4a89-a32c-e4e46557317e",
4283
+ "uuid": "e56a3db1-50d2-4375-af45-4e26cd5e842f",
4284
+ "parentUUID": "15c85a06-3d78-46a7-bd1b-a78959d7bbe1",
3995
4285
  "isHook": false,
3996
4286
  "skipped": false
3997
4287
  },
@@ -4006,10 +4296,10 @@
4006
4296
  "fail": false,
4007
4297
  "pending": false,
4008
4298
  "context": null,
4009
- "code": "(0, tools_1.debug)('TEST', 'Hello World.', { debug: true });",
4299
+ "code": "debug('TEST', 'Hello World.', { debug: true });",
4010
4300
  "err": {},
4011
- "uuid": "3117b3ee-e9ee-43dd-9749-149c24ab200a",
4012
- "parentUUID": "661e68ed-8455-4a89-a32c-e4e46557317e",
4301
+ "uuid": "bd14be38-0ab6-40e2-9d51-9923387959ce",
4302
+ "parentUUID": "15c85a06-3d78-46a7-bd1b-a78959d7bbe1",
4013
4303
  "isHook": false,
4014
4304
  "skipped": false
4015
4305
  },
@@ -4024,10 +4314,10 @@
4024
4314
  "fail": false,
4025
4315
  "pending": false,
4026
4316
  "context": null,
4027
- "code": "(0, tools_1.debug)('TEST', 'Hello World.', {\n debug: function (msg) {\n assert_1.default.strictEqual(this, null);\n assert_1.default.ok(msg.includes('Hello World'));\n }\n});",
4317
+ "code": "debug('TEST', 'Hello World.', {\n debug: function (msg) {\n assert.strictEqual(this, null);\n assert.ok(msg.includes('Hello World'));\n }\n});",
4028
4318
  "err": {},
4029
- "uuid": "ea7e046d-fb7f-48fc-8ecc-516c2e5c2abd",
4030
- "parentUUID": "661e68ed-8455-4a89-a32c-e4e46557317e",
4319
+ "uuid": "1516d2df-f570-47ae-8a38-1d5eb0dc940c",
4320
+ "parentUUID": "15c85a06-3d78-46a7-bd1b-a78959d7bbe1",
4031
4321
  "isHook": false,
4032
4322
  "skipped": false
4033
4323
  },
@@ -4042,10 +4332,10 @@
4042
4332
  "fail": false,
4043
4333
  "pending": false,
4044
4334
  "context": null,
4045
- "code": "(0, tools_1.debug)('TEST', 'Hello World.', { noColors: true });",
4335
+ "code": "debug('TEST', 'Hello World.', { noColors: true });",
4046
4336
  "err": {},
4047
- "uuid": "e2c3e830-106d-41d1-8889-c35f82d88a5c",
4048
- "parentUUID": "661e68ed-8455-4a89-a32c-e4e46557317e",
4337
+ "uuid": "1b3d258b-66da-437d-9a80-04a9a83197e8",
4338
+ "parentUUID": "15c85a06-3d78-46a7-bd1b-a78959d7bbe1",
4049
4339
  "isHook": false,
4050
4340
  "skipped": false
4051
4341
  },
@@ -4053,39 +4343,39 @@
4053
4343
  "title": "should work with custom logger and colors disabled",
4054
4344
  "fullTitle": "Tools debug() should work with custom logger and colors disabled",
4055
4345
  "timedOut": false,
4056
- "duration": 1,
4346
+ "duration": 0,
4057
4347
  "state": "passed",
4058
4348
  "speed": "fast",
4059
4349
  "pass": true,
4060
4350
  "fail": false,
4061
4351
  "pending": false,
4062
4352
  "context": null,
4063
- "code": "(0, tools_1.debug)('TEST', 'Hello World.', {\n noColors: true,\n debug: function (msg) {\n assert_1.default.strictEqual(this, null);\n assert_1.default.strictEqual(msg, '[node-pyatv][TEST] Hello World.');\n }\n});",
4353
+ "code": "debug('TEST', 'Hello World.', {\n noColors: true,\n debug: function (msg) {\n assert.strictEqual(this, null);\n assert.strictEqual(msg, '[node-pyatv][TEST] Hello World.');\n }\n});",
4064
4354
  "err": {},
4065
- "uuid": "2fa49c23-8c86-4321-add9-19f6a6a2482e",
4066
- "parentUUID": "661e68ed-8455-4a89-a32c-e4e46557317e",
4355
+ "uuid": "84a263ea-c4b1-4d47-84f6-e6b93a1d5b28",
4356
+ "parentUUID": "15c85a06-3d78-46a7-bd1b-a78959d7bbe1",
4067
4357
  "isHook": false,
4068
4358
  "skipped": false
4069
4359
  }
4070
4360
  ],
4071
4361
  "suites": [],
4072
4362
  "passes": [
4073
- "1a1da7db-53d3-4d33-b51d-c10c83b9541b",
4074
- "3117b3ee-e9ee-43dd-9749-149c24ab200a",
4075
- "ea7e046d-fb7f-48fc-8ecc-516c2e5c2abd",
4076
- "e2c3e830-106d-41d1-8889-c35f82d88a5c",
4077
- "2fa49c23-8c86-4321-add9-19f6a6a2482e"
4363
+ "e56a3db1-50d2-4375-af45-4e26cd5e842f",
4364
+ "bd14be38-0ab6-40e2-9d51-9923387959ce",
4365
+ "1516d2df-f570-47ae-8a38-1d5eb0dc940c",
4366
+ "1b3d258b-66da-437d-9a80-04a9a83197e8",
4367
+ "84a263ea-c4b1-4d47-84f6-e6b93a1d5b28"
4078
4368
  ],
4079
4369
  "failures": [],
4080
4370
  "pending": [],
4081
4371
  "skipped": [],
4082
- "duration": 1,
4372
+ "duration": 0,
4083
4373
  "root": false,
4084
4374
  "rootEmpty": false,
4085
4375
  "_timeout": 2000
4086
4376
  },
4087
4377
  {
4088
- "uuid": "322a1029-2b1d-44f3-aa0a-9998640b2d39",
4378
+ "uuid": "53687b02-097c-4625-bb8f-37ac3c5141a7",
4089
4379
  "title": "getExecutable()",
4090
4380
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
4091
4381
  "file": "/test/tools.ts",
@@ -4103,10 +4393,10 @@
4103
4393
  "fail": false,
4104
4394
  "pending": false,
4105
4395
  "context": null,
4106
- "code": "const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvremote, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert_1.default.strictEqual(result, '/tmp/1');",
4396
+ "code": "const result = getExecutable(NodePyATVExecutableType.atvremote, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert.strictEqual(result, '/tmp/1');",
4107
4397
  "err": {},
4108
- "uuid": "8445f883-92b1-4e3e-97af-763020a003b6",
4109
- "parentUUID": "322a1029-2b1d-44f3-aa0a-9998640b2d39",
4398
+ "uuid": "83ef0353-862c-48f3-a77e-1314994c2bb7",
4399
+ "parentUUID": "53687b02-097c-4625-bb8f-37ac3c5141a7",
4110
4400
  "isHook": false,
4111
4401
  "skipped": false
4112
4402
  },
@@ -4121,10 +4411,10 @@
4121
4411
  "fail": false,
4122
4412
  "pending": false,
4123
4413
  "context": null,
4124
- "code": "const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert_1.default.strictEqual(result, '/tmp/2');",
4414
+ "code": "const result = getExecutable(NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert.strictEqual(result, '/tmp/2');",
4125
4415
  "err": {},
4126
- "uuid": "1bb0f448-0603-446a-abeb-25d22c7051c4",
4127
- "parentUUID": "322a1029-2b1d-44f3-aa0a-9998640b2d39",
4416
+ "uuid": "302a363c-5421-451f-9094-dedd4d3266be",
4417
+ "parentUUID": "53687b02-097c-4625-bb8f-37ac3c5141a7",
4128
4418
  "isHook": false,
4129
4419
  "skipped": false
4130
4420
  },
@@ -4139,10 +4429,10 @@
4139
4429
  "fail": false,
4140
4430
  "pending": false,
4141
4431
  "context": null,
4142
- "code": "const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvremote, {\n atvscriptPath: '/tmp'\n});\nassert_1.default.strictEqual(result, 'atvremote');",
4432
+ "code": "const result = getExecutable(NodePyATVExecutableType.atvremote, {\n atvscriptPath: '/tmp'\n});\nassert.strictEqual(result, 'atvremote');",
4143
4433
  "err": {},
4144
- "uuid": "4dc1b72b-d6ad-410f-8615-e8f97b4bba0e",
4145
- "parentUUID": "322a1029-2b1d-44f3-aa0a-9998640b2d39",
4434
+ "uuid": "7cbeb252-0bf7-46b9-addd-fd61091f7e68",
4435
+ "parentUUID": "53687b02-097c-4625-bb8f-37ac3c5141a7",
4146
4436
  "isHook": false,
4147
4437
  "skipped": false
4148
4438
  },
@@ -4157,20 +4447,20 @@
4157
4447
  "fail": false,
4158
4448
  "pending": false,
4159
4449
  "context": null,
4160
- "code": "const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp'\n});\nassert_1.default.strictEqual(result, 'atvscript');",
4450
+ "code": "const result = getExecutable(NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp'\n});\nassert.strictEqual(result, 'atvscript');",
4161
4451
  "err": {},
4162
- "uuid": "3c79cbb2-634e-47cf-8d37-0cded4fb9572",
4163
- "parentUUID": "322a1029-2b1d-44f3-aa0a-9998640b2d39",
4452
+ "uuid": "aae55009-3e4a-4170-a8c8-868fa0610e5a",
4453
+ "parentUUID": "53687b02-097c-4625-bb8f-37ac3c5141a7",
4164
4454
  "isHook": false,
4165
4455
  "skipped": false
4166
4456
  }
4167
4457
  ],
4168
4458
  "suites": [],
4169
4459
  "passes": [
4170
- "8445f883-92b1-4e3e-97af-763020a003b6",
4171
- "1bb0f448-0603-446a-abeb-25d22c7051c4",
4172
- "4dc1b72b-d6ad-410f-8615-e8f97b4bba0e",
4173
- "3c79cbb2-634e-47cf-8d37-0cded4fb9572"
4460
+ "83ef0353-862c-48f3-a77e-1314994c2bb7",
4461
+ "302a363c-5421-451f-9094-dedd4d3266be",
4462
+ "7cbeb252-0bf7-46b9-addd-fd61091f7e68",
4463
+ "aae55009-3e4a-4170-a8c8-868fa0610e5a"
4174
4464
  ],
4175
4465
  "failures": [],
4176
4466
  "pending": [],
@@ -4181,7 +4471,7 @@
4181
4471
  "_timeout": 2000
4182
4472
  },
4183
4473
  {
4184
- "uuid": "32e21904-dd31-4e2c-9b73-5dfd456c5fb8",
4474
+ "uuid": "daf57355-7f9a-419e-8b94-e0afeccbf527",
4185
4475
  "title": "getParameters()",
4186
4476
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
4187
4477
  "file": "/test/tools.ts",
@@ -4192,17 +4482,17 @@
4192
4482
  "title": "empty case",
4193
4483
  "fullTitle": "Tools getParameters() empty case",
4194
4484
  "timedOut": false,
4195
- "duration": 1,
4485
+ "duration": 0,
4196
4486
  "state": "passed",
4197
4487
  "speed": "fast",
4198
4488
  "pass": true,
4199
4489
  "fail": false,
4200
4490
  "pending": false,
4201
4491
  "context": null,
4202
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)();\n assert_1.default.deepEqual(result, []);\n});",
4492
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield getParamters();\n assert.deepEqual(result, []);\n});",
4203
4493
  "err": {},
4204
- "uuid": "fe116e49-9edb-41a6-98ff-581db44ae9c1",
4205
- "parentUUID": "32e21904-dd31-4e2c-9b73-5dfd456c5fb8",
4494
+ "uuid": "889d0363-b4b2-4492-8b0c-0826d60bbf2f",
4495
+ "parentUUID": "daf57355-7f9a-419e-8b94-e0afeccbf527",
4206
4496
  "isHook": false,
4207
4497
  "skipped": false
4208
4498
  },
@@ -4210,17 +4500,17 @@
4210
4500
  "title": "easy case",
4211
4501
  "fullTitle": "Tools getParameters() easy case",
4212
4502
  "timedOut": false,
4213
- "duration": 0,
4503
+ "duration": 1,
4214
4504
  "state": "passed",
4215
4505
  "speed": "fast",
4216
4506
  "pass": true,
4217
4507
  "fail": false,
4218
4508
  "pending": false,
4219
4509
  "context": null,
4220
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)({\n host: '192.168.178.2'\n });\n assert_1.default.deepEqual(result, ['-s', '192.168.178.2']);\n});",
4510
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield getParamters({\n host: '192.168.178.2'\n });\n assert.deepEqual(result, ['-s', '192.168.178.2']);\n});",
4221
4511
  "err": {},
4222
- "uuid": "aeb95cb6-cdbc-4a54-97a6-0bb8def4a394",
4223
- "parentUUID": "32e21904-dd31-4e2c-9b73-5dfd456c5fb8",
4512
+ "uuid": "71c4642e-5ded-42cf-8b8e-ba441e859db9",
4513
+ "parentUUID": "daf57355-7f9a-419e-8b94-e0afeccbf527",
4224
4514
  "isHook": false,
4225
4515
  "skipped": false
4226
4516
  },
@@ -4228,37 +4518,37 @@
4228
4518
  "title": "full case",
4229
4519
  "fullTitle": "Tools getParameters() full case",
4230
4520
  "timedOut": false,
4231
- "duration": 1,
4521
+ "duration": 0,
4232
4522
  "state": "passed",
4233
4523
  "speed": "fast",
4234
4524
  "pass": true,
4235
4525
  "fail": false,
4236
4526
  "pending": false,
4237
4527
  "context": null,
4238
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)({\n hosts: ['192.168.178.2', '192.168.178.3'],\n id: '****',\n protocol: types_1.NodePyATVProtocol.mrp,\n dmapCredentials: '****',\n mrpCredentials: '****',\n airplayCredentials: '****',\n companionCredentials: '1234',\n raopCredentials: '::foo:'\n });\n assert_1.default.deepEqual(result, [\n '-s', '192.168.178.2,192.168.178.3',\n '-i', '****',\n '--protocol', 'mrp',\n '--dmap-credentials', '****',\n '--mrp-credentials', '****',\n '--airplay-credentials', '****',\n '--companion-credentials', '1234',\n '--raop-credentials', '::foo:'\n ]);\n});",
4528
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield getParamters({\n hosts: ['192.168.178.2', '192.168.178.3'],\n id: '****',\n protocol: NodePyATVProtocol.mrp,\n dmapCredentials: '****',\n mrpCredentials: '****',\n airplayCredentials: '****',\n companionCredentials: '1234',\n raopCredentials: '::foo:'\n });\n assert.deepEqual(result, [\n '-s', '192.168.178.2,192.168.178.3',\n '-i', '****',\n '--protocol', 'mrp',\n '--dmap-credentials', '****',\n '--mrp-credentials', '****',\n '--airplay-credentials', '****',\n '--companion-credentials', '1234',\n '--raop-credentials', '::foo:'\n ]);\n});",
4239
4529
  "err": {},
4240
- "uuid": "cbd0a0b0-dcee-4d12-8cc6-3dbe33b54585",
4241
- "parentUUID": "32e21904-dd31-4e2c-9b73-5dfd456c5fb8",
4530
+ "uuid": "37073e26-456c-4bc3-ba2c-6aee83d53182",
4531
+ "parentUUID": "daf57355-7f9a-419e-8b94-e0afeccbf527",
4242
4532
  "isHook": false,
4243
4533
  "skipped": false
4244
4534
  }
4245
4535
  ],
4246
4536
  "suites": [],
4247
4537
  "passes": [
4248
- "fe116e49-9edb-41a6-98ff-581db44ae9c1",
4249
- "aeb95cb6-cdbc-4a54-97a6-0bb8def4a394",
4250
- "cbd0a0b0-dcee-4d12-8cc6-3dbe33b54585"
4538
+ "889d0363-b4b2-4492-8b0c-0826d60bbf2f",
4539
+ "71c4642e-5ded-42cf-8b8e-ba441e859db9",
4540
+ "37073e26-456c-4bc3-ba2c-6aee83d53182"
4251
4541
  ],
4252
4542
  "failures": [],
4253
4543
  "pending": [],
4254
4544
  "skipped": [],
4255
- "duration": 2,
4545
+ "duration": 1,
4256
4546
  "root": false,
4257
4547
  "rootEmpty": false,
4258
4548
  "_timeout": 2000
4259
4549
  },
4260
4550
  {
4261
- "uuid": "45fcc2ce-304c-4a16-8873-e73851870f2e",
4551
+ "uuid": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4262
4552
  "title": "parseState()",
4263
4553
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
4264
4554
  "file": "/test/tools.ts",
@@ -4276,10 +4566,10 @@
4276
4566
  "fail": false,
4277
4567
  "pending": false,
4278
4568
  "context": null,
4279
- "code": "const input = {};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4569
+ "code": "const input = {};\nconst result = parseState(input, '', {});\nassert.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4280
4570
  "err": {},
4281
- "uuid": "be09fb50-e472-4081-85a0-5df2d4e8504f",
4282
- "parentUUID": "45fcc2ce-304c-4a16-8873-e73851870f2e",
4571
+ "uuid": "78f2eefb-185c-4b32-8915-4eb3ea6c62fe",
4572
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4283
4573
  "isHook": false,
4284
4574
  "skipped": false
4285
4575
  },
@@ -4294,10 +4584,10 @@
4294
4584
  "fail": false,
4295
4585
  "pending": false,
4296
4586
  "context": null,
4297
- "code": "// @ts-ignore\nconst result = (0, tools_1.parseState)(null, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4587
+ "code": "// @ts-ignore\nconst result = parseState(null, '', {});\nassert.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4298
4588
  "err": {},
4299
- "uuid": "1b2dda32-735d-484a-8559-e9e1746720f1",
4300
- "parentUUID": "45fcc2ce-304c-4a16-8873-e73851870f2e",
4589
+ "uuid": "2a64cff2-f0b4-4167-a84b-ffb0e975b6df",
4590
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4301
4591
  "isHook": false,
4302
4592
  "skipped": false
4303
4593
  },
@@ -4312,10 +4602,10 @@
4312
4602
  "fail": false,
4313
4603
  "pending": false,
4314
4604
  "context": null,
4315
- "code": "const input = {\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus',\n powerState: null\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: types_1.NodePyATVMediaType.video,\n deviceState: types_1.NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: types_1.NodePyATVShuffleState.off,\n repeat: types_1.NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n});",
4605
+ "code": "const input = {\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus',\n powerState: null\n};\nconst result = parseState(input, '', {});\nassert.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: NodePyATVMediaType.video,\n deviceState: NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: NodePyATVShuffleState.off,\n repeat: NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n});",
4316
4606
  "err": {},
4317
- "uuid": "8b6d53b7-28d8-4ffa-b592-42f07645675a",
4318
- "parentUUID": "45fcc2ce-304c-4a16-8873-e73851870f2e",
4607
+ "uuid": "2cc31b39-7574-4cdf-9a3b-bea8f079490d",
4608
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4319
4609
  "isHook": false,
4320
4610
  "skipped": false
4321
4611
  },
@@ -4330,10 +4620,10 @@
4330
4620
  "fail": false,
4331
4621
  "pending": false,
4332
4622
  "context": null,
4333
- "code": "const input = {\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n};\nassert_1.default.throws(() => {\n (0, tools_1.parseState)(input, '', {});\n}, /Got pyatv Error: invalid credentials: 321/);",
4623
+ "code": "const input = {\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n};\nassert.throws(() => {\n parseState(input, '', {});\n}, /Got pyatv Error: invalid credentials: 321/);",
4334
4624
  "err": {},
4335
- "uuid": "86db509d-26db-46f3-8f52-ad5a72d1d70d",
4336
- "parentUUID": "45fcc2ce-304c-4a16-8873-e73851870f2e",
4625
+ "uuid": "5cae4ef0-03da-4b95-965d-c410af10d31c",
4626
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4337
4627
  "isHook": false,
4338
4628
  "skipped": false
4339
4629
  },
@@ -4348,10 +4638,10 @@
4348
4638
  "fail": false,
4349
4639
  "pending": false,
4350
4640
  "context": null,
4351
- "code": "const input = { datetime: 'today' };\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4641
+ "code": "const input = { datetime: 'today' };\nconst result = parseState(input, '', {});\nassert.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4352
4642
  "err": {},
4353
- "uuid": "3abcd132-7fc9-4ca2-beef-2ba705aa2240",
4354
- "parentUUID": "45fcc2ce-304c-4a16-8873-e73851870f2e",
4643
+ "uuid": "a18456ba-d21d-4894-9d3f-fd4bf3f7990d",
4644
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4355
4645
  "isHook": false,
4356
4646
  "skipped": false
4357
4647
  },
@@ -4366,10 +4656,10 @@
4366
4656
  "fail": false,
4367
4657
  "pending": false,
4368
4658
  "context": null,
4369
- "code": "const input = {\n result: 'success',\n datetime: true,\n hash: 1337,\n media_type: false,\n device_state: 43,\n title: undefined,\n artist: 90,\n album: Infinity,\n genre: Math.PI,\n total_time: '23min',\n position: '0:30.123',\n shuffle: false,\n repeat: true,\n app: 0,\n app_id: 891645381647289,\n powerState: null\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4659
+ "code": "const input = {\n result: 'success',\n datetime: true,\n hash: 1337,\n media_type: false,\n device_state: 43,\n title: undefined,\n artist: 90,\n album: Infinity,\n genre: Math.PI,\n total_time: '23min',\n position: '0:30.123',\n shuffle: false,\n repeat: true,\n app: 0,\n app_id: 891645381647289,\n powerState: null\n};\nconst result = parseState(input, '', {});\nassert.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4370
4660
  "err": {},
4371
- "uuid": "8af817f5-6f0c-4cb7-8c7b-44ec87c1fc10",
4372
- "parentUUID": "45fcc2ce-304c-4a16-8873-e73851870f2e",
4661
+ "uuid": "9fab4384-1705-48e8-a21c-c50ce0efd5ba",
4662
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4373
4663
  "isHook": false,
4374
4664
  "skipped": false
4375
4665
  },
@@ -4377,35 +4667,35 @@
4377
4667
  "title": "should ignore enums with unsupported valid",
4378
4668
  "fullTitle": "Tools parseState() should ignore enums with unsupported valid",
4379
4669
  "timedOut": false,
4380
- "duration": 0,
4670
+ "duration": 1,
4381
4671
  "state": "passed",
4382
4672
  "speed": "fast",
4383
4673
  "pass": true,
4384
4674
  "fail": false,
4385
4675
  "pending": false,
4386
4676
  "context": null,
4387
- "code": "const input = {\n media_type: '3d-experience',\n device_state: 'initiating',\n shuffle: 'everything',\n repeat: 'nothing'\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4677
+ "code": "const input = {\n media_type: '3d-experience',\n device_state: 'initiating',\n shuffle: 'everything',\n repeat: 'nothing'\n};\nconst result = parseState(input, '', {});\nassert.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4388
4678
  "err": {},
4389
- "uuid": "7e3dfa24-007c-4948-8b26-9c0d25ba7397",
4390
- "parentUUID": "45fcc2ce-304c-4a16-8873-e73851870f2e",
4679
+ "uuid": "69b39d31-0892-4705-b298-0e70c7488467",
4680
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4391
4681
  "isHook": false,
4392
4682
  "skipped": false
4393
4683
  }
4394
4684
  ],
4395
4685
  "suites": [],
4396
4686
  "passes": [
4397
- "be09fb50-e472-4081-85a0-5df2d4e8504f",
4398
- "1b2dda32-735d-484a-8559-e9e1746720f1",
4399
- "8b6d53b7-28d8-4ffa-b592-42f07645675a",
4400
- "86db509d-26db-46f3-8f52-ad5a72d1d70d",
4401
- "3abcd132-7fc9-4ca2-beef-2ba705aa2240",
4402
- "8af817f5-6f0c-4cb7-8c7b-44ec87c1fc10",
4403
- "7e3dfa24-007c-4948-8b26-9c0d25ba7397"
4687
+ "78f2eefb-185c-4b32-8915-4eb3ea6c62fe",
4688
+ "2a64cff2-f0b4-4167-a84b-ffb0e975b6df",
4689
+ "2cc31b39-7574-4cdf-9a3b-bea8f079490d",
4690
+ "5cae4ef0-03da-4b95-965d-c410af10d31c",
4691
+ "a18456ba-d21d-4894-9d3f-fd4bf3f7990d",
4692
+ "9fab4384-1705-48e8-a21c-c50ce0efd5ba",
4693
+ "69b39d31-0892-4705-b298-0e70c7488467"
4404
4694
  ],
4405
4695
  "failures": [],
4406
4696
  "pending": [],
4407
4697
  "skipped": [],
4408
- "duration": 0,
4698
+ "duration": 1,
4409
4699
  "root": false,
4410
4700
  "rootEmpty": false,
4411
4701
  "_timeout": 2000