@sebbo2002/node-pyatv 5.0.0 → 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 (54) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/lib/device.d.ts +46 -1
  3. package/dist/lib/device.js +55 -0
  4. package/dist/lib/device.js.map +1 -1
  5. package/dist/lib/index.d.ts +2 -1
  6. package/dist/lib/index.js +2 -1
  7. package/dist/lib/index.js.map +1 -1
  8. package/dist/lib/instance.js +13 -5
  9. package/dist/lib/instance.js.map +1 -1
  10. package/dist/lib/types.d.ts +24 -0
  11. package/docs/coverage/cobertura-coverage.xml +913 -791
  12. package/docs/coverage/device-event.ts.html +1 -1
  13. package/docs/coverage/device-events.ts.html +8 -8
  14. package/docs/coverage/device.ts.html +204 -18
  15. package/docs/coverage/fake-spawn.ts.html +41 -41
  16. package/docs/coverage/index.html +30 -30
  17. package/docs/coverage/index.ts.html +25 -16
  18. package/docs/coverage/instance.ts.html +51 -33
  19. package/docs/coverage/tools.ts.html +250 -250
  20. package/docs/coverage/types.ts.html +82 -4
  21. package/docs/reference/assets/highlight.css +4 -4
  22. package/docs/reference/assets/search.js +1 -1
  23. package/docs/reference/classes/NodePyATVDevice.html +85 -9
  24. package/docs/reference/classes/NodePyATVDeviceEvent.html +4 -4
  25. package/docs/reference/classes/{default.html → NodePyATVInstance.html} +34 -34
  26. package/docs/reference/enums/NodePyATVDeviceState.html +10 -10
  27. package/docs/reference/enums/NodePyATVExecutableType.html +65 -0
  28. package/docs/reference/enums/NodePyATVKeys.html +27 -27
  29. package/docs/reference/enums/NodePyATVListenerState.html +8 -8
  30. package/docs/reference/enums/NodePyATVMediaType.html +8 -8
  31. package/docs/reference/enums/NodePyATVPowerState.html +6 -6
  32. package/docs/reference/enums/NodePyATVProtocol.html +8 -8
  33. package/docs/reference/enums/NodePyATVRepeatState.html +7 -7
  34. package/docs/reference/enums/NodePyATVShuffleState.html +7 -7
  35. package/docs/reference/index.html +8 -5
  36. package/docs/reference/interfaces/NodePyATVDeviceOptions.html +55 -20
  37. package/docs/reference/interfaces/NodePyATVFindAndInstanceOptions.html +18 -18
  38. package/docs/reference/interfaces/NodePyATVFindOptions.html +13 -13
  39. package/docs/reference/interfaces/NodePyATVGetStateOptions.html +5 -5
  40. package/docs/reference/interfaces/NodePyATVInstanceOptions.html +9 -9
  41. package/docs/reference/interfaces/NodePyATVService.html +69 -0
  42. package/docs/reference/interfaces/NodePyATVState.html +19 -19
  43. package/docs/reference/interfaces/NodePyATVVersionResponse.html +6 -6
  44. package/docs/reference/modules.html +23 -8
  45. package/docs/reference/types/NodePyATVEventValueType.html +9 -6
  46. package/docs/tests/index.html +1 -1
  47. package/docs/tests/mochawesome.json +930 -602
  48. package/package.json +1 -1
  49. package/src/lib/device.ts +62 -0
  50. package/src/lib/index.ts +15 -12
  51. package/src/lib/instance.ts +8 -2
  52. package/src/lib/types.ts +26 -0
  53. package/test/device.ts +124 -1
  54. package/test/instance.ts +84 -5
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "stats": {
3
- "suites": 84,
4
- "tests": 141,
5
- "passes": 139,
3
+ "suites": 89,
4
+ "tests": 153,
5
+ "passes": 151,
6
6
  "pending": 2,
7
7
  "failures": 0,
8
- "start": "2022-07-25T14:26:48.428Z",
9
- "end": "2022-07-25T14:27:00.774Z",
10
- "duration": 12346,
11
- "testsRegistered": 141,
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.4184397163120568,
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": "dd29e13f-3f6a-4152-a52e-d9b0b449e6de",
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": "ddb1dbc1-a4c2-4551-ae80-775f12f27667",
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": "eae7c083-8eaa-4cdb-b168-da65dc0be4cb",
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",
@@ -56,15 +56,15 @@
56
56
  "context": null,
57
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": "db24a900-9785-4d78-8f8f-4dd96ed0a95e",
60
- "parentUUID": "eae7c083-8eaa-4cdb-b168-da65dc0be4cb",
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
- "db24a900-9785-4d78-8f8f-4dd96ed0a95e"
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": "7b8deb5f-c31d-4e24-9f75-d09165a9929a",
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",
@@ -95,15 +95,15 @@
95
95
  "context": null,
96
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": "929ab47e-8f17-4e6f-9814-30e7da9c41c9",
99
- "parentUUID": "7b8deb5f-c31d-4e24-9f75-d09165a9929a",
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
- "929ab47e-8f17-4e6f-9814-30e7da9c41c9"
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": "c01ec9d7-d602-4798-b2b2-fa4dcda40052",
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",
@@ -134,15 +134,15 @@
134
134
  "context": null,
135
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": "b3a43186-5800-4d23-8c1e-f871a7058dbd",
138
- "parentUUID": "c01ec9d7-d602-4798-b2b2-fa4dcda40052",
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
- "b3a43186-5800-4d23-8c1e-f871a7058dbd"
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": "8dc58f07-02f9-4433-93cb-03df77374168",
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",
@@ -173,15 +173,15 @@
173
173
  "context": null,
174
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": "d11f51e3-7b19-4170-82a3-fe08d00939bf",
177
- "parentUUID": "8dc58f07-02f9-4433-93cb-03df77374168",
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
- "d11f51e3-7b19-4170-82a3-fe08d00939bf"
184
+ "81c5c118-4e7e-4127-a74f-c7692526ccf5"
185
185
  ],
186
186
  "failures": [],
187
187
  "pending": [],
@@ -192,7 +192,7 @@
192
192
  "_timeout": 2000
193
193
  },
194
194
  {
195
- "uuid": "17688df5-320d-4c0d-a032-c5e6708cfae4",
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",
@@ -203,7 +203,7 @@
203
203
  "title": "should work",
204
204
  "fullTitle": "NodePyATVDeviceEvent get device() should work",
205
205
  "timedOut": false,
206
- "duration": 0,
206
+ "duration": 1,
207
207
  "state": "passed",
208
208
  "speed": "fast",
209
209
  "pass": true,
@@ -212,20 +212,20 @@
212
212
  "context": null,
213
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": "fdc3367a-2677-490b-9801-e0a0a9214303",
216
- "parentUUID": "17688df5-320d-4c0d-a032-c5e6708cfae4",
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
- "fdc3367a-2677-490b-9801-e0a0a9214303"
223
+ "dbb84c45-8bd4-44b2-b9c8-3914d6a2aeb9"
224
224
  ],
225
225
  "failures": [],
226
226
  "pending": [],
227
227
  "skipped": [],
228
- "duration": 0,
228
+ "duration": 1,
229
229
  "root": false,
230
230
  "rootEmpty": false,
231
231
  "_timeout": 2000
@@ -241,7 +241,7 @@
241
241
  "_timeout": 2000
242
242
  },
243
243
  {
244
- "uuid": "40694d53-6eab-4ad5-a07e-73d948393792",
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": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
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,7 +261,7 @@
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,
@@ -270,8 +270,8 @@
270
270
  "context": null,
271
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": "30c96378-c5d4-4bad-a992-826b3c3df5cd",
274
- "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
273
+ "uuid": "7d4b85e5-f7e4-478b-938f-6f4f31d7d661",
274
+ "parentUUID": "a8174a53-c177-44b6-8436-508bc589ac4c",
275
275
  "isHook": false,
276
276
  "skipped": false
277
277
  },
@@ -279,7 +279,7 @@
279
279
  "title": "should emit update event",
280
280
  "fullTitle": "NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update event",
281
281
  "timedOut": false,
282
- "duration": 3,
282
+ "duration": 2,
283
283
  "state": "passed",
284
284
  "speed": "fast",
285
285
  "pass": true,
@@ -288,8 +288,8 @@
288
288
  "context": null,
289
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": "caac5b8e-e1ce-49b3-97c0-55d3408ce1a8",
292
- "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
291
+ "uuid": "580d8fbb-9835-461d-b2fe-fafe01a65cb3",
292
+ "parentUUID": "a8174a53-c177-44b6-8436-508bc589ac4c",
293
293
  "isHook": false,
294
294
  "skipped": false
295
295
  },
@@ -306,8 +306,8 @@
306
306
  "context": null,
307
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": "8e688c0a-28f9-4d65-9d54-99632dc5f2d1",
310
- "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
309
+ "uuid": "82f49465-c9a3-48b5-ae70-92c332c7ca48",
310
+ "parentUUID": "a8174a53-c177-44b6-8436-508bc589ac4c",
311
311
  "isHook": false,
312
312
  "skipped": false
313
313
  },
@@ -324,8 +324,8 @@
324
324
  "context": null,
325
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": "06fb2f51-5c28-464a-88e5-771e0bf521b7",
328
- "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
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,7 +333,7 @@
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,
@@ -342,8 +342,8 @@
342
342
  "context": null,
343
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": "632be728-816f-4406-a297-9d6eb0e8098b",
346
- "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
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,7 +351,7 @@
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,
@@ -360,8 +360,8 @@
360
360
  "context": null,
361
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": "87437cb3-6e62-4008-8028-aa74d14e0c7b",
364
- "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
363
+ "uuid": "4ad60679-687f-4a48-be40-0cb4b9114e29",
364
+ "parentUUID": "a8174a53-c177-44b6-8436-508bc589ac4c",
365
365
  "isHook": false,
366
366
  "skipped": false
367
367
  },
@@ -378,32 +378,32 @@
378
378
  "context": null,
379
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": "a9519411-6ba8-426f-accd-c8dd9bd832ac",
382
- "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
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
- "30c96378-c5d4-4bad-a992-826b3c3df5cd",
390
- "caac5b8e-e1ce-49b3-97c0-55d3408ce1a8",
391
- "8e688c0a-28f9-4d65-9d54-99632dc5f2d1",
392
- "06fb2f51-5c28-464a-88e5-771e0bf521b7",
393
- "632be728-816f-4406-a297-9d6eb0e8098b",
394
- "87437cb3-6e62-4008-8028-aa74d14e0c7b",
395
- "a9519411-6ba8-426f-accd-c8dd9bd832ac"
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": "60e89aad-0caf-4c48-bd53-897a92ead49c",
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",
@@ -423,8 +423,8 @@
423
423
  "context": null,
424
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": "3b10bf7a-b00f-4940-8d39-2b895816883e",
427
- "parentUUID": "60e89aad-0caf-4c48-bd53-897a92ead49c",
426
+ "uuid": "4babde79-9c2c-42c9-938a-2ca876db2c84",
427
+ "parentUUID": "455a96bc-00c8-4181-8042-05337105ca9c",
428
428
  "isHook": false,
429
429
  "skipped": false
430
430
  },
@@ -432,7 +432,7 @@
432
432
  "title": "should emit error on stderr data",
433
433
  "fullTitle": "NodePyATVDeviceEvents start|stopListening() should emit error on stderr data",
434
434
  "timedOut": false,
435
- "duration": 1,
435
+ "duration": 2,
436
436
  "state": "passed",
437
437
  "speed": "fast",
438
438
  "pass": true,
@@ -441,8 +441,8 @@
441
441
  "context": null,
442
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": "d0dbc2c2-b7eb-4000-82ef-85c539b67a00",
445
- "parentUUID": "60e89aad-0caf-4c48-bd53-897a92ead49c",
444
+ "uuid": "0ede0b64-9586-45ac-92ef-c05c29d051e2",
445
+ "parentUUID": "455a96bc-00c8-4181-8042-05337105ca9c",
446
446
  "isHook": false,
447
447
  "skipped": false
448
448
  },
@@ -450,7 +450,7 @@
450
450
  "title": "should emit error if stdout is not valid json",
451
451
  "fullTitle": "NodePyATVDeviceEvents start|stopListening() should emit error if stdout is not valid json",
452
452
  "timedOut": false,
453
- "duration": 2,
453
+ "duration": 1,
454
454
  "state": "passed",
455
455
  "speed": "fast",
456
456
  "pass": true,
@@ -459,8 +459,8 @@
459
459
  "context": null,
460
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": "72b38aae-08aa-49ce-9719-831a36328454",
463
- "parentUUID": "60e89aad-0caf-4c48-bd53-897a92ead49c",
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,21 +477,21 @@
477
477
  "context": null,
478
478
  "code": "",
479
479
  "err": {},
480
- "uuid": "fc6c2580-02f9-4c2d-bb46-e55971937987",
481
- "parentUUID": "60e89aad-0caf-4c48-bd53-897a92ead49c",
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
- "3b10bf7a-b00f-4940-8d39-2b895816883e",
489
- "d0dbc2c2-b7eb-4000-82ef-85c539b67a00",
490
- "72b38aae-08aa-49ce-9719-831a36328454"
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
- "fc6c2580-02f9-4c2d-bb46-e55971937987"
494
+ "d1a55f6c-7d15-43dc-91e2-a195079a6392"
495
495
  ],
496
496
  "skipped": [],
497
497
  "duration": 4,
@@ -500,7 +500,7 @@
500
500
  "_timeout": 2000
501
501
  },
502
502
  {
503
- "uuid": "ec1f8c41-0382-4807-a2c9-9ecae3938900",
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",
@@ -520,15 +520,15 @@
520
520
  "context": null,
521
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": "35de0910-574e-4c66-9c0d-69a84984633a",
524
- "parentUUID": "ec1f8c41-0382-4807-a2c9-9ecae3938900",
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
- "35de0910-574e-4c66-9c0d-69a84984633a"
531
+ "eb44f254-3ce0-41bd-91c6-8255e6ad7c09"
532
532
  ],
533
533
  "failures": [],
534
534
  "pending": [],
@@ -539,7 +539,7 @@
539
539
  "_timeout": 2000
540
540
  },
541
541
  {
542
- "uuid": "a8d9bd4e-5aca-4711-b7ae-0bf67a6e6870",
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",
@@ -559,15 +559,15 @@
559
559
  "context": null,
560
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": "d76a086e-7803-46e7-ac1b-4026c9303211",
563
- "parentUUID": "a8d9bd4e-5aca-4711-b7ae-0bf67a6e6870",
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
- "d76a086e-7803-46e7-ac1b-4026c9303211"
570
+ "07c37cdc-026c-42cb-8de7-7d14f5706c47"
571
571
  ],
572
572
  "failures": [],
573
573
  "pending": [],
@@ -578,7 +578,7 @@
578
578
  "_timeout": 2000
579
579
  },
580
580
  {
581
- "uuid": "0bef725a-bd32-417f-8dc6-e7d6c62bfc67",
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,7 +589,7 @@
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,
@@ -598,26 +598,26 @@
598
598
  "context": null,
599
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": "55d2587c-bc7f-459a-8294-24338108fa46",
602
- "parentUUID": "0bef725a-bd32-417f-8dc6-e7d6c62bfc67",
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
- "55d2587c-bc7f-459a-8294-24338108fa46"
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": "e2797a04-ca3c-416f-a86d-a9acfcda9fea",
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",
@@ -637,15 +637,15 @@
637
637
  "context": null,
638
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": "0a1eb2fb-7c74-4dd9-9632-df0f356a8e90",
641
- "parentUUID": "e2797a04-ca3c-416f-a86d-a9acfcda9fea",
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
- "0a1eb2fb-7c74-4dd9-9632-df0f356a8e90"
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": "b29ecbf5-09c8-43e5-93a2-d30ce731b2b4",
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",
@@ -676,15 +676,15 @@
676
676
  "context": null,
677
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": "ca860ba4-508d-4e14-85f0-68ebf03a1ba7",
680
- "parentUUID": "b29ecbf5-09c8-43e5-93a2-d30ce731b2b4",
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
- "ca860ba4-508d-4e14-85f0-68ebf03a1ba7"
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": "c4026188-be6f-43c9-b6c5-bf10c4e7716d",
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",
@@ -715,15 +715,15 @@
715
715
  "context": null,
716
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": "82f99c68-eee8-4c2f-8b58-2f88c2e02ec1",
719
- "parentUUID": "c4026188-be6f-43c9-b6c5-bf10c4e7716d",
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
- "82f99c68-eee8-4c2f-8b58-2f88c2e02ec1"
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": "0e9220f0-2f26-4a28-b1cf-14526c506638",
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",
@@ -754,15 +754,15 @@
754
754
  "context": null,
755
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": "adf826b4-e197-4885-804f-3a38ffbcffe5",
758
- "parentUUID": "0e9220f0-2f26-4a28-b1cf-14526c506638",
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
- "adf826b4-e197-4885-804f-3a38ffbcffe5"
765
+ "bf1124f0-d4d3-4a3d-bf39-2575974895e5"
766
766
  ],
767
767
  "failures": [],
768
768
  "pending": [],
@@ -773,7 +773,7 @@
773
773
  "_timeout": 2000
774
774
  },
775
775
  {
776
- "uuid": "47d0eca7-3345-4692-ba52-e3a120693e8b",
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",
@@ -784,7 +784,7 @@
784
784
  "title": "should work",
785
785
  "fullTitle": "NodePyATVDeviceEvents prependOnceListener() should work",
786
786
  "timedOut": false,
787
- "duration": 0,
787
+ "duration": 1,
788
788
  "state": "passed",
789
789
  "speed": "fast",
790
790
  "pass": true,
@@ -793,26 +793,26 @@
793
793
  "context": null,
794
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": "52ee3ea7-5878-40eb-b860-4bc0197c39de",
797
- "parentUUID": "47d0eca7-3345-4692-ba52-e3a120693e8b",
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
- "52ee3ea7-5878-40eb-b860-4bc0197c39de"
804
+ "edadeed9-435e-4cd1-9ce6-d5944988fb9d"
805
805
  ],
806
806
  "failures": [],
807
807
  "pending": [],
808
808
  "skipped": [],
809
- "duration": 0,
809
+ "duration": 1,
810
810
  "root": false,
811
811
  "rootEmpty": false,
812
812
  "_timeout": 2000
813
813
  },
814
814
  {
815
- "uuid": "f918c6e3-80fd-4ee0-bb2f-cb67422d15e3",
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,7 +823,7 @@
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,
@@ -832,26 +832,26 @@
832
832
  "context": null,
833
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": "149b2b85-8db1-4ec8-ba0f-700b11c1900c",
836
- "parentUUID": "f918c6e3-80fd-4ee0-bb2f-cb67422d15e3",
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
- "149b2b85-8db1-4ec8-ba0f-700b11c1900c"
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": "ceffe928-1e0a-4a2b-b3cf-1615c4ac873c",
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",
@@ -871,15 +871,15 @@
871
871
  "context": null,
872
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": "b85e76f3-fcaa-4757-9265-7cfbb489a9f3",
875
- "parentUUID": "ceffe928-1e0a-4a2b-b3cf-1615c4ac873c",
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
- "b85e76f3-fcaa-4757-9265-7cfbb489a9f3"
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": "f4094e12-45c6-4658-a69b-e35067f1f69f",
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": "ded76159-e029-49c7-8944-bdff244d59c4",
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",
@@ -929,15 +929,15 @@
929
929
  "context": null,
930
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": "3a4117c4-27ee-4867-9c52-89ea6c4282e7",
933
- "parentUUID": "ded76159-e029-49c7-8944-bdff244d59c4",
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
- "3a4117c4-27ee-4867-9c52-89ea6c4282e7"
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": "27307faf-2636-41af-b87b-3f2a1fc9ef8d",
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",
@@ -968,15 +968,15 @@
968
968
  "context": null,
969
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": "d65a45c3-531f-45fa-89fd-4c626a8c99d0",
972
- "parentUUID": "27307faf-2636-41af-b87b-3f2a1fc9ef8d",
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
- "d65a45c3-531f-45fa-89fd-4c626a8c99d0"
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": "7c11d259-3882-4166-b51c-1c01a2ad66f2",
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",
@@ -998,7 +998,7 @@
998
998
  "title": "should return the id",
999
999
  "fullTitle": "NodePyATVDevice get id() should return the id",
1000
1000
  "timedOut": false,
1001
- "duration": 1,
1001
+ "duration": 0,
1002
1002
  "state": "passed",
1003
1003
  "speed": "fast",
1004
1004
  "pass": true,
@@ -1007,26 +1007,26 @@
1007
1007
  "context": null,
1008
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": "6f05b623-409b-4455-98fd-3de398ff74d3",
1011
- "parentUUID": "7c11d259-3882-4166-b51c-1c01a2ad66f2",
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
- "6f05b623-409b-4455-98fd-3de398ff74d3"
1018
+ "357c3abd-20f5-4922-be39-2d2d18682a8d"
1019
1019
  ],
1020
1020
  "failures": [],
1021
1021
  "pending": [],
1022
1022
  "skipped": [],
1023
- "duration": 1,
1023
+ "duration": 0,
1024
1024
  "root": false,
1025
1025
  "rootEmpty": false,
1026
1026
  "_timeout": 2000
1027
1027
  },
1028
1028
  {
1029
- "uuid": "f90bba2b-7b32-4b1c-9a8e-0f7338da2c83",
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",
@@ -1046,15 +1046,247 @@
1046
1046
  "context": null,
1047
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
1048
  "err": {},
1049
- "uuid": "3974e5ec-5412-4c0c-b350-9c36058a8c29",
1050
- "parentUUID": "f90bba2b-7b32-4b1c-9a8e-0f7338da2c83",
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",
1051
1282
  "isHook": false,
1052
1283
  "skipped": false
1053
1284
  }
1054
1285
  ],
1055
1286
  "suites": [],
1056
1287
  "passes": [
1057
- "3974e5ec-5412-4c0c-b350-9c36058a8c29"
1288
+ "4867332b-3409-4009-8a97-9f8d3f2da25f",
1289
+ "8e59bd39-5069-48cb-8869-ba55102d9453"
1058
1290
  ],
1059
1291
  "failures": [],
1060
1292
  "pending": [],
@@ -1065,7 +1297,65 @@
1065
1297
  "_timeout": 2000
1066
1298
  },
1067
1299
  {
1068
- "uuid": "b71c84e8-8486-4819-8596-588d280ae067",
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]);",
1319
+ "err": {},
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",
1340
+ "isHook": false,
1341
+ "skipped": false
1342
+ }
1343
+ ],
1344
+ "suites": [],
1345
+ "passes": [
1346
+ "c9624bd1-785d-45e9-869a-ec01ad988916",
1347
+ "55a13248-45d2-42f3-b749-0b069a338eb6"
1348
+ ],
1349
+ "failures": [],
1350
+ "pending": [],
1351
+ "skipped": [],
1352
+ "duration": 0,
1353
+ "root": false,
1354
+ "rootEmpty": false,
1355
+ "_timeout": 2000
1356
+ },
1357
+ {
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",
@@ -1085,8 +1375,8 @@
1085
1375
  "context": null,
1086
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": "dcb875cf-04c5-4668-81fa-faf6bfe2c785",
1089
- "parentUUID": "b71c84e8-8486-4819-8596-588d280ae067",
1378
+ "uuid": "a0e4a971-d587-4787-b76c-f21b680dcd0c",
1379
+ "parentUUID": "41c91686-c317-46c5-a365-0ab5bc61dcc0",
1090
1380
  "isHook": false,
1091
1381
  "skipped": false
1092
1382
  },
@@ -1103,8 +1393,8 @@
1103
1393
  "context": null,
1104
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": "fe66d414-d0a5-49b7-a6c1-a1bfb6931da1",
1107
- "parentUUID": "b71c84e8-8486-4819-8596-588d280ae067",
1396
+ "uuid": "6e912e42-8f2c-43ea-ad42-e4afdf290ae3",
1397
+ "parentUUID": "41c91686-c317-46c5-a365-0ab5bc61dcc0",
1108
1398
  "isHook": false,
1109
1399
  "skipped": false
1110
1400
  },
@@ -1121,17 +1411,17 @@
1121
1411
  "context": null,
1122
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": "32c0ca7b-f124-4d99-a7cd-108d385ed09b",
1125
- "parentUUID": "b71c84e8-8486-4819-8596-588d280ae067",
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
- "dcb875cf-04c5-4668-81fa-faf6bfe2c785",
1133
- "fe66d414-d0a5-49b7-a6c1-a1bfb6931da1",
1134
- "32c0ca7b-f124-4d99-a7cd-108d385ed09b"
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": [],
@@ -1142,7 +1432,7 @@
1142
1432
  "_timeout": 2000
1143
1433
  },
1144
1434
  {
1145
- "uuid": "8b8d6c3a-a3ce-4305-bc1e-b1830ce480b4",
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",
@@ -1162,8 +1452,8 @@
1162
1452
  "context": null,
1163
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": "3efa7c07-28ba-4df2-a6e1-5582f04f1846",
1166
- "parentUUID": "8b8d6c3a-a3ce-4305-bc1e-b1830ce480b4",
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,7 +1461,7 @@
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,
@@ -1180,8 +1470,8 @@
1180
1470
  "context": null,
1181
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": "aee7b885-bc5a-4281-818b-d59c512277da",
1184
- "parentUUID": "8b8d6c3a-a3ce-4305-bc1e-b1830ce480b4",
1473
+ "uuid": "b54a3089-87b1-4dea-ae5d-fbbf8ef2dba9",
1474
+ "parentUUID": "22612185-8b69-4fac-b700-67010899c7db",
1185
1475
  "isHook": false,
1186
1476
  "skipped": false
1187
1477
  },
@@ -1189,7 +1479,7 @@
1189
1479
  "title": "should work for debug = undefined",
1190
1480
  "fullTitle": "NodePyATVDevice set debug() should work for debug = undefined",
1191
1481
  "timedOut": false,
1192
- "duration": 1,
1482
+ "duration": 0,
1193
1483
  "state": "passed",
1194
1484
  "speed": "fast",
1195
1485
  "pass": true,
@@ -1198,8 +1488,8 @@
1198
1488
  "context": null,
1199
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": "d44366bf-d5d6-4e3b-b983-2284a7a2270a",
1202
- "parentUUID": "8b8d6c3a-a3ce-4305-bc1e-b1830ce480b4",
1491
+ "uuid": "043a27ad-638a-478d-a4c9-9bd918ad3812",
1492
+ "parentUUID": "22612185-8b69-4fac-b700-67010899c7db",
1203
1493
  "isHook": false,
1204
1494
  "skipped": false
1205
1495
  },
@@ -1216,18 +1506,18 @@
1216
1506
  "context": null,
1217
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": "cf0edc15-f327-4152-a411-209d9041c8d8",
1220
- "parentUUID": "8b8d6c3a-a3ce-4305-bc1e-b1830ce480b4",
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
- "3efa7c07-28ba-4df2-a6e1-5582f04f1846",
1228
- "aee7b885-bc5a-4281-818b-d59c512277da",
1229
- "d44366bf-d5d6-4e3b-b983-2284a7a2270a",
1230
- "cf0edc15-f327-4152-a411-209d9041c8d8"
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": [],
@@ -1238,7 +1528,7 @@
1238
1528
  "_timeout": 2000
1239
1529
  },
1240
1530
  {
1241
- "uuid": "a226ad37-d68b-4396-a942-9b5af2468a47",
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",
@@ -1258,8 +1548,8 @@
1258
1548
  "context": null,
1259
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": "b2f76aa5-f77b-4c46-baa4-430e9becd544",
1262
- "parentUUID": "a226ad37-d68b-4396-a942-9b5af2468a47",
1551
+ "uuid": "f3ca6f24-36a7-443d-bd3b-408da36522aa",
1552
+ "parentUUID": "b33e351d-3273-47bd-8e1d-afceec47988e",
1263
1553
  "isHook": false,
1264
1554
  "skipped": false
1265
1555
  },
@@ -1276,16 +1566,16 @@
1276
1566
  "context": null,
1277
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": "94c35ec0-677f-4845-89c8-7598cccd6683",
1280
- "parentUUID": "a226ad37-d68b-4396-a942-9b5af2468a47",
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
- "b2f76aa5-f77b-4c46-baa4-430e9becd544",
1288
- "94c35ec0-677f-4845-89c8-7598cccd6683"
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": "8b325847-c85a-41f4-859f-4d1342775f66",
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,7 +1597,7 @@
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,
@@ -1316,26 +1606,26 @@
1316
1606
  "context": null,
1317
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": "ba8a4cbb-90e6-4175-bb40-79bc2726acc9",
1320
- "parentUUID": "8b325847-c85a-41f4-859f-4d1342775f66",
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
- "ba8a4cbb-90e6-4175-bb40-79bc2726acc9"
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": "40f52dd2-7762-4e39-a06e-d61affdefb7c",
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": "0f823f49-daa3-44bd-b996-c5040d6b3679",
1359
- "parentUUID": "40f52dd2-7762-4e39-a06e-d61affdefb7c",
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,7 +1654,7 @@
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,
@@ -1373,8 +1663,8 @@
1373
1663
  "context": null,
1374
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": "0ff949d6-b65c-4bcf-9210-ab5388c7de28",
1377
- "parentUUID": "40f52dd2-7762-4e39-a06e-d61affdefb7c",
1666
+ "uuid": "c5ecbab3-031d-44d2-b4eb-4a26ce43c8eb",
1667
+ "parentUUID": "1baac27c-cbb9-408f-bb71-3c6b6414601e",
1378
1668
  "isHook": false,
1379
1669
  "skipped": false
1380
1670
  },
@@ -1391,8 +1681,8 @@
1391
1681
  "context": null,
1392
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": "9aefae98-7165-4b7b-8fb5-7f921ecb566b",
1395
- "parentUUID": "40f52dd2-7762-4e39-a06e-d61affdefb7c",
1684
+ "uuid": "54464566-1689-4637-81e6-4df23a156654",
1685
+ "parentUUID": "1baac27c-cbb9-408f-bb71-3c6b6414601e",
1396
1686
  "isHook": false,
1397
1687
  "skipped": false
1398
1688
  },
@@ -1409,8 +1699,8 @@
1409
1699
  "context": null,
1410
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": "abbc5ead-fc66-4d38-8e5f-acd679c4fcf8",
1413
- "parentUUID": "40f52dd2-7762-4e39-a06e-d61affdefb7c",
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,7 +1708,7 @@
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,
@@ -1427,31 +1717,31 @@
1427
1717
  "context": null,
1428
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": "ed4eac82-56c3-413e-8440-660d2830844b",
1431
- "parentUUID": "40f52dd2-7762-4e39-a06e-d61affdefb7c",
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
- "0ff949d6-b65c-4bcf-9210-ab5388c7de28",
1439
- "9aefae98-7165-4b7b-8fb5-7f921ecb566b",
1440
- "abbc5ead-fc66-4d38-8e5f-acd679c4fcf8",
1441
- "ed4eac82-56c3-413e-8440-660d2830844b"
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
- "0f823f49-daa3-44bd-b996-c5040d6b3679"
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": "ce003997-c0f1-4168-9686-46f24d7efc85",
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,7 +1752,7 @@
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,
@@ -1471,26 +1761,26 @@
1471
1761
  "context": null,
1472
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": "1640259e-fdf6-404b-84a0-cd6e4bb59d23",
1475
- "parentUUID": "ce003997-c0f1-4168-9686-46f24d7efc85",
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
- "1640259e-fdf6-404b-84a0-cd6e4bb59d23"
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": "e41fa58f-7bb2-4438-84f1-967b599f726d",
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",
@@ -1510,15 +1800,15 @@
1510
1800
  "context": null,
1511
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": "4601664c-99eb-424c-bac1-f498b2a84283",
1514
- "parentUUID": "e41fa58f-7bb2-4438-84f1-967b599f726d",
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
- "4601664c-99eb-424c-bac1-f498b2a84283"
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": "37144f6c-914b-41f1-963d-4e00c89a895f",
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",
@@ -1540,7 +1830,7 @@
1540
1830
  "title": "should work",
1541
1831
  "fullTitle": "NodePyATVDevice getHash() should work",
1542
1832
  "timedOut": false,
1543
- "duration": 1,
1833
+ "duration": 2,
1544
1834
  "state": "passed",
1545
1835
  "speed": "fast",
1546
1836
  "pass": true,
@@ -1549,26 +1839,26 @@
1549
1839
  "context": null,
1550
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": "aea889ca-1c6a-4706-a99f-e194ccfa3dd5",
1553
- "parentUUID": "37144f6c-914b-41f1-963d-4e00c89a895f",
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
- "aea889ca-1c6a-4706-a99f-e194ccfa3dd5"
1850
+ "3b26cf9d-f08c-4b71-bf50-1c0290c6dad4"
1561
1851
  ],
1562
1852
  "failures": [],
1563
1853
  "pending": [],
1564
1854
  "skipped": [],
1565
- "duration": 1,
1855
+ "duration": 2,
1566
1856
  "root": false,
1567
1857
  "rootEmpty": false,
1568
1858
  "_timeout": 2000
1569
1859
  },
1570
1860
  {
1571
- "uuid": "e7d4b94e-411d-4ea2-b545-0e518093b199",
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",
@@ -1588,15 +1878,15 @@
1588
1878
  "context": null,
1589
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": "181eaca1-f540-4ba3-9265-aa6083fcc410",
1592
- "parentUUID": "e7d4b94e-411d-4ea2-b545-0e518093b199",
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
- "181eaca1-f540-4ba3-9265-aa6083fcc410"
1889
+ "da48cb19-66d3-4e8b-bf2e-e534fc59d521"
1600
1890
  ],
1601
1891
  "failures": [],
1602
1892
  "pending": [],
@@ -1607,7 +1897,7 @@
1607
1897
  "_timeout": 2000
1608
1898
  },
1609
1899
  {
1610
- "uuid": "421840d1-8639-4508-9fd9-acbc2f10cf27",
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",
@@ -1627,15 +1917,15 @@
1627
1917
  "context": null,
1628
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": "dee1a7a9-2450-44e1-ba01-564cc2da5e13",
1631
- "parentUUID": "421840d1-8639-4508-9fd9-acbc2f10cf27",
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
- "dee1a7a9-2450-44e1-ba01-564cc2da5e13"
1928
+ "023b7f72-011e-42f5-bd7c-425bbfaeb063"
1639
1929
  ],
1640
1930
  "failures": [],
1641
1931
  "pending": [],
@@ -1646,7 +1936,7 @@
1646
1936
  "_timeout": 2000
1647
1937
  },
1648
1938
  {
1649
- "uuid": "20211105-0b51-4da0-93bd-73f5141e9287",
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",
@@ -1657,7 +1947,7 @@
1657
1947
  "title": "should work",
1658
1948
  "fullTitle": "NodePyATVDevice getTitle() should work",
1659
1949
  "timedOut": false,
1660
- "duration": 1,
1950
+ "duration": 2,
1661
1951
  "state": "passed",
1662
1952
  "speed": "fast",
1663
1953
  "pass": true,
@@ -1666,26 +1956,26 @@
1666
1956
  "context": null,
1667
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": "fc12c7f2-2be4-4205-8c27-c72f4ea5341c",
1670
- "parentUUID": "20211105-0b51-4da0-93bd-73f5141e9287",
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
- "fc12c7f2-2be4-4205-8c27-c72f4ea5341c"
1967
+ "dabf92f8-28c3-454a-a946-608107e4d159"
1678
1968
  ],
1679
1969
  "failures": [],
1680
1970
  "pending": [],
1681
1971
  "skipped": [],
1682
- "duration": 1,
1972
+ "duration": 2,
1683
1973
  "root": false,
1684
1974
  "rootEmpty": false,
1685
1975
  "_timeout": 2000
1686
1976
  },
1687
1977
  {
1688
- "uuid": "f33d8973-d3af-4136-abac-79ccce02f369",
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",
@@ -1705,15 +1995,15 @@
1705
1995
  "context": null,
1706
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": "6884e45b-10a0-4644-b38e-34ccf42526ac",
1709
- "parentUUID": "f33d8973-d3af-4136-abac-79ccce02f369",
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
- "6884e45b-10a0-4644-b38e-34ccf42526ac"
2006
+ "0f969b06-7dc4-4cd4-aaf7-a0636a7fb68f"
1717
2007
  ],
1718
2008
  "failures": [],
1719
2009
  "pending": [],
@@ -1724,7 +2014,7 @@
1724
2014
  "_timeout": 2000
1725
2015
  },
1726
2016
  {
1727
- "uuid": "60c9f8f8-15b4-459f-b6d1-e2f0a3014ed9",
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",
@@ -1735,7 +2025,7 @@
1735
2025
  "title": "should work",
1736
2026
  "fullTitle": "NodePyATVDevice getAlbum() should work",
1737
2027
  "timedOut": false,
1738
- "duration": 1,
2028
+ "duration": 2,
1739
2029
  "state": "passed",
1740
2030
  "speed": "fast",
1741
2031
  "pass": true,
@@ -1744,26 +2034,26 @@
1744
2034
  "context": null,
1745
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": "7bb3cc9c-ac60-4901-9601-f3a5108b53fd",
1748
- "parentUUID": "60c9f8f8-15b4-459f-b6d1-e2f0a3014ed9",
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
- "7bb3cc9c-ac60-4901-9601-f3a5108b53fd"
2045
+ "06a6572c-6737-4027-87fd-cdb0d64c5d13"
1756
2046
  ],
1757
2047
  "failures": [],
1758
2048
  "pending": [],
1759
2049
  "skipped": [],
1760
- "duration": 1,
2050
+ "duration": 2,
1761
2051
  "root": false,
1762
2052
  "rootEmpty": false,
1763
2053
  "_timeout": 2000
1764
2054
  },
1765
2055
  {
1766
- "uuid": "50c5b95d-9c98-415f-93d0-5b57499b84d2",
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",
@@ -1783,15 +2073,15 @@
1783
2073
  "context": null,
1784
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": "1f903f73-19dc-4ba9-834d-1204bee31b81",
1787
- "parentUUID": "50c5b95d-9c98-415f-93d0-5b57499b84d2",
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
- "1f903f73-19dc-4ba9-834d-1204bee31b81"
2084
+ "a47cf005-e74d-4eea-bf55-b9bb209b4612"
1795
2085
  ],
1796
2086
  "failures": [],
1797
2087
  "pending": [],
@@ -1802,7 +2092,7 @@
1802
2092
  "_timeout": 2000
1803
2093
  },
1804
2094
  {
1805
- "uuid": "a4b1902c-171e-43ac-8662-ed66f816693f",
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,7 +2103,7 @@
1813
2103
  "title": "should work",
1814
2104
  "fullTitle": "NodePyATVDevice getTotalTime() should work",
1815
2105
  "timedOut": false,
1816
- "duration": 0,
2106
+ "duration": 2,
1817
2107
  "state": "passed",
1818
2108
  "speed": "fast",
1819
2109
  "pass": true,
@@ -1822,26 +2112,26 @@
1822
2112
  "context": null,
1823
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": "665d1d50-c44c-4226-9259-0976ca5b649b",
1826
- "parentUUID": "a4b1902c-171e-43ac-8662-ed66f816693f",
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
- "665d1d50-c44c-4226-9259-0976ca5b649b"
2123
+ "88a0c08f-b963-4c35-b386-0930f43f3736"
1834
2124
  ],
1835
2125
  "failures": [],
1836
2126
  "pending": [],
1837
2127
  "skipped": [],
1838
- "duration": 0,
2128
+ "duration": 2,
1839
2129
  "root": false,
1840
2130
  "rootEmpty": false,
1841
2131
  "_timeout": 2000
1842
2132
  },
1843
2133
  {
1844
- "uuid": "6bae371f-4724-4f0e-90ed-5d14a01827f8",
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,7 +2142,7 @@
1852
2142
  "title": "should work",
1853
2143
  "fullTitle": "NodePyATVDevice getPosition() should work",
1854
2144
  "timedOut": false,
1855
- "duration": 0,
2145
+ "duration": 1,
1856
2146
  "state": "passed",
1857
2147
  "speed": "fast",
1858
2148
  "pass": true,
@@ -1861,26 +2151,26 @@
1861
2151
  "context": null,
1862
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": "4635de02-dad3-4e9b-b2e8-281b5303661c",
1865
- "parentUUID": "6bae371f-4724-4f0e-90ed-5d14a01827f8",
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
- "4635de02-dad3-4e9b-b2e8-281b5303661c"
2162
+ "02ead937-a167-4d22-8cbc-d4124f77c1ec"
1873
2163
  ],
1874
2164
  "failures": [],
1875
2165
  "pending": [],
1876
2166
  "skipped": [],
1877
- "duration": 0,
2167
+ "duration": 1,
1878
2168
  "root": false,
1879
2169
  "rootEmpty": false,
1880
2170
  "_timeout": 2000
1881
2171
  },
1882
2172
  {
1883
- "uuid": "eb6ee3bb-3576-4bcb-8388-f31efc3f28d3",
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",
@@ -1900,15 +2190,15 @@
1900
2190
  "context": null,
1901
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": "bb820044-4ed5-4967-9a3f-ae5152946480",
1904
- "parentUUID": "eb6ee3bb-3576-4bcb-8388-f31efc3f28d3",
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
- "bb820044-4ed5-4967-9a3f-ae5152946480"
2201
+ "45294e1c-edb1-41c3-bac5-78eacb6c6e93"
1912
2202
  ],
1913
2203
  "failures": [],
1914
2204
  "pending": [],
@@ -1919,7 +2209,7 @@
1919
2209
  "_timeout": 2000
1920
2210
  },
1921
2211
  {
1922
- "uuid": "b68e0a14-7cf2-4158-b690-05fc11905498",
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,7 +2220,7 @@
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,
@@ -1939,26 +2229,26 @@
1939
2229
  "context": null,
1940
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": "38d8f4ae-700f-466b-a23a-24729490c213",
1943
- "parentUUID": "b68e0a14-7cf2-4158-b690-05fc11905498",
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
- "38d8f4ae-700f-466b-a23a-24729490c213"
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": "91fb5aa1-d4be-446d-a2a2-06097bfda498",
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",
@@ -1978,15 +2268,15 @@
1978
2268
  "context": null,
1979
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": "25a318bb-dd24-48fc-b69e-018e74e43d75",
1982
- "parentUUID": "91fb5aa1-d4be-446d-a2a2-06097bfda498",
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
- "25a318bb-dd24-48fc-b69e-018e74e43d75"
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": "7e126e75-62ab-4caa-beb6-118278b92ce8",
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",
@@ -2008,7 +2298,7 @@
2008
2298
  "title": "should work",
2009
2299
  "fullTitle": "NodePyATVDevice getAppId() should work",
2010
2300
  "timedOut": false,
2011
- "duration": 1,
2301
+ "duration": 2,
2012
2302
  "state": "passed",
2013
2303
  "speed": "fast",
2014
2304
  "pass": true,
@@ -2017,26 +2307,26 @@
2017
2307
  "context": null,
2018
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": "56775df8-53da-4bd9-ad00-b6f196681aef",
2021
- "parentUUID": "7e126e75-62ab-4caa-beb6-118278b92ce8",
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
- "56775df8-53da-4bd9-ad00-b6f196681aef"
2318
+ "844981dd-03c4-455d-a354-568865dcce27"
2029
2319
  ],
2030
2320
  "failures": [],
2031
2321
  "pending": [],
2032
2322
  "skipped": [],
2033
- "duration": 1,
2323
+ "duration": 2,
2034
2324
  "root": false,
2035
2325
  "rootEmpty": false,
2036
2326
  "_timeout": 2000
2037
2327
  },
2038
2328
  {
2039
- "uuid": "8ee61ee0-0153-4941-95ad-108931d838d4",
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",
@@ -2056,8 +2346,8 @@
2056
2346
  "context": null,
2057
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": "88306b09-499c-4bbc-a543-d00b4b87ad4f",
2060
- "parentUUID": "8ee61ee0-0153-4941-95ad-108931d838d4",
2349
+ "uuid": "c89b35d1-6956-49e5-8738-8935b1e62d65",
2350
+ "parentUUID": "38691fd8-89e9-435e-989b-f2f9e5323e43",
2061
2351
  "isHook": false,
2062
2352
  "skipped": false
2063
2353
  },
@@ -2065,7 +2355,7 @@
2065
2355
  "title": "should throw error with invalid key",
2066
2356
  "fullTitle": "NodePyATVDevice pressKey() should throw error with invalid key",
2067
2357
  "timedOut": false,
2068
- "duration": 0,
2358
+ "duration": 1,
2069
2359
  "state": "passed",
2070
2360
  "speed": "fast",
2071
2361
  "pass": true,
@@ -2074,8 +2364,8 @@
2074
2364
  "context": null,
2075
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": "132d3fec-a5d5-4b66-ae2f-eb3f07923ad5",
2078
- "parentUUID": "8ee61ee0-0153-4941-95ad-108931d838d4",
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,7 +2373,7 @@
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,
@@ -2092,17 +2382,17 @@
2092
2382
  "context": null,
2093
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": "aa61d126-29ec-4750-8ffc-f7901a1540cf",
2096
- "parentUUID": "8ee61ee0-0153-4941-95ad-108931d838d4",
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
- "88306b09-499c-4bbc-a543-d00b4b87ad4f",
2104
- "132d3fec-a5d5-4b66-ae2f-eb3f07923ad5",
2105
- "aa61d126-29ec-4750-8ffc-f7901a1540cf"
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": [],
@@ -2113,7 +2403,7 @@
2113
2403
  "_timeout": 2000
2114
2404
  },
2115
2405
  {
2116
- "uuid": "b030ddc7-50e4-4674-92c2-1c9e94a65cc8",
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",
@@ -2133,15 +2423,15 @@
2133
2423
  "context": null,
2134
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": "61c047c1-8c0d-4d1e-88ae-3fba5fdc827b",
2137
- "parentUUID": "b030ddc7-50e4-4674-92c2-1c9e94a65cc8",
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
- "61c047c1-8c0d-4d1e-88ae-3fba5fdc827b"
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": "5fb0f1fe-4e12-4ae4-bf3c-6b447f7b6cda",
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",
@@ -2163,7 +2453,7 @@
2163
2453
  "title": "should work",
2164
2454
  "fullTitle": "NodePyATVDevice home() should work",
2165
2455
  "timedOut": false,
2166
- "duration": 2,
2456
+ "duration": 1,
2167
2457
  "state": "passed",
2168
2458
  "speed": "fast",
2169
2459
  "pass": true,
@@ -2172,26 +2462,26 @@
2172
2462
  "context": null,
2173
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": "b5119016-00fe-4cc2-9ead-30e4db8961ec",
2176
- "parentUUID": "5fb0f1fe-4e12-4ae4-bf3c-6b447f7b6cda",
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
- "b5119016-00fe-4cc2-9ead-30e4db8961ec"
2473
+ "03ed9a8c-7a45-415b-9b5e-0846b98d0b92"
2184
2474
  ],
2185
2475
  "failures": [],
2186
2476
  "pending": [],
2187
2477
  "skipped": [],
2188
- "duration": 2,
2478
+ "duration": 1,
2189
2479
  "root": false,
2190
2480
  "rootEmpty": false,
2191
2481
  "_timeout": 2000
2192
2482
  },
2193
2483
  {
2194
- "uuid": "0bf0d2df-9f9a-49a0-8745-fd2d54b38619",
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",
@@ -2211,15 +2501,15 @@
2211
2501
  "context": null,
2212
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": "4637d6c9-5fd3-447c-aaa2-46c2d14380e0",
2215
- "parentUUID": "0bf0d2df-9f9a-49a0-8745-fd2d54b38619",
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
- "4637d6c9-5fd3-447c-aaa2-46c2d14380e0"
2512
+ "638b9729-a9dc-4b2e-9796-aaf73fed6a07"
2223
2513
  ],
2224
2514
  "failures": [],
2225
2515
  "pending": [],
@@ -2230,7 +2520,7 @@
2230
2520
  "_timeout": 2000
2231
2521
  },
2232
2522
  {
2233
- "uuid": "2269d42d-d13b-46c2-80e6-24e04b53a76e",
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",
@@ -2250,15 +2540,15 @@
2250
2540
  "context": null,
2251
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": "b64a65c0-02e5-4c42-b98d-60210b4e215c",
2254
- "parentUUID": "2269d42d-d13b-46c2-80e6-24e04b53a76e",
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
- "b64a65c0-02e5-4c42-b98d-60210b4e215c"
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": "a826abaf-cbb6-47d6-bc20-b1064666cd84",
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",
@@ -2289,15 +2579,15 @@
2289
2579
  "context": null,
2290
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": "f72358a9-d4a5-4625-a635-0fa3f9cbcf5e",
2293
- "parentUUID": "a826abaf-cbb6-47d6-bc20-b1064666cd84",
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
- "f72358a9-d4a5-4625-a635-0fa3f9cbcf5e"
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": "48718a16-28be-42d1-9723-ec4a99bd8543",
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,7 +2609,7 @@
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,
@@ -2328,26 +2618,26 @@
2328
2618
  "context": null,
2329
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": "6e622b58-0496-4025-8af3-e128d6fce34a",
2332
- "parentUUID": "48718a16-28be-42d1-9723-ec4a99bd8543",
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
- "6e622b58-0496-4025-8af3-e128d6fce34a"
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": "a9b71845-0074-4dcf-b899-3bca2e98fb36",
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",
@@ -2367,15 +2657,15 @@
2367
2657
  "context": null,
2368
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": "eacbde27-183a-4abc-b948-3fb9aa9156b8",
2371
- "parentUUID": "a9b71845-0074-4dcf-b899-3bca2e98fb36",
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
- "eacbde27-183a-4abc-b948-3fb9aa9156b8"
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": "86947f44-415b-41cf-8760-f2ecb085c391",
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",
@@ -2406,15 +2696,15 @@
2406
2696
  "context": null,
2407
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": "656d7e26-7b80-4dc4-b41c-69822c12fc63",
2410
- "parentUUID": "86947f44-415b-41cf-8760-f2ecb085c391",
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
- "656d7e26-7b80-4dc4-b41c-69822c12fc63"
2707
+ "bfe8383f-dc8f-4d40-a51e-26be92626750"
2418
2708
  ],
2419
2709
  "failures": [],
2420
2710
  "pending": [],
@@ -2425,7 +2715,7 @@
2425
2715
  "_timeout": 2000
2426
2716
  },
2427
2717
  {
2428
- "uuid": "508018a1-aa64-421e-9c29-8845478a02b4",
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",
@@ -2436,7 +2726,7 @@
2436
2726
  "title": "should work",
2437
2727
  "fullTitle": "NodePyATVDevice playPause() should work",
2438
2728
  "timedOut": false,
2439
- "duration": 2,
2729
+ "duration": 1,
2440
2730
  "state": "passed",
2441
2731
  "speed": "fast",
2442
2732
  "pass": true,
@@ -2445,26 +2735,26 @@
2445
2735
  "context": null,
2446
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": "fdd5da7b-d45f-4dc0-9347-67998f8f4f3b",
2449
- "parentUUID": "508018a1-aa64-421e-9c29-8845478a02b4",
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
- "fdd5da7b-d45f-4dc0-9347-67998f8f4f3b"
2746
+ "6d1de8f7-490b-4410-b48b-ff7e657f522a"
2457
2747
  ],
2458
2748
  "failures": [],
2459
2749
  "pending": [],
2460
2750
  "skipped": [],
2461
- "duration": 2,
2751
+ "duration": 1,
2462
2752
  "root": false,
2463
2753
  "rootEmpty": false,
2464
2754
  "_timeout": 2000
2465
2755
  },
2466
2756
  {
2467
- "uuid": "402a2885-d021-4c8c-acaa-44243d58a880",
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",
@@ -2484,15 +2774,15 @@
2484
2774
  "context": null,
2485
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": "e667bced-ea49-48bd-af88-a89b9b8b8e49",
2488
- "parentUUID": "402a2885-d021-4c8c-acaa-44243d58a880",
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
- "e667bced-ea49-48bd-af88-a89b9b8b8e49"
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": "9c5e4a3c-d1ce-4e66-a289-b3a3299f413a",
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",
@@ -2514,7 +2804,7 @@
2514
2804
  "title": "should work",
2515
2805
  "fullTitle": "NodePyATVDevice right() should work",
2516
2806
  "timedOut": false,
2517
- "duration": 0,
2807
+ "duration": 1,
2518
2808
  "state": "passed",
2519
2809
  "speed": "fast",
2520
2810
  "pass": true,
@@ -2523,26 +2813,26 @@
2523
2813
  "context": null,
2524
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": "e13c647d-c066-4936-b761-c05843d249f6",
2527
- "parentUUID": "9c5e4a3c-d1ce-4e66-a289-b3a3299f413a",
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
- "e13c647d-c066-4936-b761-c05843d249f6"
2824
+ "fcf2955c-0c16-4d59-a29e-04dae12bfe40"
2535
2825
  ],
2536
2826
  "failures": [],
2537
2827
  "pending": [],
2538
2828
  "skipped": [],
2539
- "duration": 0,
2829
+ "duration": 1,
2540
2830
  "root": false,
2541
2831
  "rootEmpty": false,
2542
2832
  "_timeout": 2000
2543
2833
  },
2544
2834
  {
2545
- "uuid": "745865c3-4da4-4432-a675-435bf53e1f8d",
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",
@@ -2562,15 +2852,15 @@
2562
2852
  "context": null,
2563
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": "c3df8683-a9b9-4c8b-a15a-fa1b4294564e",
2566
- "parentUUID": "745865c3-4da4-4432-a675-435bf53e1f8d",
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
- "c3df8683-a9b9-4c8b-a15a-fa1b4294564e"
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": "8baacd39-c741-4ea3-b83f-fbc3ee7b0ee6",
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,7 +2882,7 @@
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,
@@ -2601,26 +2891,26 @@
2601
2891
  "context": null,
2602
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": "988ec041-22b4-4621-a51f-092bed6ff6a3",
2605
- "parentUUID": "8baacd39-c741-4ea3-b83f-fbc3ee7b0ee6",
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
- "988ec041-22b4-4621-a51f-092bed6ff6a3"
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": "7b55928c-3f79-41ac-a419-653b8a8f29b2",
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",
@@ -2640,15 +2930,15 @@
2640
2930
  "context": null,
2641
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": "de218702-2418-4277-bfa1-0f67202e8877",
2644
- "parentUUID": "7b55928c-3f79-41ac-a419-653b8a8f29b2",
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
- "de218702-2418-4277-bfa1-0f67202e8877"
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": "39f55e93-9a0a-4cee-ab8e-fc8b580690bc",
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",
@@ -2679,15 +2969,15 @@
2679
2969
  "context": null,
2680
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": "e366bb2d-70bf-4402-8993-3bf6323ddbb4",
2683
- "parentUUID": "39f55e93-9a0a-4cee-ab8e-fc8b580690bc",
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
- "e366bb2d-70bf-4402-8993-3bf6323ddbb4"
2980
+ "9d37eb27-a5bd-4cbe-9a8c-524f0b904e10"
2691
2981
  ],
2692
2982
  "failures": [],
2693
2983
  "pending": [],
@@ -2698,7 +2988,7 @@
2698
2988
  "_timeout": 2000
2699
2989
  },
2700
2990
  {
2701
- "uuid": "d38a2eef-b0c0-4956-b400-392778910b6c",
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",
@@ -2718,15 +3008,15 @@
2718
3008
  "context": null,
2719
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": "3b96b47f-729e-4713-a809-61e5038d0eae",
2722
- "parentUUID": "d38a2eef-b0c0-4956-b400-392778910b6c",
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
- "3b96b47f-729e-4713-a809-61e5038d0eae"
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": "d281cadf-fcb6-45f4-ad48-b2c0c812b1b7",
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,7 +3038,7 @@
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,
@@ -2757,26 +3047,26 @@
2757
3047
  "context": null,
2758
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": "6e91ec51-ee90-4a12-a812-c7c44f98dc69",
2761
- "parentUUID": "d281cadf-fcb6-45f4-ad48-b2c0c812b1b7",
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
- "6e91ec51-ee90-4a12-a812-c7c44f98dc69"
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": "e0b77d25-00fe-44d5-9afa-8e2580468131",
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",
@@ -2796,15 +3086,15 @@
2796
3086
  "context": null,
2797
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": "bf4a7baf-3361-4f47-8431-31b3158a444b",
2800
- "parentUUID": "e0b77d25-00fe-44d5-9afa-8e2580468131",
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
- "bf4a7baf-3361-4f47-8431-31b3158a444b"
3097
+ "d3799292-2cc5-434e-8dbb-d1f39cdd36ff"
2808
3098
  ],
2809
3099
  "failures": [],
2810
3100
  "pending": [],
@@ -2815,7 +3105,7 @@
2815
3105
  "_timeout": 2000
2816
3106
  },
2817
3107
  {
2818
- "uuid": "c9a3b06c-9908-4887-b2c5-071ed18e150f",
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",
@@ -2835,15 +3125,15 @@
2835
3125
  "context": null,
2836
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": "a849b8b3-88f6-42dd-827d-1ec7d08167b3",
2839
- "parentUUID": "c9a3b06c-9908-4887-b2c5-071ed18e150f",
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
- "a849b8b3-88f6-42dd-827d-1ec7d08167b3"
3136
+ "294dd404-e0b6-47c0-8be7-e9fa451b0888"
2847
3137
  ],
2848
3138
  "failures": [],
2849
3139
  "pending": [],
@@ -2854,7 +3144,7 @@
2854
3144
  "_timeout": 2000
2855
3145
  },
2856
3146
  {
2857
- "uuid": "2f30fdd6-58ce-40bb-b509-f6bc0abe6390",
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,7 +3155,7 @@
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,
@@ -2874,26 +3164,26 @@
2874
3164
  "context": null,
2875
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": "b52ef3a4-3299-4239-be08-e4e00ce3bb32",
2878
- "parentUUID": "2f30fdd6-58ce-40bb-b509-f6bc0abe6390",
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
- "b52ef3a4-3299-4239-be08-e4e00ce3bb32"
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": "9dc73ddb-cbab-45cf-b226-0920031c1a21",
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",
@@ -2904,7 +3194,7 @@
2904
3194
  "title": "should work",
2905
3195
  "fullTitle": "NodePyATVDevice wakeup() should work",
2906
3196
  "timedOut": false,
2907
- "duration": 2,
3197
+ "duration": 1,
2908
3198
  "state": "passed",
2909
3199
  "speed": "fast",
2910
3200
  "pass": true,
@@ -2913,26 +3203,26 @@
2913
3203
  "context": null,
2914
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": "cf0a9877-320c-4e5e-99b7-ce4985b39298",
2917
- "parentUUID": "9dc73ddb-cbab-45cf-b226-0920031c1a21",
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
- "cf0a9877-320c-4e5e-99b7-ce4985b39298"
3214
+ "4674c412-98c0-4ce5-992d-18424c9639c4"
2925
3215
  ],
2926
3216
  "failures": [],
2927
3217
  "pending": [],
2928
3218
  "skipped": [],
2929
- "duration": 2,
3219
+ "duration": 1,
2930
3220
  "root": false,
2931
3221
  "rootEmpty": false,
2932
3222
  "_timeout": 2000
2933
3223
  },
2934
3224
  {
2935
- "uuid": "df9805b7-a332-497b-a06e-460ca55fd4f6",
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",
@@ -2952,15 +3242,15 @@
2952
3242
  "context": null,
2953
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": "5c87d3d0-0a59-42a3-8966-d8c5c7d9efe0",
2956
- "parentUUID": "df9805b7-a332-497b-a06e-460ca55fd4f6",
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
- "5c87d3d0-0a59-42a3-8966-d8c5c7d9efe0"
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": "64a617e5-5a15-4408-94de-276a1969363b",
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",
@@ -2991,15 +3281,15 @@
2991
3281
  "context": null,
2992
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": "44293958-ce07-4593-bccb-374de2e16c41",
2995
- "parentUUID": "64a617e5-5a15-4408-94de-276a1969363b",
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
- "44293958-ce07-4593-bccb-374de2e16c41"
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": "f9200ee5-c175-470b-a030-72c38cb2e580",
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": "e9c39d19-769c-4b49-9040-0748323a7068",
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,7 +3330,7 @@
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": 784,
3333
+ "duration": 521,
3044
3334
  "state": "passed",
3045
3335
  "speed": "slow",
3046
3336
  "pass": true,
@@ -3049,8 +3339,8 @@
3049
3339
  "context": null,
3050
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": "f35d59a4-3999-44dc-b9d4-a6425e2de98c",
3053
- "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3342
+ "uuid": "ab5f0c3a-1ca1-42b1-b840-ba72a5e94690",
3343
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3054
3344
  "isHook": false,
3055
3345
  "skipped": false
3056
3346
  },
@@ -3058,7 +3348,7 @@
3058
3348
  "title": "should return the pyatv version",
3059
3349
  "fullTitle": "NodePyATVInstance static version() should return the pyatv version",
3060
3350
  "timedOut": false,
3061
- "duration": 2,
3351
+ "duration": 1,
3062
3352
  "state": "passed",
3063
3353
  "speed": "fast",
3064
3354
  "pass": true,
@@ -3067,8 +3357,8 @@
3067
3357
  "context": null,
3068
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": "6d2acfd9-8386-481e-95b3-014235131336",
3071
- "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3360
+ "uuid": "ba7827b4-9e28-4679-9ea6-d6efa90237f4",
3361
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3072
3362
  "isHook": false,
3073
3363
  "skipped": false
3074
3364
  },
@@ -3076,7 +3366,7 @@
3076
3366
  "title": "should return the module version",
3077
3367
  "fullTitle": "NodePyATVInstance static version() should return the module version",
3078
3368
  "timedOut": false,
3079
- "duration": 2,
3369
+ "duration": 1,
3080
3370
  "state": "passed",
3081
3371
  "speed": "fast",
3082
3372
  "pass": true,
@@ -3085,8 +3375,8 @@
3085
3375
  "context": null,
3086
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": "4a4ee74f-972a-4f48-8694-47c0e4432081",
3089
- "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3378
+ "uuid": "7a446270-fff6-47dc-b0ab-ce0fabb036cf",
3379
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3090
3380
  "isHook": false,
3091
3381
  "skipped": false
3092
3382
  },
@@ -3103,8 +3393,8 @@
3103
3393
  "context": null,
3104
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": "92be38ce-e586-4105-bcc6-c69b402c1227",
3107
- "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3396
+ "uuid": "f34bcd84-01f3-4c87-8429-a2847b816044",
3397
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3108
3398
  "isHook": false,
3109
3399
  "skipped": false
3110
3400
  },
@@ -3112,7 +3402,7 @@
3112
3402
  "title": "should work with option.debug = true",
3113
3403
  "fullTitle": "NodePyATVInstance static version() should work with option.debug = true",
3114
3404
  "timedOut": false,
3115
- "duration": 1,
3405
+ "duration": 2,
3116
3406
  "state": "passed",
3117
3407
  "speed": "fast",
3118
3408
  "pass": true,
@@ -3121,8 +3411,8 @@
3121
3411
  "context": null,
3122
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": "64c57a26-6dd7-49ef-90fb-c49cf47696b2",
3125
- "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3414
+ "uuid": "b5e92442-fe6b-42e2-91f9-8e8b2e2e5107",
3415
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3126
3416
  "isHook": false,
3127
3417
  "skipped": false
3128
3418
  },
@@ -3130,7 +3420,7 @@
3130
3420
  "title": "should work with option.noColors",
3131
3421
  "fullTitle": "NodePyATVInstance static version() should work with option.noColors",
3132
3422
  "timedOut": false,
3133
- "duration": 1,
3423
+ "duration": 2,
3134
3424
  "state": "passed",
3135
3425
  "speed": "fast",
3136
3426
  "pass": true,
@@ -3139,8 +3429,8 @@
3139
3429
  "context": null,
3140
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": "c0c84d63-4fc9-4971-930e-e70e95e6b380",
3143
- "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
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,7 +3438,7 @@
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,
@@ -3157,8 +3447,8 @@
3157
3447
  "context": null,
3158
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": "01706946-bc92-49cd-b141-398fd52d54d8",
3161
- "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3450
+ "uuid": "97dc8fb5-3850-44fe-b3a3-329411286e97",
3451
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3162
3452
  "isHook": false,
3163
3453
  "skipped": false
3164
3454
  },
@@ -3175,8 +3465,8 @@
3175
3465
  "context": null,
3176
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": "0b7157c7-5bbe-4e26-ae80-09b9e235f2bc",
3179
- "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
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,7 +3474,7 @@
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,
3477
+ "duration": 2,
3188
3478
  "state": "passed",
3189
3479
  "speed": "fast",
3190
3480
  "pass": true,
@@ -3193,34 +3483,34 @@
3193
3483
  "context": null,
3194
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});",
3195
3485
  "err": {},
3196
- "uuid": "7b7c11b8-2de0-4383-aec9-7b8cec84986c",
3197
- "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3486
+ "uuid": "00e73ddf-b759-4521-bb2b-9a9ab6555855",
3487
+ "parentUUID": "090e4832-de61-42ce-bff1-b8d78dbaacf2",
3198
3488
  "isHook": false,
3199
3489
  "skipped": false
3200
3490
  }
3201
3491
  ],
3202
3492
  "suites": [],
3203
3493
  "passes": [
3204
- "f35d59a4-3999-44dc-b9d4-a6425e2de98c",
3205
- "6d2acfd9-8386-481e-95b3-014235131336",
3206
- "4a4ee74f-972a-4f48-8694-47c0e4432081",
3207
- "92be38ce-e586-4105-bcc6-c69b402c1227",
3208
- "64c57a26-6dd7-49ef-90fb-c49cf47696b2",
3209
- "c0c84d63-4fc9-4971-930e-e70e95e6b380",
3210
- "01706946-bc92-49cd-b141-398fd52d54d8",
3211
- "0b7157c7-5bbe-4e26-ae80-09b9e235f2bc",
3212
- "7b7c11b8-2de0-4383-aec9-7b8cec84986c"
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"
3213
3503
  ],
3214
3504
  "failures": [],
3215
3505
  "pending": [],
3216
3506
  "skipped": [],
3217
- "duration": 795,
3507
+ "duration": 534,
3218
3508
  "root": false,
3219
3509
  "rootEmpty": false,
3220
3510
  "_timeout": 2000
3221
3511
  },
3222
3512
  {
3223
- "uuid": "4c6dc800-8ee7-4ea7-8d33-a25e6f44dc8e",
3513
+ "uuid": "d99b51c0-e173-4137-8979-38d0a6851a0b",
3224
3514
  "title": "static check()",
3225
3515
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3226
3516
  "file": "/test/instance.ts",
@@ -3231,7 +3521,7 @@
3231
3521
  "title": "should resolve in test environment [L]",
3232
3522
  "fullTitle": "NodePyATVInstance static check() should resolve in test environment [L]",
3233
3523
  "timedOut": false,
3234
- "duration": 5919,
3524
+ "duration": 5835,
3235
3525
  "state": "passed",
3236
3526
  "speed": "slow",
3237
3527
  "pass": true,
@@ -3240,8 +3530,8 @@
3240
3530
  "context": null,
3241
3531
  "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(12000);\n yield NodePyATVInstance.check();\n});",
3242
3532
  "err": {},
3243
- "uuid": "f0e7a89c-88cf-4cbf-b920-56378740fb2c",
3244
- "parentUUID": "4c6dc800-8ee7-4ea7-8d33-a25e6f44dc8e",
3533
+ "uuid": "71657004-9970-48e4-8cb1-2479e454b26f",
3534
+ "parentUUID": "d99b51c0-e173-4137-8979-38d0a6851a0b",
3245
3535
  "isHook": false,
3246
3536
  "skipped": false
3247
3537
  },
@@ -3249,7 +3539,7 @@
3249
3539
  "title": "should return nice error message if pyatv was not found",
3250
3540
  "fullTitle": "NodePyATVInstance static check() should return nice error message if pyatv was not found",
3251
3541
  "timedOut": false,
3252
- "duration": 3,
3542
+ "duration": 2,
3253
3543
  "state": "passed",
3254
3544
  "speed": "fast",
3255
3545
  "pass": true,
@@ -3258,8 +3548,8 @@
3258
3548
  "context": null,
3259
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});",
3260
3550
  "err": {},
3261
- "uuid": "6ab3782e-a7fe-4369-8af3-ca1bcd08dc8f",
3262
- "parentUUID": "4c6dc800-8ee7-4ea7-8d33-a25e6f44dc8e",
3551
+ "uuid": "8fb699d7-a5c4-4864-8769-79e2eac5a428",
3552
+ "parentUUID": "d99b51c0-e173-4137-8979-38d0a6851a0b",
3263
3553
  "isHook": false,
3264
3554
  "skipped": false
3265
3555
  },
@@ -3276,8 +3566,8 @@
3276
3566
  "context": null,
3277
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});",
3278
3568
  "err": {},
3279
- "uuid": "fc358bcc-d55a-46b1-b3c5-e06828b962e3",
3280
- "parentUUID": "4c6dc800-8ee7-4ea7-8d33-a25e6f44dc8e",
3569
+ "uuid": "0ecc3104-d3de-4709-b0dc-83136c7be32b",
3570
+ "parentUUID": "d99b51c0-e173-4137-8979-38d0a6851a0b",
3281
3571
  "isHook": false,
3282
3572
  "skipped": false
3283
3573
  },
@@ -3294,29 +3584,29 @@
3294
3584
  "context": null,
3295
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});",
3296
3586
  "err": {},
3297
- "uuid": "0b0ce079-dab2-4734-b611-da1a38882df2",
3298
- "parentUUID": "4c6dc800-8ee7-4ea7-8d33-a25e6f44dc8e",
3587
+ "uuid": "4a8dac9d-7a76-42f7-8ce0-f22e6232b315",
3588
+ "parentUUID": "d99b51c0-e173-4137-8979-38d0a6851a0b",
3299
3589
  "isHook": false,
3300
3590
  "skipped": false
3301
3591
  }
3302
3592
  ],
3303
3593
  "suites": [],
3304
3594
  "passes": [
3305
- "f0e7a89c-88cf-4cbf-b920-56378740fb2c",
3306
- "6ab3782e-a7fe-4369-8af3-ca1bcd08dc8f",
3307
- "fc358bcc-d55a-46b1-b3c5-e06828b962e3",
3308
- "0b0ce079-dab2-4734-b611-da1a38882df2"
3595
+ "71657004-9970-48e4-8cb1-2479e454b26f",
3596
+ "8fb699d7-a5c4-4864-8769-79e2eac5a428",
3597
+ "0ecc3104-d3de-4709-b0dc-83136c7be32b",
3598
+ "4a8dac9d-7a76-42f7-8ce0-f22e6232b315"
3309
3599
  ],
3310
3600
  "failures": [],
3311
3601
  "pending": [],
3312
3602
  "skipped": [],
3313
- "duration": 5927,
3603
+ "duration": 5842,
3314
3604
  "root": false,
3315
3605
  "rootEmpty": false,
3316
3606
  "_timeout": 2000
3317
3607
  },
3318
3608
  {
3319
- "uuid": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3609
+ "uuid": "851073f2-2490-4119-80a1-35ec098d8afa",
3320
3610
  "title": "static find()",
3321
3611
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3322
3612
  "file": "/test/instance.ts",
@@ -3327,7 +3617,7 @@
3327
3617
  "title": "should work [L]",
3328
3618
  "fullTitle": "NodePyATVInstance static find() should work [L]",
3329
3619
  "timedOut": false,
3330
- "duration": 5439,
3620
+ "duration": 5421,
3331
3621
  "state": "passed",
3332
3622
  "speed": "slow",
3333
3623
  "pass": true,
@@ -3336,8 +3626,8 @@
3336
3626
  "context": null,
3337
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});",
3338
3628
  "err": {},
3339
- "uuid": "871ba256-aeab-4ee9-ae03-ba48506220d0",
3340
- "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3629
+ "uuid": "b528f3ae-9b3e-48d0-8a54-08bddfcc502d",
3630
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3341
3631
  "isHook": false,
3342
3632
  "skipped": false
3343
3633
  },
@@ -3345,7 +3635,7 @@
3345
3635
  "title": "should handle option.atvscriptPath",
3346
3636
  "fullTitle": "NodePyATVInstance static find() should handle option.atvscriptPath",
3347
3637
  "timedOut": false,
3348
- "duration": 1,
3638
+ "duration": 2,
3349
3639
  "state": "passed",
3350
3640
  "speed": "fast",
3351
3641
  "pass": true,
@@ -3354,8 +3644,8 @@
3354
3644
  "context": null,
3355
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});",
3356
3646
  "err": {},
3357
- "uuid": "ab7a7e9c-31e2-4928-a9e9-e3258fc67b8f",
3358
- "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3647
+ "uuid": "4ec49899-037b-4b62-a4b0-753e57283e8b",
3648
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3359
3649
  "isHook": false,
3360
3650
  "skipped": false
3361
3651
  },
@@ -3372,8 +3662,8 @@
3372
3662
  "context": null,
3373
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});",
3374
3664
  "err": {},
3375
- "uuid": "64a10e18-79bf-4865-9d74-c23c2689125e",
3376
- "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3665
+ "uuid": "80bd4f52-e882-421e-b265-5a83b8541938",
3666
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3377
3667
  "isHook": false,
3378
3668
  "skipped": false
3379
3669
  },
@@ -3381,7 +3671,7 @@
3381
3671
  "title": "should throw error on error",
3382
3672
  "fullTitle": "NodePyATVInstance static find() should throw error on error",
3383
3673
  "timedOut": false,
3384
- "duration": 2,
3674
+ "duration": 1,
3385
3675
  "state": "passed",
3386
3676
  "speed": "fast",
3387
3677
  "pass": true,
@@ -3390,8 +3680,8 @@
3390
3680
  "context": null,
3391
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});",
3392
3682
  "err": {},
3393
- "uuid": "b0000b9a-2d45-42ae-9b3c-c6fba21b1766",
3394
- "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3683
+ "uuid": "4be1701e-11ef-404d-b157-18d6d45b2342",
3684
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3395
3685
  "isHook": false,
3396
3686
  "skipped": false
3397
3687
  },
@@ -3399,7 +3689,7 @@
3399
3689
  "title": "should throw error if atvscript result is not valid json",
3400
3690
  "fullTitle": "NodePyATVInstance static find() should throw error if atvscript result is not valid json",
3401
3691
  "timedOut": false,
3402
- "duration": 1,
3692
+ "duration": 2,
3403
3693
  "state": "passed",
3404
3694
  "speed": "fast",
3405
3695
  "pass": true,
@@ -3408,8 +3698,8 @@
3408
3698
  "context": null,
3409
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});",
3410
3700
  "err": {},
3411
- "uuid": "084b77a9-f343-4cf6-8d48-1471f236d732",
3412
- "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3701
+ "uuid": "78343953-fde3-4ca6-b2f9-09d12414a457",
3702
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3413
3703
  "isHook": false,
3414
3704
  "skipped": false
3415
3705
  },
@@ -3417,7 +3707,7 @@
3417
3707
  "title": "should throw error if atvscript result is not successfull",
3418
3708
  "fullTitle": "NodePyATVInstance static find() should throw error if atvscript result is not successfull",
3419
3709
  "timedOut": false,
3420
- "duration": 2,
3710
+ "duration": 1,
3421
3711
  "state": "passed",
3422
3712
  "speed": "fast",
3423
3713
  "pass": true,
@@ -3426,8 +3716,8 @@
3426
3716
  "context": null,
3427
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});",
3428
3718
  "err": {},
3429
- "uuid": "822a4855-b6c5-4bc4-9065-52a3bedff7d2",
3430
- "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3719
+ "uuid": "e0dfa098-872a-41a2-9e61-f936a4f7f9e0",
3720
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3431
3721
  "isHook": false,
3432
3722
  "skipped": false
3433
3723
  },
@@ -3435,7 +3725,7 @@
3435
3725
  "title": "should throw error if atvscript result is without device array",
3436
3726
  "fullTitle": "NodePyATVInstance static find() should throw error if atvscript result is without device array",
3437
3727
  "timedOut": false,
3438
- "duration": 0,
3728
+ "duration": 2,
3439
3729
  "state": "passed",
3440
3730
  "speed": "fast",
3441
3731
  "pass": true,
@@ -3444,32 +3734,70 @@
3444
3734
  "context": null,
3445
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});",
3446
3736
  "err": {},
3447
- "uuid": "136c7589-409b-4b80-8fbb-bbe45ad33adc",
3448
- "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
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,
3746
+ "duration": 1,
3747
+ "state": "passed",
3748
+ "speed": "fast",
3749
+ "pass": true,
3750
+ "fail": false,
3751
+ "pending": false,
3752
+ "context": null,
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});",
3772
+ "err": {},
3773
+ "uuid": "03513a77-3fc3-4156-a18a-8aec35ddaf0c",
3774
+ "parentUUID": "851073f2-2490-4119-80a1-35ec098d8afa",
3449
3775
  "isHook": false,
3450
3776
  "skipped": false
3451
3777
  }
3452
3778
  ],
3453
3779
  "suites": [],
3454
3780
  "passes": [
3455
- "871ba256-aeab-4ee9-ae03-ba48506220d0",
3456
- "ab7a7e9c-31e2-4928-a9e9-e3258fc67b8f",
3457
- "64a10e18-79bf-4865-9d74-c23c2689125e",
3458
- "b0000b9a-2d45-42ae-9b3c-c6fba21b1766",
3459
- "084b77a9-f343-4cf6-8d48-1471f236d732",
3460
- "822a4855-b6c5-4bc4-9065-52a3bedff7d2",
3461
- "136c7589-409b-4b80-8fbb-bbe45ad33adc"
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"
3462
3790
  ],
3463
3791
  "failures": [],
3464
3792
  "pending": [],
3465
3793
  "skipped": [],
3466
- "duration": 5447,
3794
+ "duration": 5434,
3467
3795
  "root": false,
3468
3796
  "rootEmpty": false,
3469
3797
  "_timeout": 2000
3470
3798
  },
3471
3799
  {
3472
- "uuid": "5ffef56b-03f3-4c46-8820-37d7cea792db",
3800
+ "uuid": "07ab515f-a0c3-4391-a3d1-48ec82395496",
3473
3801
  "title": "static device()",
3474
3802
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3475
3803
  "file": "/test/instance.ts",
@@ -3489,15 +3817,15 @@
3489
3817
  "context": null,
3490
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');",
3491
3819
  "err": {},
3492
- "uuid": "b725b74f-7b80-4a5c-85b8-9fcfebd3fad5",
3493
- "parentUUID": "5ffef56b-03f3-4c46-8820-37d7cea792db",
3820
+ "uuid": "3b47b23e-4096-4316-9781-b431a585d002",
3821
+ "parentUUID": "07ab515f-a0c3-4391-a3d1-48ec82395496",
3494
3822
  "isHook": false,
3495
3823
  "skipped": false
3496
3824
  }
3497
3825
  ],
3498
3826
  "suites": [],
3499
3827
  "passes": [
3500
- "b725b74f-7b80-4a5c-85b8-9fcfebd3fad5"
3828
+ "3b47b23e-4096-4316-9781-b431a585d002"
3501
3829
  ],
3502
3830
  "failures": [],
3503
3831
  "pending": [],
@@ -3508,7 +3836,7 @@
3508
3836
  "_timeout": 2000
3509
3837
  },
3510
3838
  {
3511
- "uuid": "23da45fc-6f18-4b6f-bc30-6165c380f048",
3839
+ "uuid": "17d8357d-e005-4454-a457-89a50eceef9a",
3512
3840
  "title": "version()",
3513
3841
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3514
3842
  "file": "/test/instance.ts",
@@ -3528,15 +3856,15 @@
3528
3856
  "context": null,
3529
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});",
3530
3858
  "err": {},
3531
- "uuid": "ebf4bb9e-db58-461a-8882-95734cf185c1",
3532
- "parentUUID": "23da45fc-6f18-4b6f-bc30-6165c380f048",
3859
+ "uuid": "35327520-0a9c-4d47-9caa-c9be325af9bc",
3860
+ "parentUUID": "17d8357d-e005-4454-a457-89a50eceef9a",
3533
3861
  "isHook": false,
3534
3862
  "skipped": false
3535
3863
  }
3536
3864
  ],
3537
3865
  "suites": [],
3538
3866
  "passes": [
3539
- "ebf4bb9e-db58-461a-8882-95734cf185c1"
3867
+ "35327520-0a9c-4d47-9caa-c9be325af9bc"
3540
3868
  ],
3541
3869
  "failures": [],
3542
3870
  "pending": [],
@@ -3547,7 +3875,7 @@
3547
3875
  "_timeout": 2000
3548
3876
  },
3549
3877
  {
3550
- "uuid": "8efe4569-9ebd-4324-b47d-ab2cf179d7e3",
3878
+ "uuid": "59a89e21-e64d-48d4-93db-d4bac2826874",
3551
3879
  "title": "check()",
3552
3880
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3553
3881
  "file": "/test/instance.ts",
@@ -3567,15 +3895,15 @@
3567
3895
  "context": null,
3568
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});",
3569
3897
  "err": {},
3570
- "uuid": "03fbd701-1e87-434a-93c8-cd0b447d9a5d",
3571
- "parentUUID": "8efe4569-9ebd-4324-b47d-ab2cf179d7e3",
3898
+ "uuid": "bb571aa9-1cb9-4529-915f-3f123082801d",
3899
+ "parentUUID": "59a89e21-e64d-48d4-93db-d4bac2826874",
3572
3900
  "isHook": false,
3573
3901
  "skipped": false
3574
3902
  }
3575
3903
  ],
3576
3904
  "suites": [],
3577
3905
  "passes": [
3578
- "03fbd701-1e87-434a-93c8-cd0b447d9a5d"
3906
+ "bb571aa9-1cb9-4529-915f-3f123082801d"
3579
3907
  ],
3580
3908
  "failures": [],
3581
3909
  "pending": [],
@@ -3586,7 +3914,7 @@
3586
3914
  "_timeout": 2000
3587
3915
  },
3588
3916
  {
3589
- "uuid": "08d47edd-d0ac-41ef-8d12-be394eb556de",
3917
+ "uuid": "e2b9695a-2816-42ab-bd6a-b2f7cf1b2eaf",
3590
3918
  "title": "find()",
3591
3919
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3592
3920
  "file": "/test/instance.ts",
@@ -3606,15 +3934,15 @@
3606
3934
  "context": null,
3607
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});",
3608
3936
  "err": {},
3609
- "uuid": "65e54c7f-13fa-4a16-820a-312796793c73",
3610
- "parentUUID": "08d47edd-d0ac-41ef-8d12-be394eb556de",
3937
+ "uuid": "eeecb453-d0b0-451c-8197-64474a6ee423",
3938
+ "parentUUID": "e2b9695a-2816-42ab-bd6a-b2f7cf1b2eaf",
3611
3939
  "isHook": false,
3612
3940
  "skipped": false
3613
3941
  }
3614
3942
  ],
3615
3943
  "suites": [],
3616
3944
  "passes": [
3617
- "65e54c7f-13fa-4a16-820a-312796793c73"
3945
+ "eeecb453-d0b0-451c-8197-64474a6ee423"
3618
3946
  ],
3619
3947
  "failures": [],
3620
3948
  "pending": [],
@@ -3625,7 +3953,7 @@
3625
3953
  "_timeout": 2000
3626
3954
  },
3627
3955
  {
3628
- "uuid": "dd2b7c93-465f-48a7-9765-6fdcbb68c8ed",
3956
+ "uuid": "ac14fbc7-66f4-4f0e-8296-2a1c749354ca",
3629
3957
  "title": "device()",
3630
3958
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3631
3959
  "file": "/test/instance.ts",
@@ -3645,15 +3973,15 @@
3645
3973
  "context": null,
3646
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});",
3647
3975
  "err": {},
3648
- "uuid": "980b11e4-02fe-4846-b2c5-1b5b5835139a",
3649
- "parentUUID": "dd2b7c93-465f-48a7-9765-6fdcbb68c8ed",
3976
+ "uuid": "1a789f31-bc22-453d-ba48-a24b975502b7",
3977
+ "parentUUID": "ac14fbc7-66f4-4f0e-8296-2a1c749354ca",
3650
3978
  "isHook": false,
3651
3979
  "skipped": false
3652
3980
  }
3653
3981
  ],
3654
3982
  "suites": [],
3655
3983
  "passes": [
3656
- "980b11e4-02fe-4846-b2c5-1b5b5835139a"
3984
+ "1a789f31-bc22-453d-ba48-a24b975502b7"
3657
3985
  ],
3658
3986
  "failures": [],
3659
3987
  "pending": [],
@@ -3664,7 +3992,7 @@
3664
3992
  "_timeout": 2000
3665
3993
  },
3666
3994
  {
3667
- "uuid": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
3995
+ "uuid": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3668
3996
  "title": "Type Exports",
3669
3997
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3670
3998
  "file": "/test/instance.ts",
@@ -3684,8 +4012,8 @@
3684
4012
  "context": null,
3685
4013
  "code": "assert.ok(NodePyATVProtocol);",
3686
4014
  "err": {},
3687
- "uuid": "aedc1f97-1495-4ea8-8245-14dc8cc7551a",
3688
- "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
4015
+ "uuid": "93e53b82-10e5-4163-b8da-4f57836f39ed",
4016
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3689
4017
  "isHook": false,
3690
4018
  "skipped": false
3691
4019
  },
@@ -3702,8 +4030,8 @@
3702
4030
  "context": null,
3703
4031
  "code": "assert.ok(NodePyATVMediaType);",
3704
4032
  "err": {},
3705
- "uuid": "ef401fbc-d937-4dd1-bb98-9c00d251c59a",
3706
- "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
4033
+ "uuid": "0970efe9-43b0-4b34-bac2-536638b02983",
4034
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3707
4035
  "isHook": false,
3708
4036
  "skipped": false
3709
4037
  },
@@ -3720,8 +4048,8 @@
3720
4048
  "context": null,
3721
4049
  "code": "assert.ok(NodePyATVDeviceEvent);",
3722
4050
  "err": {},
3723
- "uuid": "afd2dc21-049d-4d72-907f-c32aed3a875a",
3724
- "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
4051
+ "uuid": "d1d312a9-05c9-4b3a-bd17-0d65cc6bcac9",
4052
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3725
4053
  "isHook": false,
3726
4054
  "skipped": false
3727
4055
  },
@@ -3738,8 +4066,8 @@
3738
4066
  "context": null,
3739
4067
  "code": "assert.ok(NodePyATVDeviceState);",
3740
4068
  "err": {},
3741
- "uuid": "d42df1b1-68e1-49fa-a641-476e2a06d5df",
3742
- "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
4069
+ "uuid": "41afc5e8-9d40-4e59-badb-29469d1c8d36",
4070
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3743
4071
  "isHook": false,
3744
4072
  "skipped": false
3745
4073
  },
@@ -3756,8 +4084,8 @@
3756
4084
  "context": null,
3757
4085
  "code": "assert.ok(NodePyATVRepeatState);",
3758
4086
  "err": {},
3759
- "uuid": "fbd36b08-d9bc-4ca4-85ca-b75521ee2ea0",
3760
- "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
4087
+ "uuid": "c96454a1-93c2-40f1-8a74-cbf6ab7cdea0",
4088
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3761
4089
  "isHook": false,
3762
4090
  "skipped": false
3763
4091
  },
@@ -3774,8 +4102,8 @@
3774
4102
  "context": null,
3775
4103
  "code": "assert.ok(NodePyATVShuffleState);",
3776
4104
  "err": {},
3777
- "uuid": "c0668b92-575e-46ca-b493-253330cc57f4",
3778
- "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
4105
+ "uuid": "264a0756-3189-4969-b403-9503fe3ba462",
4106
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3779
4107
  "isHook": false,
3780
4108
  "skipped": false
3781
4109
  },
@@ -3792,8 +4120,8 @@
3792
4120
  "context": null,
3793
4121
  "code": "assert.ok(NodePyATVKeys);",
3794
4122
  "err": {},
3795
- "uuid": "3c300c3e-2015-4673-af61-7f4d3635aefd",
3796
- "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
4123
+ "uuid": "f514053a-62a7-431e-8b29-8580c83df0df",
4124
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3797
4125
  "isHook": false,
3798
4126
  "skipped": false
3799
4127
  },
@@ -3801,7 +4129,7 @@
3801
4129
  "title": "Type NodePyATVInstanceOptions should be exported",
3802
4130
  "fullTitle": "NodePyATVInstance Type Exports Type NodePyATVInstanceOptions should be exported",
3803
4131
  "timedOut": false,
3804
- "duration": 1,
4132
+ "duration": 0,
3805
4133
  "state": "passed",
3806
4134
  "speed": "fast",
3807
4135
  "pass": true,
@@ -3810,8 +4138,8 @@
3810
4138
  "context": null,
3811
4139
  "code": "assert.ok(NodePyATVListenerState);",
3812
4140
  "err": {},
3813
- "uuid": "b3689777-8721-4056-a50c-6ae30ea8e2b8",
3814
- "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
4141
+ "uuid": "106d2da9-bc8c-4ca7-a762-f49920c2db19",
4142
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3815
4143
  "isHook": false,
3816
4144
  "skipped": false
3817
4145
  },
@@ -3828,28 +4156,28 @@
3828
4156
  "context": null,
3829
4157
  "code": "assert.ok(NodePyATVPowerState);",
3830
4158
  "err": {},
3831
- "uuid": "6e4f5b98-41a9-433d-b749-8df15f74ae24",
3832
- "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
4159
+ "uuid": "9804449d-038c-4f2f-9f52-490df6c41492",
4160
+ "parentUUID": "da06ea57-a12e-4538-98e2-e66706c04d5c",
3833
4161
  "isHook": false,
3834
4162
  "skipped": false
3835
4163
  }
3836
4164
  ],
3837
4165
  "suites": [],
3838
4166
  "passes": [
3839
- "aedc1f97-1495-4ea8-8245-14dc8cc7551a",
3840
- "ef401fbc-d937-4dd1-bb98-9c00d251c59a",
3841
- "afd2dc21-049d-4d72-907f-c32aed3a875a",
3842
- "d42df1b1-68e1-49fa-a641-476e2a06d5df",
3843
- "fbd36b08-d9bc-4ca4-85ca-b75521ee2ea0",
3844
- "c0668b92-575e-46ca-b493-253330cc57f4",
3845
- "3c300c3e-2015-4673-af61-7f4d3635aefd",
3846
- "b3689777-8721-4056-a50c-6ae30ea8e2b8",
3847
- "6e4f5b98-41a9-433d-b749-8df15f74ae24"
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"
3848
4176
  ],
3849
4177
  "failures": [],
3850
4178
  "pending": [],
3851
4179
  "skipped": [],
3852
- "duration": 1,
4180
+ "duration": 0,
3853
4181
  "root": false,
3854
4182
  "rootEmpty": false,
3855
4183
  "_timeout": 2000
@@ -3865,7 +4193,7 @@
3865
4193
  "_timeout": 2000
3866
4194
  },
3867
4195
  {
3868
- "uuid": "586f9c71-4275-4867-830b-c76b91e948f3",
4196
+ "uuid": "aafcba3e-007b-48b5-8d38-95a3e994fb9b",
3869
4197
  "title": "Tools",
3870
4198
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
3871
4199
  "file": "/test/tools.ts",
@@ -3874,7 +4202,7 @@
3874
4202
  "tests": [],
3875
4203
  "suites": [
3876
4204
  {
3877
- "uuid": "40c89ef4-5e57-4e9c-96b5-08a8cf01bf6c",
4205
+ "uuid": "a4434259-769f-4bc7-9f67-1164e240a75d",
3878
4206
  "title": "addRequestId() / removeRequestId()",
3879
4207
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
3880
4208
  "file": "/test/tools.ts",
@@ -3894,8 +4222,8 @@
3894
4222
  "context": null,
3895
4223
  "code": "const id = addRequestId();\nassert.strictEqual(typeof id, 'string');\nremoveRequestId(id);",
3896
4224
  "err": {},
3897
- "uuid": "c53e0ab5-9b61-4c9d-b237-e3dad7e3acbc",
3898
- "parentUUID": "40c89ef4-5e57-4e9c-96b5-08a8cf01bf6c",
4225
+ "uuid": "24514ef3-be8f-4ec5-843d-79d8e9cf867f",
4226
+ "parentUUID": "a4434259-769f-4bc7-9f67-1164e240a75d",
3899
4227
  "isHook": false,
3900
4228
  "skipped": false
3901
4229
  },
@@ -3912,16 +4240,16 @@
3912
4240
  "context": null,
3913
4241
  "code": "removeRequestId('FOO');",
3914
4242
  "err": {},
3915
- "uuid": "21f32a1b-f5b4-498c-9208-35b6ba4ff6b0",
3916
- "parentUUID": "40c89ef4-5e57-4e9c-96b5-08a8cf01bf6c",
4243
+ "uuid": "601b08b0-2f6d-4d39-90b0-e9ec976c7389",
4244
+ "parentUUID": "a4434259-769f-4bc7-9f67-1164e240a75d",
3917
4245
  "isHook": false,
3918
4246
  "skipped": false
3919
4247
  }
3920
4248
  ],
3921
4249
  "suites": [],
3922
4250
  "passes": [
3923
- "c53e0ab5-9b61-4c9d-b237-e3dad7e3acbc",
3924
- "21f32a1b-f5b4-498c-9208-35b6ba4ff6b0"
4251
+ "24514ef3-be8f-4ec5-843d-79d8e9cf867f",
4252
+ "601b08b0-2f6d-4d39-90b0-e9ec976c7389"
3925
4253
  ],
3926
4254
  "failures": [],
3927
4255
  "pending": [],
@@ -3932,7 +4260,7 @@
3932
4260
  "_timeout": 2000
3933
4261
  },
3934
4262
  {
3935
- "uuid": "4a225b60-12c5-4efa-939f-a6652e90d8e4",
4263
+ "uuid": "15c85a06-3d78-46a7-bd1b-a78959d7bbe1",
3936
4264
  "title": "debug()",
3937
4265
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
3938
4266
  "file": "/test/tools.ts",
@@ -3952,8 +4280,8 @@
3952
4280
  "context": null,
3953
4281
  "code": "debug('TEST', 'Hello World.', {});",
3954
4282
  "err": {},
3955
- "uuid": "228d1ac5-96b8-4405-8456-1bdc13012fe3",
3956
- "parentUUID": "4a225b60-12c5-4efa-939f-a6652e90d8e4",
4283
+ "uuid": "e56a3db1-50d2-4375-af45-4e26cd5e842f",
4284
+ "parentUUID": "15c85a06-3d78-46a7-bd1b-a78959d7bbe1",
3957
4285
  "isHook": false,
3958
4286
  "skipped": false
3959
4287
  },
@@ -3970,8 +4298,8 @@
3970
4298
  "context": null,
3971
4299
  "code": "debug('TEST', 'Hello World.', { debug: true });",
3972
4300
  "err": {},
3973
- "uuid": "a6860a86-eb2c-4b27-8579-0abaeba1b54f",
3974
- "parentUUID": "4a225b60-12c5-4efa-939f-a6652e90d8e4",
4301
+ "uuid": "bd14be38-0ab6-40e2-9d51-9923387959ce",
4302
+ "parentUUID": "15c85a06-3d78-46a7-bd1b-a78959d7bbe1",
3975
4303
  "isHook": false,
3976
4304
  "skipped": false
3977
4305
  },
@@ -3988,8 +4316,8 @@
3988
4316
  "context": null,
3989
4317
  "code": "debug('TEST', 'Hello World.', {\n debug: function (msg) {\n assert.strictEqual(this, null);\n assert.ok(msg.includes('Hello World'));\n }\n});",
3990
4318
  "err": {},
3991
- "uuid": "347b88b9-37d6-4bc9-b33d-20b44b988047",
3992
- "parentUUID": "4a225b60-12c5-4efa-939f-a6652e90d8e4",
4319
+ "uuid": "1516d2df-f570-47ae-8a38-1d5eb0dc940c",
4320
+ "parentUUID": "15c85a06-3d78-46a7-bd1b-a78959d7bbe1",
3993
4321
  "isHook": false,
3994
4322
  "skipped": false
3995
4323
  },
@@ -4006,8 +4334,8 @@
4006
4334
  "context": null,
4007
4335
  "code": "debug('TEST', 'Hello World.', { noColors: true });",
4008
4336
  "err": {},
4009
- "uuid": "28d25d3a-99a4-41ff-ac23-bdd45c83f5f1",
4010
- "parentUUID": "4a225b60-12c5-4efa-939f-a6652e90d8e4",
4337
+ "uuid": "1b3d258b-66da-437d-9a80-04a9a83197e8",
4338
+ "parentUUID": "15c85a06-3d78-46a7-bd1b-a78959d7bbe1",
4011
4339
  "isHook": false,
4012
4340
  "skipped": false
4013
4341
  },
@@ -4024,19 +4352,19 @@
4024
4352
  "context": null,
4025
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});",
4026
4354
  "err": {},
4027
- "uuid": "8e76c99e-c979-490a-a1fe-6ddb0c65e4fb",
4028
- "parentUUID": "4a225b60-12c5-4efa-939f-a6652e90d8e4",
4355
+ "uuid": "84a263ea-c4b1-4d47-84f6-e6b93a1d5b28",
4356
+ "parentUUID": "15c85a06-3d78-46a7-bd1b-a78959d7bbe1",
4029
4357
  "isHook": false,
4030
4358
  "skipped": false
4031
4359
  }
4032
4360
  ],
4033
4361
  "suites": [],
4034
4362
  "passes": [
4035
- "228d1ac5-96b8-4405-8456-1bdc13012fe3",
4036
- "a6860a86-eb2c-4b27-8579-0abaeba1b54f",
4037
- "347b88b9-37d6-4bc9-b33d-20b44b988047",
4038
- "28d25d3a-99a4-41ff-ac23-bdd45c83f5f1",
4039
- "8e76c99e-c979-490a-a1fe-6ddb0c65e4fb"
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"
4040
4368
  ],
4041
4369
  "failures": [],
4042
4370
  "pending": [],
@@ -4047,7 +4375,7 @@
4047
4375
  "_timeout": 2000
4048
4376
  },
4049
4377
  {
4050
- "uuid": "8af5cad0-f38b-4d95-9754-830b81fdd1a6",
4378
+ "uuid": "53687b02-097c-4625-bb8f-37ac3c5141a7",
4051
4379
  "title": "getExecutable()",
4052
4380
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
4053
4381
  "file": "/test/tools.ts",
@@ -4067,8 +4395,8 @@
4067
4395
  "context": null,
4068
4396
  "code": "const result = getExecutable(NodePyATVExecutableType.atvremote, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert.strictEqual(result, '/tmp/1');",
4069
4397
  "err": {},
4070
- "uuid": "e79ce043-641d-455d-8744-55903082a14b",
4071
- "parentUUID": "8af5cad0-f38b-4d95-9754-830b81fdd1a6",
4398
+ "uuid": "83ef0353-862c-48f3-a77e-1314994c2bb7",
4399
+ "parentUUID": "53687b02-097c-4625-bb8f-37ac3c5141a7",
4072
4400
  "isHook": false,
4073
4401
  "skipped": false
4074
4402
  },
@@ -4076,7 +4404,7 @@
4076
4404
  "title": "should handle atvscriptPath if set",
4077
4405
  "fullTitle": "Tools getExecutable() should handle atvscriptPath if set",
4078
4406
  "timedOut": false,
4079
- "duration": 1,
4407
+ "duration": 0,
4080
4408
  "state": "passed",
4081
4409
  "speed": "fast",
4082
4410
  "pass": true,
@@ -4085,8 +4413,8 @@
4085
4413
  "context": null,
4086
4414
  "code": "const result = getExecutable(NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert.strictEqual(result, '/tmp/2');",
4087
4415
  "err": {},
4088
- "uuid": "ad840fe8-c84f-44e6-9df0-e6aa77013630",
4089
- "parentUUID": "8af5cad0-f38b-4d95-9754-830b81fdd1a6",
4416
+ "uuid": "302a363c-5421-451f-9094-dedd4d3266be",
4417
+ "parentUUID": "53687b02-097c-4625-bb8f-37ac3c5141a7",
4090
4418
  "isHook": false,
4091
4419
  "skipped": false
4092
4420
  },
@@ -4103,8 +4431,8 @@
4103
4431
  "context": null,
4104
4432
  "code": "const result = getExecutable(NodePyATVExecutableType.atvremote, {\n atvscriptPath: '/tmp'\n});\nassert.strictEqual(result, 'atvremote');",
4105
4433
  "err": {},
4106
- "uuid": "8d87c226-d104-40c3-b6f0-f8e1a378e684",
4107
- "parentUUID": "8af5cad0-f38b-4d95-9754-830b81fdd1a6",
4434
+ "uuid": "7cbeb252-0bf7-46b9-addd-fd61091f7e68",
4435
+ "parentUUID": "53687b02-097c-4625-bb8f-37ac3c5141a7",
4108
4436
  "isHook": false,
4109
4437
  "skipped": false
4110
4438
  },
@@ -4121,29 +4449,29 @@
4121
4449
  "context": null,
4122
4450
  "code": "const result = getExecutable(NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp'\n});\nassert.strictEqual(result, 'atvscript');",
4123
4451
  "err": {},
4124
- "uuid": "87a9cb57-3f96-4780-adc0-fdaf1c9ae038",
4125
- "parentUUID": "8af5cad0-f38b-4d95-9754-830b81fdd1a6",
4452
+ "uuid": "aae55009-3e4a-4170-a8c8-868fa0610e5a",
4453
+ "parentUUID": "53687b02-097c-4625-bb8f-37ac3c5141a7",
4126
4454
  "isHook": false,
4127
4455
  "skipped": false
4128
4456
  }
4129
4457
  ],
4130
4458
  "suites": [],
4131
4459
  "passes": [
4132
- "e79ce043-641d-455d-8744-55903082a14b",
4133
- "ad840fe8-c84f-44e6-9df0-e6aa77013630",
4134
- "8d87c226-d104-40c3-b6f0-f8e1a378e684",
4135
- "87a9cb57-3f96-4780-adc0-fdaf1c9ae038"
4460
+ "83ef0353-862c-48f3-a77e-1314994c2bb7",
4461
+ "302a363c-5421-451f-9094-dedd4d3266be",
4462
+ "7cbeb252-0bf7-46b9-addd-fd61091f7e68",
4463
+ "aae55009-3e4a-4170-a8c8-868fa0610e5a"
4136
4464
  ],
4137
4465
  "failures": [],
4138
4466
  "pending": [],
4139
4467
  "skipped": [],
4140
- "duration": 1,
4468
+ "duration": 0,
4141
4469
  "root": false,
4142
4470
  "rootEmpty": false,
4143
4471
  "_timeout": 2000
4144
4472
  },
4145
4473
  {
4146
- "uuid": "f29233d4-3a81-40dd-8c77-4f0ac42dab54",
4474
+ "uuid": "daf57355-7f9a-419e-8b94-e0afeccbf527",
4147
4475
  "title": "getParameters()",
4148
4476
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
4149
4477
  "file": "/test/tools.ts",
@@ -4154,7 +4482,7 @@
4154
4482
  "title": "empty case",
4155
4483
  "fullTitle": "Tools getParameters() empty case",
4156
4484
  "timedOut": false,
4157
- "duration": 1,
4485
+ "duration": 0,
4158
4486
  "state": "passed",
4159
4487
  "speed": "fast",
4160
4488
  "pass": true,
@@ -4163,8 +4491,8 @@
4163
4491
  "context": null,
4164
4492
  "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield getParamters();\n assert.deepEqual(result, []);\n});",
4165
4493
  "err": {},
4166
- "uuid": "e0b27445-aea5-4187-a525-05c12875f612",
4167
- "parentUUID": "f29233d4-3a81-40dd-8c77-4f0ac42dab54",
4494
+ "uuid": "889d0363-b4b2-4492-8b0c-0826d60bbf2f",
4495
+ "parentUUID": "daf57355-7f9a-419e-8b94-e0afeccbf527",
4168
4496
  "isHook": false,
4169
4497
  "skipped": false
4170
4498
  },
@@ -4172,7 +4500,7 @@
4172
4500
  "title": "easy case",
4173
4501
  "fullTitle": "Tools getParameters() easy case",
4174
4502
  "timedOut": false,
4175
- "duration": 0,
4503
+ "duration": 1,
4176
4504
  "state": "passed",
4177
4505
  "speed": "fast",
4178
4506
  "pass": true,
@@ -4181,8 +4509,8 @@
4181
4509
  "context": null,
4182
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});",
4183
4511
  "err": {},
4184
- "uuid": "60f3f4da-feab-4ca4-8c1d-428c82eaea0a",
4185
- "parentUUID": "f29233d4-3a81-40dd-8c77-4f0ac42dab54",
4512
+ "uuid": "71c4642e-5ded-42cf-8b8e-ba441e859db9",
4513
+ "parentUUID": "daf57355-7f9a-419e-8b94-e0afeccbf527",
4186
4514
  "isHook": false,
4187
4515
  "skipped": false
4188
4516
  },
@@ -4190,7 +4518,7 @@
4190
4518
  "title": "full case",
4191
4519
  "fullTitle": "Tools getParameters() full case",
4192
4520
  "timedOut": false,
4193
- "duration": 1,
4521
+ "duration": 0,
4194
4522
  "state": "passed",
4195
4523
  "speed": "fast",
4196
4524
  "pass": true,
@@ -4199,28 +4527,28 @@
4199
4527
  "context": null,
4200
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});",
4201
4529
  "err": {},
4202
- "uuid": "0841601c-c2fa-4b15-88e4-c790d5d35406",
4203
- "parentUUID": "f29233d4-3a81-40dd-8c77-4f0ac42dab54",
4530
+ "uuid": "37073e26-456c-4bc3-ba2c-6aee83d53182",
4531
+ "parentUUID": "daf57355-7f9a-419e-8b94-e0afeccbf527",
4204
4532
  "isHook": false,
4205
4533
  "skipped": false
4206
4534
  }
4207
4535
  ],
4208
4536
  "suites": [],
4209
4537
  "passes": [
4210
- "e0b27445-aea5-4187-a525-05c12875f612",
4211
- "60f3f4da-feab-4ca4-8c1d-428c82eaea0a",
4212
- "0841601c-c2fa-4b15-88e4-c790d5d35406"
4538
+ "889d0363-b4b2-4492-8b0c-0826d60bbf2f",
4539
+ "71c4642e-5ded-42cf-8b8e-ba441e859db9",
4540
+ "37073e26-456c-4bc3-ba2c-6aee83d53182"
4213
4541
  ],
4214
4542
  "failures": [],
4215
4543
  "pending": [],
4216
4544
  "skipped": [],
4217
- "duration": 2,
4545
+ "duration": 1,
4218
4546
  "root": false,
4219
4547
  "rootEmpty": false,
4220
4548
  "_timeout": 2000
4221
4549
  },
4222
4550
  {
4223
- "uuid": "41891573-72ad-4342-9f99-108980caed03",
4551
+ "uuid": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4224
4552
  "title": "parseState()",
4225
4553
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
4226
4554
  "file": "/test/tools.ts",
@@ -4240,8 +4568,8 @@
4240
4568
  "context": null,
4241
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});",
4242
4570
  "err": {},
4243
- "uuid": "a4cdc770-d9db-42be-a4bf-0aa743e55987",
4244
- "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4571
+ "uuid": "78f2eefb-185c-4b32-8915-4eb3ea6c62fe",
4572
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4245
4573
  "isHook": false,
4246
4574
  "skipped": false
4247
4575
  },
@@ -4258,8 +4586,8 @@
4258
4586
  "context": null,
4259
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});",
4260
4588
  "err": {},
4261
- "uuid": "35455a43-b353-4d63-91c6-4d5a2ac39385",
4262
- "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4589
+ "uuid": "2a64cff2-f0b4-4167-a84b-ffb0e975b6df",
4590
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4263
4591
  "isHook": false,
4264
4592
  "skipped": false
4265
4593
  },
@@ -4276,8 +4604,8 @@
4276
4604
  "context": null,
4277
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});",
4278
4606
  "err": {},
4279
- "uuid": "cc0061b9-a747-445d-82da-684471991cec",
4280
- "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4607
+ "uuid": "2cc31b39-7574-4cdf-9a3b-bea8f079490d",
4608
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4281
4609
  "isHook": false,
4282
4610
  "skipped": false
4283
4611
  },
@@ -4294,8 +4622,8 @@
4294
4622
  "context": null,
4295
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/);",
4296
4624
  "err": {},
4297
- "uuid": "5b32445e-ac1b-430f-908e-eb493e9dd091",
4298
- "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4625
+ "uuid": "5cae4ef0-03da-4b95-965d-c410af10d31c",
4626
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4299
4627
  "isHook": false,
4300
4628
  "skipped": false
4301
4629
  },
@@ -4303,7 +4631,7 @@
4303
4631
  "title": "should ignore date if it's an invalid date",
4304
4632
  "fullTitle": "Tools parseState() should ignore date if it's an invalid date",
4305
4633
  "timedOut": false,
4306
- "duration": 1,
4634
+ "duration": 0,
4307
4635
  "state": "passed",
4308
4636
  "speed": "fast",
4309
4637
  "pass": true,
@@ -4312,8 +4640,8 @@
4312
4640
  "context": null,
4313
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});",
4314
4642
  "err": {},
4315
- "uuid": "d5290047-610d-4b9d-8833-2bf9c57e5d6a",
4316
- "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4643
+ "uuid": "a18456ba-d21d-4894-9d3f-fd4bf3f7990d",
4644
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4317
4645
  "isHook": false,
4318
4646
  "skipped": false
4319
4647
  },
@@ -4330,8 +4658,8 @@
4330
4658
  "context": null,
4331
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});",
4332
4660
  "err": {},
4333
- "uuid": "f65a5713-7186-4c4d-9fa6-7fd9c3073e0e",
4334
- "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4661
+ "uuid": "9fab4384-1705-48e8-a21c-c50ce0efd5ba",
4662
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4335
4663
  "isHook": false,
4336
4664
  "skipped": false
4337
4665
  },
@@ -4339,7 +4667,7 @@
4339
4667
  "title": "should ignore enums with unsupported valid",
4340
4668
  "fullTitle": "Tools parseState() should ignore enums with unsupported valid",
4341
4669
  "timedOut": false,
4342
- "duration": 0,
4670
+ "duration": 1,
4343
4671
  "state": "passed",
4344
4672
  "speed": "fast",
4345
4673
  "pass": true,
@@ -4348,21 +4676,21 @@
4348
4676
  "context": null,
4349
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});",
4350
4678
  "err": {},
4351
- "uuid": "28d9d121-903e-492b-8a95-f6cdd1b12d81",
4352
- "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4679
+ "uuid": "69b39d31-0892-4705-b298-0e70c7488467",
4680
+ "parentUUID": "56cbcff4-5b1c-4218-990d-ebc7db908eeb",
4353
4681
  "isHook": false,
4354
4682
  "skipped": false
4355
4683
  }
4356
4684
  ],
4357
4685
  "suites": [],
4358
4686
  "passes": [
4359
- "a4cdc770-d9db-42be-a4bf-0aa743e55987",
4360
- "35455a43-b353-4d63-91c6-4d5a2ac39385",
4361
- "cc0061b9-a747-445d-82da-684471991cec",
4362
- "5b32445e-ac1b-430f-908e-eb493e9dd091",
4363
- "d5290047-610d-4b9d-8833-2bf9c57e5d6a",
4364
- "f65a5713-7186-4c4d-9fa6-7fd9c3073e0e",
4365
- "28d9d121-903e-492b-8a95-f6cdd1b12d81"
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"
4366
4694
  ],
4367
4695
  "failures": [],
4368
4696
  "pending": [],