@sebbo2002/node-pyatv 4.0.0 → 4.2.0-develop.2

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 (78) hide show
  1. package/CHANGELOG.md +23 -5
  2. package/dist/lib/device-event.d.ts +1 -1
  3. package/dist/lib/device-events.d.ts +1 -2
  4. package/dist/lib/device-events.js +26 -24
  5. package/dist/lib/device-events.js.map +1 -1
  6. package/dist/lib/device.d.ts +1 -1
  7. package/dist/lib/device.js +19 -18
  8. package/dist/lib/device.js.map +1 -1
  9. package/dist/lib/index.d.ts +3 -1
  10. package/dist/lib/index.js +7 -1
  11. package/dist/lib/index.js.map +1 -1
  12. package/dist/lib/instance.d.ts +1 -1
  13. package/dist/lib/instance.js +13 -13
  14. package/dist/lib/instance.js.map +1 -1
  15. package/dist/lib/tools.js +13 -0
  16. package/dist/lib/tools.js.map +1 -1
  17. package/dist/lib/types.d.ts +3 -0
  18. package/docs/coverage/cobertura-coverage.xml +671 -635
  19. package/docs/coverage/device-event.ts.html +2 -2
  20. package/docs/coverage/device-events.ts.html +99 -87
  21. package/docs/coverage/device.ts.html +38 -26
  22. package/docs/coverage/fake-spawn.ts.html +25 -25
  23. package/docs/coverage/index.html +29 -29
  24. package/docs/coverage/index.ts.html +22 -7
  25. package/docs/coverage/instance.ts.html +2 -2
  26. package/docs/coverage/tools.ts.html +149 -107
  27. package/docs/coverage/types.ts.html +11 -2
  28. package/docs/reference/.nojekyll +1 -0
  29. package/docs/reference/assets/highlight.css +99 -0
  30. package/docs/reference/assets/icons.css +1043 -0
  31. package/docs/reference/assets/{images/icons.png → icons.png} +0 -0
  32. package/docs/reference/assets/{images/icons@2x.png → icons@2x.png} +0 -0
  33. package/docs/reference/assets/main.js +52 -0
  34. package/docs/reference/assets/search.js +1 -0
  35. package/docs/reference/assets/style.css +1388 -0
  36. package/docs/reference/assets/{images/widgets.png → widgets.png} +0 -0
  37. package/docs/reference/assets/{images/widgets@2x.png → widgets@2x.png} +0 -0
  38. package/docs/reference/classes/NodePyATVDevice.html +147 -0
  39. package/docs/reference/classes/NodePyATVDeviceEvent.html +13 -3190
  40. package/docs/reference/classes/default.html +46 -3402
  41. package/docs/reference/enums/NodePyATVDeviceState.html +1 -3131
  42. package/docs/reference/enums/NodePyATVKeys.html +1 -3341
  43. package/docs/reference/enums/NodePyATVListenerState.html +1 -0
  44. package/docs/reference/enums/NodePyATVMediaType.html +1 -3103
  45. package/docs/reference/enums/NodePyATVPowerState.html +1 -0
  46. package/docs/reference/enums/NodePyATVProtocol.html +1 -3103
  47. package/docs/reference/enums/NodePyATVRepeatState.html +1 -3089
  48. package/docs/reference/enums/NodePyATVShuffleState.html +1 -3089
  49. package/docs/reference/index.html +74 -3150
  50. package/docs/reference/interfaces/NodePyATVDeviceOptions.html +1 -3281
  51. package/docs/reference/interfaces/NodePyATVFindAndInstanceOptions.html +1 -3275
  52. package/docs/reference/interfaces/NodePyATVFindOptions.html +1 -3158
  53. package/docs/reference/interfaces/NodePyATVGetStateOptions.html +1 -3069
  54. package/docs/reference/interfaces/NodePyATVInstanceOptions.html +1 -3157
  55. package/docs/reference/interfaces/NodePyATVState.html +1 -3265
  56. package/docs/reference/interfaces/NodePyATVVersionResponse.html +1 -3083
  57. package/docs/reference/modules.html +1 -3154
  58. package/docs/tests/assets/app.css +1 -1
  59. package/docs/tests/assets/app.js +2 -2
  60. package/docs/tests/assets/app.js.LICENSE.txt +1 -1
  61. package/docs/tests/index.html +1 -1
  62. package/docs/tests/mochawesome.json +793 -698
  63. package/package.json +19 -18
  64. package/src/lib/device-event.ts +1 -1
  65. package/src/lib/device-events.ts +8 -4
  66. package/src/lib/device.ts +12 -8
  67. package/src/lib/index.ts +6 -1
  68. package/src/lib/instance.ts +1 -1
  69. package/src/lib/tools.ts +14 -0
  70. package/src/lib/types.ts +3 -0
  71. package/test/device-events.ts +24 -3
  72. package/test/device.ts +18 -0
  73. package/test/instance.ts +9 -1
  74. package/test/tools.ts +21 -6
  75. package/typedoc.json +2 -2
  76. package/docs/reference/assets/css/main.css +0 -2660
  77. package/docs/reference/assets/js/main.js +0 -248
  78. package/docs/reference/assets/js/search.js +0 -1
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "stats": {
3
3
  "suites": 82,
4
- "tests": 136,
5
- "passes": 134,
4
+ "tests": 141,
5
+ "passes": 139,
6
6
  "pending": 2,
7
7
  "failures": 0,
8
- "start": "2021-07-31T12:23:52.931Z",
9
- "end": "2021-07-31T12:24:05.748Z",
10
- "duration": 12817,
11
- "testsRegistered": 136,
8
+ "start": "2021-11-29T21:52:10.648Z",
9
+ "end": "2021-11-29T21:52:23.371Z",
10
+ "duration": 12723,
11
+ "testsRegistered": 141,
12
12
  "passPercent": 100,
13
- "pendingPercent": 1.4705882352941175,
13
+ "pendingPercent": 1.4184397163120568,
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": "18a74764-91a9-4dd5-ac74-cdd1860022b2",
21
+ "uuid": "62992634-891f-45bc-981a-70fcdcfe07d1",
22
22
  "title": "",
23
23
  "fullFile": "",
24
24
  "file": "",
@@ -27,7 +27,7 @@
27
27
  "tests": [],
28
28
  "suites": [
29
29
  {
30
- "uuid": "31f4d84d-5aed-4aa4-8ad6-807d3b63367d",
30
+ "uuid": "4fc54f25-99d1-4c53-9c3d-fc32d472730f",
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": "048f928a-b37b-4831-8687-2b50dd27e751",
39
+ "uuid": "3d782231-60a6-484e-bf4f-2c6ca97cf969",
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",
@@ -47,7 +47,7 @@
47
47
  "title": "should work",
48
48
  "fullTitle": "NodePyATVDeviceEvent get key() should work",
49
49
  "timedOut": false,
50
- "duration": 0,
50
+ "duration": 1,
51
51
  "state": "passed",
52
52
  "speed": "fast",
53
53
  "pass": true,
@@ -56,26 +56,26 @@
56
56
  "context": null,
57
57
  "code": "const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.key, 'genre');",
58
58
  "err": {},
59
- "uuid": "8d23a3ac-e7c3-46b1-bfca-0b85cf4921d0",
60
- "parentUUID": "048f928a-b37b-4831-8687-2b50dd27e751",
59
+ "uuid": "f2f47284-174a-4de1-9f04-eff182497e40",
60
+ "parentUUID": "3d782231-60a6-484e-bf4f-2c6ca97cf969",
61
61
  "isHook": false,
62
62
  "skipped": false
63
63
  }
64
64
  ],
65
65
  "suites": [],
66
66
  "passes": [
67
- "8d23a3ac-e7c3-46b1-bfca-0b85cf4921d0"
67
+ "f2f47284-174a-4de1-9f04-eff182497e40"
68
68
  ],
69
69
  "failures": [],
70
70
  "pending": [],
71
71
  "skipped": [],
72
- "duration": 0,
72
+ "duration": 1,
73
73
  "root": false,
74
74
  "rootEmpty": false,
75
75
  "_timeout": 2000
76
76
  },
77
77
  {
78
- "uuid": "3cec82b5-98d6-4eae-9cc0-dd2cadf0f09a",
78
+ "uuid": "0ba8c754-be0a-410b-87c2-a70c6c309fb5",
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",
@@ -86,7 +86,7 @@
86
86
  "title": "should work",
87
87
  "fullTitle": "NodePyATVDeviceEvent get oldValue() should work",
88
88
  "timedOut": false,
89
- "duration": 0,
89
+ "duration": 1,
90
90
  "state": "passed",
91
91
  "speed": "fast",
92
92
  "pass": true,
@@ -95,26 +95,26 @@
95
95
  "context": null,
96
96
  "code": "const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.oldValue, 'Jazz');",
97
97
  "err": {},
98
- "uuid": "044fa9f7-3a35-46da-aaed-f1a4a8e22ceb",
99
- "parentUUID": "3cec82b5-98d6-4eae-9cc0-dd2cadf0f09a",
98
+ "uuid": "79f4bf10-82b8-42ef-9ae1-4a3da3c2895b",
99
+ "parentUUID": "0ba8c754-be0a-410b-87c2-a70c6c309fb5",
100
100
  "isHook": false,
101
101
  "skipped": false
102
102
  }
103
103
  ],
104
104
  "suites": [],
105
105
  "passes": [
106
- "044fa9f7-3a35-46da-aaed-f1a4a8e22ceb"
106
+ "79f4bf10-82b8-42ef-9ae1-4a3da3c2895b"
107
107
  ],
108
108
  "failures": [],
109
109
  "pending": [],
110
110
  "skipped": [],
111
- "duration": 0,
111
+ "duration": 1,
112
112
  "root": false,
113
113
  "rootEmpty": false,
114
114
  "_timeout": 2000
115
115
  },
116
116
  {
117
- "uuid": "850e20a4-326e-4283-8400-63b54c1e6ead",
117
+ "uuid": "afa6945c-fd01-4fd5-98c7-9285962abf3d",
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 device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.newValue, 'Rock');",
136
136
  "err": {},
137
- "uuid": "7b9e246d-ca3f-4b27-9268-1a61dedd3af0",
138
- "parentUUID": "850e20a4-326e-4283-8400-63b54c1e6ead",
137
+ "uuid": "2b789055-d85c-47db-8402-ced73179e87f",
138
+ "parentUUID": "afa6945c-fd01-4fd5-98c7-9285962abf3d",
139
139
  "isHook": false,
140
140
  "skipped": false
141
141
  }
142
142
  ],
143
143
  "suites": [],
144
144
  "passes": [
145
- "7b9e246d-ca3f-4b27-9268-1a61dedd3af0"
145
+ "2b789055-d85c-47db-8402-ced73179e87f"
146
146
  ],
147
147
  "failures": [],
148
148
  "pending": [],
@@ -153,7 +153,7 @@
153
153
  "_timeout": 2000
154
154
  },
155
155
  {
156
- "uuid": "6879bf85-ec39-417f-9dab-f99de88e1dff",
156
+ "uuid": "1a19fe5e-f8a8-425d-b68c-6869f78c6b27",
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 device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.value, 'Rock');",
175
175
  "err": {},
176
- "uuid": "9d303c10-d17b-4acd-ae66-476f96cad054",
177
- "parentUUID": "6879bf85-ec39-417f-9dab-f99de88e1dff",
176
+ "uuid": "2099b914-03df-4c27-923b-1c36c617fcfa",
177
+ "parentUUID": "1a19fe5e-f8a8-425d-b68c-6869f78c6b27",
178
178
  "isHook": false,
179
179
  "skipped": false
180
180
  }
181
181
  ],
182
182
  "suites": [],
183
183
  "passes": [
184
- "9d303c10-d17b-4acd-ae66-476f96cad054"
184
+ "2099b914-03df-4c27-923b-1c36c617fcfa"
185
185
  ],
186
186
  "failures": [],
187
187
  "pending": [],
@@ -192,7 +192,7 @@
192
192
  "_timeout": 2000
193
193
  },
194
194
  {
195
- "uuid": "01a4d99c-6286-4a26-9e7b-0a6e0551341b",
195
+ "uuid": "260939aa-2338-4886-a1a2-b5bb11975083",
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",
@@ -212,15 +212,15 @@
212
212
  "context": null,
213
213
  "code": "const device = new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n});\nconst event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device\n});\nassert_1.default.deepEqual(event.device, device);",
214
214
  "err": {},
215
- "uuid": "f5e73ee0-463e-4c59-a0a0-f40c0432aae5",
216
- "parentUUID": "01a4d99c-6286-4a26-9e7b-0a6e0551341b",
215
+ "uuid": "39a7d180-72c6-410e-8850-0034bc7b7063",
216
+ "parentUUID": "260939aa-2338-4886-a1a2-b5bb11975083",
217
217
  "isHook": false,
218
218
  "skipped": false
219
219
  }
220
220
  ],
221
221
  "suites": [],
222
222
  "passes": [
223
- "f5e73ee0-463e-4c59-a0a0-f40c0432aae5"
223
+ "39a7d180-72c6-410e-8850-0034bc7b7063"
224
224
  ],
225
225
  "failures": [],
226
226
  "pending": [],
@@ -241,7 +241,7 @@
241
241
  "_timeout": 2000
242
242
  },
243
243
  {
244
- "uuid": "98fd3175-a488-48a8-9b5a-d0276694d811",
244
+ "uuid": "bb799ebe-9e50-4e6b-923a-b5ab356cc25f",
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": "a2a47567-7bba-456e-bead-c89dd7e51315",
253
+ "uuid": "3a1ba165-cd77-4578-9f0c-44688cea7c59",
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",
@@ -268,10 +268,10 @@
268
268
  "fail": false,
269
269
  "pending": false,
270
270
  "context": null,
271
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:title', event => {\n assert_1.default.ok(event instanceof device_event_1.default);\n assert_1.default.strictEqual(event.key, 'title');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'My Movie');\n assert_1.default.strictEqual(event.value, 'My Movie');\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
271
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:title', event => {\n assert_1.default.ok(event instanceof lib_1.NodePyATVDeviceEvent);\n assert_1.default.strictEqual(event.key, 'title');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'My Movie');\n assert_1.default.strictEqual(event.value, 'My Movie');\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
272
272
  "err": {},
273
- "uuid": "8dccba40-8688-4c12-acc1-4374e5bc9905",
274
- "parentUUID": "a2a47567-7bba-456e-bead-c89dd7e51315",
273
+ "uuid": "7fa1610c-5b46-4f7c-93ce-960171b93611",
274
+ "parentUUID": "3a1ba165-cd77-4578-9f0c-44688cea7c59",
275
275
  "isHook": false,
276
276
  "skipped": false
277
277
  },
@@ -286,10 +286,10 @@
286
286
  "fail": false,
287
287
  "pending": false,
288
288
  "context": null,
289
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update', event => {\n assert_1.default.ok(event instanceof device_event_1.default);\n assert_1.default.strictEqual(event.key, 'title');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'My Movie');\n assert_1.default.strictEqual(event.value, 'My Movie');\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
289
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update', event => {\n assert_1.default.ok(event instanceof lib_1.NodePyATVDeviceEvent);\n assert_1.default.strictEqual(event.key, 'title');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'My Movie');\n assert_1.default.strictEqual(event.value, 'My Movie');\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
290
290
  "err": {},
291
- "uuid": "d0ce99a3-76bb-4bd7-b5bc-63da09d693bf",
292
- "parentUUID": "a2a47567-7bba-456e-bead-c89dd7e51315",
291
+ "uuid": "98ac437d-d82a-4580-8e4d-f361d2ecda43",
292
+ "parentUUID": "3a1ba165-cd77-4578-9f0c-44688cea7c59",
293
293
  "isHook": false,
294
294
  "skipped": false
295
295
  },
@@ -297,6 +297,24 @@
297
297
  "title": "should emit update:key event before update",
298
298
  "fullTitle": "NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update:key event before update",
299
299
  "timedOut": false,
300
+ "duration": 5,
301
+ "state": "passed",
302
+ "speed": "fast",
303
+ "pass": true,
304
+ "fail": false,
305
+ "pending": false,
306
+ "context": null,
307
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const sort = [];\n yield Promise.race([\n new Promise(cb => {\n device.once('update', () => {\n sort.push('update');\n cb(undefined);\n });\n }),\n new Promise(cb => {\n device.once('update:title', () => {\n sort.push('update:title');\n cb(undefined);\n });\n })\n ]);\n assert_1.default.deepStrictEqual(sort, ['update:title', 'update']);\n});",
308
+ "err": {},
309
+ "uuid": "6bbc2ff7-4749-47af-b5de-724f001d1e6e",
310
+ "parentUUID": "3a1ba165-cd77-4578-9f0c-44688cea7c59",
311
+ "isHook": false,
312
+ "skipped": false
313
+ },
314
+ {
315
+ "title": "should emit error events on failures",
316
+ "fullTitle": "NodePyATVDeviceEvents applyStateAndEmitEvents() should emit error events on failures",
317
+ "timedOut": false,
300
318
  "duration": 2,
301
319
  "state": "passed",
302
320
  "speed": "fast",
@@ -304,10 +322,10 @@
304
322
  "fail": false,
305
323
  "pending": false,
306
324
  "context": null,
307
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const sort = [];\n yield Promise.race([\n new Promise(cb => {\n device.once('update', () => {\n sort.push('update');\n cb(undefined);\n });\n }),\n new Promise(cb => {\n device.once('update:title', () => {\n sort.push('update:title');\n cb(undefined);\n });\n })\n ]);\n assert_1.default.deepStrictEqual(sort, ['update:title', 'update']);\n});",
325
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n });\n })\n });\n yield new Promise(cb => {\n device.once('error', error => {\n assert_1.default.ok(error instanceof Error);\n assert_1.default.ok(error.toString().includes('invalid credentials: 321'));\n cb(undefined);\n });\n });\n});",
308
326
  "err": {},
309
- "uuid": "9dc5383b-21ad-4946-8c38-af348e6d6037",
310
- "parentUUID": "a2a47567-7bba-456e-bead-c89dd7e51315",
327
+ "uuid": "923c8585-56e4-43e3-a6ea-9dad9e71d5d0",
328
+ "parentUUID": "3a1ba165-cd77-4578-9f0c-44688cea7c59",
311
329
  "isHook": false,
312
330
  "skipped": false
313
331
  },
@@ -315,17 +333,17 @@
315
333
  "title": "should not emit an update if new value is same as old one",
316
334
  "fullTitle": "NodePyATVDeviceEvents applyStateAndEmitEvents() should not emit an update if new value is same as old one",
317
335
  "timedOut": false,
318
- "duration": 3,
336
+ "duration": 4,
319
337
  "state": "passed",
320
338
  "speed": "fast",
321
339
  "pass": true,
322
340
  "fail": false,
323
341
  "pending": false,
324
342
  "context": null,
325
- "code": "return __awaiter(this, void 0, void 0, function* () {\n let spawnCounter = 0;\n let eventCounter = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n if (spawnCounter === 0) {\n cp.onStdIn(() => cp.end());\n }\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n spawnCounter++;\n if (spawnCounter >= 2) {\n cp.end();\n }\n })\n });\n const listener = () => {\n eventCounter++;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n yield device.getState();\n device.off('update', listener);\n assert_1.default.strictEqual(spawnCounter, 2);\n assert_1.default.strictEqual(eventCounter, 1);\n});",
343
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n let spawnCounter = 0;\n let eventCounter = 0;\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n if (spawnCounter === 0) {\n cp.onStdIn(() => cp.end());\n }\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n spawnCounter++;\n if (spawnCounter >= 2) {\n cp.end();\n }\n })\n });\n const listener = () => {\n eventCounter++;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n yield device.getState();\n device.off('update', listener);\n assert_1.default.strictEqual(spawnCounter, 2);\n assert_1.default.strictEqual(eventCounter, 1);\n});",
326
344
  "err": {},
327
- "uuid": "e886627a-ee1d-451c-a527-720ec437d6c3",
328
- "parentUUID": "a2a47567-7bba-456e-bead-c89dd7e51315",
345
+ "uuid": "240c942e-cff3-4ccd-b09c-06e08853210b",
346
+ "parentUUID": "3a1ba165-cd77-4578-9f0c-44688cea7c59",
329
347
  "isHook": false,
330
348
  "skipped": false
331
349
  },
@@ -340,10 +358,10 @@
340
358
  "fail": false,
341
359
  "pending": false,
342
360
  "context": null,
343
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n let callCounter = 0;\n const error = new Error('This is an error. Be nice.');\n device.once('error', err => {\n assert_1.default.strictEqual(err, error);\n callCounter++;\n });\n const listener = () => {\n throw error;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n device.off('update', listener);\n assert_1.default.strictEqual(callCounter, 1);\n});",
361
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n let callCounter = 0;\n const error = new Error('This is an error. Be nice.');\n device.once('error', err => {\n assert_1.default.strictEqual(err, error);\n callCounter++;\n });\n const listener = () => {\n throw error;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n device.off('update', listener);\n assert_1.default.strictEqual(callCounter, 1);\n});",
344
362
  "err": {},
345
- "uuid": "b4cd4c54-3371-4e6c-b0d3-3e6829add75d",
346
- "parentUUID": "a2a47567-7bba-456e-bead-c89dd7e51315",
363
+ "uuid": "6a33cb15-f298-4cdc-9987-4c8f27afe2c2",
364
+ "parentUUID": "3a1ba165-cd77-4578-9f0c-44688cea7c59",
347
365
  "isHook": false,
348
366
  "skipped": false
349
367
  },
@@ -358,33 +376,34 @@
358
376
  "fail": false,
359
377
  "pending": false,
360
378
  "context": null,
361
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n datetime: new Date().toJSON(),\n power_state: 'off'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:powerState', event => {\n assert_1.default.ok(event instanceof device_event_1.default);\n assert_1.default.strictEqual(event.key, 'powerState');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'off');\n assert_1.default.strictEqual(event.newValue, types_1.NodePyATVPowerState.off);\n assert_1.default.strictEqual(event.value, 'off');\n assert_1.default.strictEqual(event.value, types_1.NodePyATVPowerState.off);\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
379
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n datetime: new Date().toJSON(),\n power_state: 'off'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:powerState', event => {\n assert_1.default.ok(event instanceof lib_1.NodePyATVDeviceEvent);\n assert_1.default.strictEqual(event.key, 'powerState');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'off');\n assert_1.default.strictEqual(event.newValue, lib_1.NodePyATVPowerState.off);\n assert_1.default.strictEqual(event.value, 'off');\n assert_1.default.strictEqual(event.value, lib_1.NodePyATVPowerState.off);\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
362
380
  "err": {},
363
- "uuid": "56350391-9f1a-4558-81bf-ba3af4759cf3",
364
- "parentUUID": "a2a47567-7bba-456e-bead-c89dd7e51315",
381
+ "uuid": "ab31b15f-dfd5-4c77-8e9a-cb84d7d36f2a",
382
+ "parentUUID": "3a1ba165-cd77-4578-9f0c-44688cea7c59",
365
383
  "isHook": false,
366
384
  "skipped": false
367
385
  }
368
386
  ],
369
387
  "suites": [],
370
388
  "passes": [
371
- "8dccba40-8688-4c12-acc1-4374e5bc9905",
372
- "d0ce99a3-76bb-4bd7-b5bc-63da09d693bf",
373
- "9dc5383b-21ad-4946-8c38-af348e6d6037",
374
- "e886627a-ee1d-451c-a527-720ec437d6c3",
375
- "b4cd4c54-3371-4e6c-b0d3-3e6829add75d",
376
- "56350391-9f1a-4558-81bf-ba3af4759cf3"
389
+ "7fa1610c-5b46-4f7c-93ce-960171b93611",
390
+ "98ac437d-d82a-4580-8e4d-f361d2ecda43",
391
+ "6bbc2ff7-4749-47af-b5de-724f001d1e6e",
392
+ "923c8585-56e4-43e3-a6ea-9dad9e71d5d0",
393
+ "240c942e-cff3-4ccd-b09c-06e08853210b",
394
+ "6a33cb15-f298-4cdc-9987-4c8f27afe2c2",
395
+ "ab31b15f-dfd5-4c77-8e9a-cb84d7d36f2a"
377
396
  ],
378
397
  "failures": [],
379
398
  "pending": [],
380
399
  "skipped": [],
381
- "duration": 16,
400
+ "duration": 22,
382
401
  "root": false,
383
402
  "rootEmpty": false,
384
403
  "_timeout": 2000
385
404
  },
386
405
  {
387
- "uuid": "43dd3e92-ba70-4545-8a49-efb2e77a98ce",
406
+ "uuid": "7f6e7b6d-fb4a-47d2-94d9-ab155cc8df08",
388
407
  "title": "start|stopListening()",
389
408
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
390
409
  "file": "/test/device-events.ts",
@@ -402,10 +421,10 @@
402
421
  "fail": false,
403
422
  "pending": false,
404
423
  "context": null,
405
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const error = new Error();\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.error(error).end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.strictEqual(err, error);\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
424
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const error = new Error();\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(error).end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.strictEqual(err, error);\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
406
425
  "err": {},
407
- "uuid": "9f9a847c-bf03-4f31-96e5-2fe7b378ab5f",
408
- "parentUUID": "43dd3e92-ba70-4545-8a49-efb2e77a98ce",
426
+ "uuid": "e3f3f2da-56c3-439a-91fc-8986dd771386",
427
+ "parentUUID": "7f6e7b6d-fb4a-47d2-94d9-ab155cc8df08",
409
428
  "isHook": false,
410
429
  "skipped": false
411
430
  },
@@ -420,10 +439,10 @@
420
439
  "fail": false,
421
440
  "pending": false,
422
441
  "context": null,
423
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.stderr('Hello World!').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.ok(err instanceof Error);\n assert_1.default.ok(err.toString().includes('Got stderr output from pyatv: Hello World!'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
442
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stderr('Hello World!').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.ok(err instanceof Error);\n assert_1.default.ok(err.toString().includes('Got stderr output from pyatv: Hello World!'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
424
443
  "err": {},
425
- "uuid": "be2847c7-723c-4017-8d2a-fa0b33a1ec85",
426
- "parentUUID": "43dd3e92-ba70-4545-8a49-efb2e77a98ce",
444
+ "uuid": "6d9abfc3-d3b9-4aaa-ae3d-f6b46f9954f9",
445
+ "parentUUID": "7f6e7b6d-fb4a-47d2-94d9-ab155cc8df08",
427
446
  "isHook": false,
428
447
  "skipped": false
429
448
  },
@@ -438,10 +457,10 @@
438
457
  "fail": false,
439
458
  "pending": false,
440
459
  "context": null,
441
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.stdout('#').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.ok(err instanceof Error);\n assert_1.default.ok(err.toString().includes('Unable to parse stdout json: SyntaxError: ' +\n 'Unexpected token # in JSON at position 0'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
460
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('#').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.ok(err instanceof Error);\n assert_1.default.ok(err.toString().includes('Unable to parse stdout json: SyntaxError: ' +\n 'Unexpected token # in JSON at position 0'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
442
461
  "err": {},
443
- "uuid": "b949cd7f-aff6-4d2f-a2ea-5f0ebcbe6ca4",
444
- "parentUUID": "43dd3e92-ba70-4545-8a49-efb2e77a98ce",
462
+ "uuid": "cc89665c-22aa-41d5-b798-5f8dbbb39117",
463
+ "parentUUID": "7f6e7b6d-fb4a-47d2-94d9-ab155cc8df08",
445
464
  "isHook": false,
446
465
  "skipped": false
447
466
  },
@@ -458,21 +477,21 @@
458
477
  "context": null,
459
478
  "code": "",
460
479
  "err": {},
461
- "uuid": "748b93fd-23d6-4203-819b-03d256a1cf75",
462
- "parentUUID": "43dd3e92-ba70-4545-8a49-efb2e77a98ce",
480
+ "uuid": "d215a238-dd0f-4a16-9422-178a7a845354",
481
+ "parentUUID": "7f6e7b6d-fb4a-47d2-94d9-ab155cc8df08",
463
482
  "isHook": false,
464
483
  "skipped": false
465
484
  }
466
485
  ],
467
486
  "suites": [],
468
487
  "passes": [
469
- "9f9a847c-bf03-4f31-96e5-2fe7b378ab5f",
470
- "be2847c7-723c-4017-8d2a-fa0b33a1ec85",
471
- "b949cd7f-aff6-4d2f-a2ea-5f0ebcbe6ca4"
488
+ "e3f3f2da-56c3-439a-91fc-8986dd771386",
489
+ "6d9abfc3-d3b9-4aaa-ae3d-f6b46f9954f9",
490
+ "cc89665c-22aa-41d5-b798-5f8dbbb39117"
472
491
  ],
473
492
  "failures": [],
474
493
  "pending": [
475
- "748b93fd-23d6-4203-819b-03d256a1cf75"
494
+ "d215a238-dd0f-4a16-9422-178a7a845354"
476
495
  ],
477
496
  "skipped": [],
478
497
  "duration": 6,
@@ -481,7 +500,7 @@
481
500
  "_timeout": 2000
482
501
  },
483
502
  {
484
- "uuid": "2c7154e9-0f93-4a81-afcf-284607fa142c",
503
+ "uuid": "245c5835-e4f1-4835-9565-52a604d299f0",
485
504
  "title": "addListener() / removeAllListeners()",
486
505
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
487
506
  "file": "/test/device-events.ts",
@@ -499,17 +518,17 @@
499
518
  "fail": false,
500
519
  "pending": false,
501
520
  "context": null,
502
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n device.removeAllListeners('update');\n});",
521
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n device.removeAllListeners('update');\n});",
503
522
  "err": {},
504
- "uuid": "dd429173-8b12-443c-b001-e03facdbc077",
505
- "parentUUID": "2c7154e9-0f93-4a81-afcf-284607fa142c",
523
+ "uuid": "803b2cf4-9f93-4b62-a9b4-c201d34c7b6f",
524
+ "parentUUID": "245c5835-e4f1-4835-9565-52a604d299f0",
506
525
  "isHook": false,
507
526
  "skipped": false
508
527
  }
509
528
  ],
510
529
  "suites": [],
511
530
  "passes": [
512
- "dd429173-8b12-443c-b001-e03facdbc077"
531
+ "803b2cf4-9f93-4b62-a9b4-c201d34c7b6f"
513
532
  ],
514
533
  "failures": [],
515
534
  "pending": [],
@@ -520,7 +539,7 @@
520
539
  "_timeout": 2000
521
540
  },
522
541
  {
523
- "uuid": "b25d80f6-3927-4970-b364-e2195ef42bfe",
542
+ "uuid": "049a91e4-f61e-4c90-a9b4-ec7d23536424",
524
543
  "title": "emit()",
525
544
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
526
545
  "file": "/test/device-events.ts",
@@ -538,17 +557,17 @@
538
557
  "fail": false,
539
558
  "pending": false,
540
559
  "context": null,
541
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst event = new device_event_1.default({\n key: 'dateTime',\n old: 'foo',\n new: 'bar',\n device\n});\nlet executions = 0;\ndevice.once('test', (e) => {\n executions++;\n assert_1.default.strictEqual(e, event);\n assert_1.default.strictEqual(executions, 1);\n done();\n});\ndevice.emit('test', event);",
560
+ "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst event = new lib_1.NodePyATVDeviceEvent({\n key: 'dateTime',\n old: 'foo',\n new: 'bar',\n device\n});\nlet executions = 0;\ndevice.once('test', (e) => {\n executions++;\n assert_1.default.strictEqual(e, event);\n assert_1.default.strictEqual(executions, 1);\n done();\n});\ndevice.emit('test', event);",
542
561
  "err": {},
543
- "uuid": "eecff233-966b-4f22-832e-b9560af595ca",
544
- "parentUUID": "b25d80f6-3927-4970-b364-e2195ef42bfe",
562
+ "uuid": "b73bd6b3-e935-4a27-9e83-65ca87c11e26",
563
+ "parentUUID": "049a91e4-f61e-4c90-a9b4-ec7d23536424",
545
564
  "isHook": false,
546
565
  "skipped": false
547
566
  }
548
567
  ],
549
568
  "suites": [],
550
569
  "passes": [
551
- "eecff233-966b-4f22-832e-b9560af595ca"
570
+ "b73bd6b3-e935-4a27-9e83-65ca87c11e26"
552
571
  ],
553
572
  "failures": [],
554
573
  "pending": [],
@@ -559,7 +578,7 @@
559
578
  "_timeout": 2000
560
579
  },
561
580
  {
562
- "uuid": "93123773-d74b-4a6f-bfc8-aec0fd7e15f0",
581
+ "uuid": "bab2ae8b-4f9a-4abd-91a8-1e3181202db0",
563
582
  "title": "eventNames()",
564
583
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
565
584
  "file": "/test/device-events.ts",
@@ -577,17 +596,17 @@
577
596
  "fail": false,
578
597
  "pending": false,
579
598
  "context": null,
580
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.eventNames(), ['test']);\ndevice.off('test', listener);",
599
+ "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.eventNames(), ['test']);\ndevice.off('test', listener);",
581
600
  "err": {},
582
- "uuid": "70e44669-761c-4e5c-af9f-3498d4d0ca5a",
583
- "parentUUID": "93123773-d74b-4a6f-bfc8-aec0fd7e15f0",
601
+ "uuid": "02318eff-8bcf-4ae8-aa54-309743cf0098",
602
+ "parentUUID": "bab2ae8b-4f9a-4abd-91a8-1e3181202db0",
584
603
  "isHook": false,
585
604
  "skipped": false
586
605
  }
587
606
  ],
588
607
  "suites": [],
589
608
  "passes": [
590
- "70e44669-761c-4e5c-af9f-3498d4d0ca5a"
609
+ "02318eff-8bcf-4ae8-aa54-309743cf0098"
591
610
  ],
592
611
  "failures": [],
593
612
  "pending": [],
@@ -598,7 +617,7 @@
598
617
  "_timeout": 2000
599
618
  },
600
619
  {
601
- "uuid": "c9b027e7-dffb-4ffa-bdf1-04ab40793407",
620
+ "uuid": "2a039d2d-340c-48a6-bacd-b7a169b3f40d",
602
621
  "title": "getMaxListeners()",
603
622
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
604
623
  "file": "/test/device-events.ts",
@@ -616,17 +635,17 @@
616
635
  "fail": false,
617
636
  "pending": false,
618
637
  "context": null,
619
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst result = device.getMaxListeners();\nassert_1.default.ok(typeof result, 'number');\nassert_1.default.ok(result >= 10);",
638
+ "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst result = device.getMaxListeners();\nassert_1.default.ok(typeof result, 'number');\nassert_1.default.ok(result >= 10);",
620
639
  "err": {},
621
- "uuid": "0f1ab7c9-d693-439c-86db-ef4b5eb942aa",
622
- "parentUUID": "c9b027e7-dffb-4ffa-bdf1-04ab40793407",
640
+ "uuid": "546b8995-8665-4f52-be3c-f49155801155",
641
+ "parentUUID": "2a039d2d-340c-48a6-bacd-b7a169b3f40d",
623
642
  "isHook": false,
624
643
  "skipped": false
625
644
  }
626
645
  ],
627
646
  "suites": [],
628
647
  "passes": [
629
- "0f1ab7c9-d693-439c-86db-ef4b5eb942aa"
648
+ "546b8995-8665-4f52-be3c-f49155801155"
630
649
  ],
631
650
  "failures": [],
632
651
  "pending": [],
@@ -637,7 +656,7 @@
637
656
  "_timeout": 2000
638
657
  },
639
658
  {
640
- "uuid": "686ed322-3603-4e70-b146-3e12aba4a55b",
659
+ "uuid": "1ea68ed5-e001-46a2-9f5b-adc7cf6a81f2",
641
660
  "title": "listenerCount()",
642
661
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
643
662
  "file": "/test/device-events.ts",
@@ -655,17 +674,17 @@
655
674
  "fail": false,
656
675
  "pending": false,
657
676
  "context": null,
658
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.listenerCount('test'), 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.listenerCount('test'), 1);\ndevice.off('test', listener);",
677
+ "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.listenerCount('test'), 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.listenerCount('test'), 1);\ndevice.off('test', listener);",
659
678
  "err": {},
660
- "uuid": "337e8f60-f774-49ef-9a04-6962976faef8",
661
- "parentUUID": "686ed322-3603-4e70-b146-3e12aba4a55b",
679
+ "uuid": "1b61e869-632e-4625-b0fd-622552e8530e",
680
+ "parentUUID": "1ea68ed5-e001-46a2-9f5b-adc7cf6a81f2",
662
681
  "isHook": false,
663
682
  "skipped": false
664
683
  }
665
684
  ],
666
685
  "suites": [],
667
686
  "passes": [
668
- "337e8f60-f774-49ef-9a04-6962976faef8"
687
+ "1b61e869-632e-4625-b0fd-622552e8530e"
669
688
  ],
670
689
  "failures": [],
671
690
  "pending": [],
@@ -676,7 +695,7 @@
676
695
  "_timeout": 2000
677
696
  },
678
697
  {
679
- "uuid": "2413e19d-b0b6-40c2-986f-bddddc535eac",
698
+ "uuid": "b932e29a-c293-44c8-8e06-23723199ced5",
680
699
  "title": "listeners()",
681
700
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
682
701
  "file": "/test/device-events.ts",
@@ -687,35 +706,35 @@
687
706
  "title": "should work",
688
707
  "fullTitle": "NodePyATVDeviceEvents listeners() should work",
689
708
  "timedOut": false,
690
- "duration": 0,
709
+ "duration": 1,
691
710
  "state": "passed",
692
711
  "speed": "fast",
693
712
  "pass": true,
694
713
  "fail": false,
695
714
  "pending": false,
696
715
  "context": null,
697
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.listeners('test').length, 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.listeners('test').length, 1);\nassert_1.default.deepStrictEqual(device.listeners('test')[0], listener);\ndevice.off('test', listener);",
716
+ "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.listeners('test').length, 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.listeners('test').length, 1);\nassert_1.default.deepStrictEqual(device.listeners('test')[0], listener);\ndevice.off('test', listener);",
698
717
  "err": {},
699
- "uuid": "bddb1b64-4b48-4a0d-8b46-91224905820f",
700
- "parentUUID": "2413e19d-b0b6-40c2-986f-bddddc535eac",
718
+ "uuid": "ef051320-08ae-49aa-8141-b23fe9f15828",
719
+ "parentUUID": "b932e29a-c293-44c8-8e06-23723199ced5",
701
720
  "isHook": false,
702
721
  "skipped": false
703
722
  }
704
723
  ],
705
724
  "suites": [],
706
725
  "passes": [
707
- "bddb1b64-4b48-4a0d-8b46-91224905820f"
726
+ "ef051320-08ae-49aa-8141-b23fe9f15828"
708
727
  ],
709
728
  "failures": [],
710
729
  "pending": [],
711
730
  "skipped": [],
712
- "duration": 0,
731
+ "duration": 1,
713
732
  "root": false,
714
733
  "rootEmpty": false,
715
734
  "_timeout": 2000
716
735
  },
717
736
  {
718
- "uuid": "a2cde7b6-4bc1-4368-bd13-7870b656bc7c",
737
+ "uuid": "1e3fd5d0-9a1d-4627-bf31-abd8e37d47f4",
719
738
  "title": "prependListener()",
720
739
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
721
740
  "file": "/test/device-events.ts",
@@ -733,17 +752,17 @@
733
752
  "fail": false,
734
753
  "pending": false,
735
754
  "context": null,
736
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\nconst listener = () => {\n device.removeAllListeners('update');\n done();\n};\ndevice.prependListener('update', listener);",
755
+ "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\nconst listener = () => {\n device.removeAllListeners('update');\n done();\n};\ndevice.prependListener('update', listener);",
737
756
  "err": {},
738
- "uuid": "fd73555d-7805-4dd4-80d1-36ed8c4bf5c4",
739
- "parentUUID": "a2cde7b6-4bc1-4368-bd13-7870b656bc7c",
757
+ "uuid": "6e3034ea-899c-4169-a087-979f48b4550b",
758
+ "parentUUID": "1e3fd5d0-9a1d-4627-bf31-abd8e37d47f4",
740
759
  "isHook": false,
741
760
  "skipped": false
742
761
  }
743
762
  ],
744
763
  "suites": [],
745
764
  "passes": [
746
- "fd73555d-7805-4dd4-80d1-36ed8c4bf5c4"
765
+ "6e3034ea-899c-4169-a087-979f48b4550b"
747
766
  ],
748
767
  "failures": [],
749
768
  "pending": [],
@@ -754,7 +773,7 @@
754
773
  "_timeout": 2000
755
774
  },
756
775
  {
757
- "uuid": "986b099d-640f-43d5-81fe-a35d887ba477",
776
+ "uuid": "3e371ca7-89eb-44f3-9bee-c9c7ac46493a",
758
777
  "title": "prependOnceListener()",
759
778
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
760
779
  "file": "/test/device-events.ts",
@@ -772,17 +791,17 @@
772
791
  "fail": false,
773
792
  "pending": false,
774
793
  "context": null,
775
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\ndevice.prependOnceListener('update', () => done());",
794
+ "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\ndevice.prependOnceListener('update', () => done());",
776
795
  "err": {},
777
- "uuid": "9074fae9-8dfb-479a-838b-80e1e42df0fd",
778
- "parentUUID": "986b099d-640f-43d5-81fe-a35d887ba477",
796
+ "uuid": "c84c593d-bb09-48f3-ab38-934987b745df",
797
+ "parentUUID": "3e371ca7-89eb-44f3-9bee-c9c7ac46493a",
779
798
  "isHook": false,
780
799
  "skipped": false
781
800
  }
782
801
  ],
783
802
  "suites": [],
784
803
  "passes": [
785
- "9074fae9-8dfb-479a-838b-80e1e42df0fd"
804
+ "c84c593d-bb09-48f3-ab38-934987b745df"
786
805
  ],
787
806
  "failures": [],
788
807
  "pending": [],
@@ -793,7 +812,7 @@
793
812
  "_timeout": 2000
794
813
  },
795
814
  {
796
- "uuid": "75ba0c20-8601-46d3-863a-83e0d634f1ab",
815
+ "uuid": "f47f4116-f3b0-4a81-addd-3e65f8bd1062",
797
816
  "title": "rawListeners()",
798
817
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
799
818
  "file": "/test/device-events.ts",
@@ -811,17 +830,17 @@
811
830
  "fail": false,
812
831
  "pending": false,
813
832
  "context": null,
814
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.rawListeners('test').length, 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.rawListeners('test').length, 1);\nassert_1.default.deepStrictEqual(device.rawListeners('test')[0], listener);\ndevice.off('test', listener);",
833
+ "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.rawListeners('test').length, 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.rawListeners('test').length, 1);\nassert_1.default.deepStrictEqual(device.rawListeners('test')[0], listener);\ndevice.off('test', listener);",
815
834
  "err": {},
816
- "uuid": "c0656f76-ab0e-4bf1-9cd3-8464f5e10296",
817
- "parentUUID": "75ba0c20-8601-46d3-863a-83e0d634f1ab",
835
+ "uuid": "db0aece2-bedf-449b-9eee-16de64f81e31",
836
+ "parentUUID": "f47f4116-f3b0-4a81-addd-3e65f8bd1062",
818
837
  "isHook": false,
819
838
  "skipped": false
820
839
  }
821
840
  ],
822
841
  "suites": [],
823
842
  "passes": [
824
- "c0656f76-ab0e-4bf1-9cd3-8464f5e10296"
843
+ "db0aece2-bedf-449b-9eee-16de64f81e31"
825
844
  ],
826
845
  "failures": [],
827
846
  "pending": [],
@@ -832,7 +851,7 @@
832
851
  "_timeout": 2000
833
852
  },
834
853
  {
835
- "uuid": "daf32f93-9e6b-4fdc-9b61-d6df7eb42ac4",
854
+ "uuid": "920e54fc-d7cb-4a70-9256-52730a0cae1c",
836
855
  "title": "removeListener()",
837
856
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
838
857
  "file": "/test/device-events.ts",
@@ -843,29 +862,29 @@
843
862
  "title": "should work without any exceptions",
844
863
  "fullTitle": "NodePyATVDeviceEvents removeListener() should work without any exceptions",
845
864
  "timedOut": false,
846
- "duration": 1,
865
+ "duration": 0,
847
866
  "state": "passed",
848
867
  "speed": "fast",
849
868
  "pass": true,
850
869
  "fail": false,
851
870
  "pending": false,
852
871
  "context": null,
853
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n assert_1.default.deepStrictEqual(device.listenerCount('update'), 1);\n device.removeListener('update', listener);\n assert_1.default.deepStrictEqual(device.listenerCount('update'), 0);\n});",
872
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n assert_1.default.deepStrictEqual(device.listenerCount('update'), 1);\n device.removeListener('update', listener);\n assert_1.default.deepStrictEqual(device.listenerCount('update'), 0);\n});",
854
873
  "err": {},
855
- "uuid": "73fb3917-5cda-42f9-9995-29acf8ccfd13",
856
- "parentUUID": "daf32f93-9e6b-4fdc-9b61-d6df7eb42ac4",
874
+ "uuid": "d94261c8-93d3-4ab6-b85a-2ff1144c163f",
875
+ "parentUUID": "920e54fc-d7cb-4a70-9256-52730a0cae1c",
857
876
  "isHook": false,
858
877
  "skipped": false
859
878
  }
860
879
  ],
861
880
  "suites": [],
862
881
  "passes": [
863
- "73fb3917-5cda-42f9-9995-29acf8ccfd13"
882
+ "d94261c8-93d3-4ab6-b85a-2ff1144c163f"
864
883
  ],
865
884
  "failures": [],
866
885
  "pending": [],
867
886
  "skipped": [],
868
- "duration": 1,
887
+ "duration": 0,
869
888
  "root": false,
870
889
  "rootEmpty": false,
871
890
  "_timeout": 2000
@@ -881,7 +900,7 @@
881
900
  "_timeout": 2000
882
901
  },
883
902
  {
884
- "uuid": "f196fdbf-0143-4dcf-8f2d-968215329faf",
903
+ "uuid": "7fad2582-f47f-49a0-b552-8024097a1c69",
885
904
  "title": "NodePyATVDevice",
886
905
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
887
906
  "file": "/test/device.ts",
@@ -890,7 +909,7 @@
890
909
  "tests": [],
891
910
  "suites": [
892
911
  {
893
- "uuid": "7516ac74-e1d7-4bf8-9b26-420b519c3302",
912
+ "uuid": "d6d6047e-db1c-419a-96b7-bc88b4936553",
894
913
  "title": "get name()",
895
914
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
896
915
  "file": "/test/device.ts",
@@ -910,15 +929,15 @@
910
929
  "context": null,
911
930
  "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.name, 'My Testdevice');",
912
931
  "err": {},
913
- "uuid": "d3bc587c-d5bc-4141-824c-8d2ee4420cf0",
914
- "parentUUID": "7516ac74-e1d7-4bf8-9b26-420b519c3302",
932
+ "uuid": "1e054744-fb84-41c7-a941-d1f4fc0f491f",
933
+ "parentUUID": "d6d6047e-db1c-419a-96b7-bc88b4936553",
915
934
  "isHook": false,
916
935
  "skipped": false
917
936
  }
918
937
  ],
919
938
  "suites": [],
920
939
  "passes": [
921
- "d3bc587c-d5bc-4141-824c-8d2ee4420cf0"
940
+ "1e054744-fb84-41c7-a941-d1f4fc0f491f"
922
941
  ],
923
942
  "failures": [],
924
943
  "pending": [],
@@ -929,7 +948,7 @@
929
948
  "_timeout": 2000
930
949
  },
931
950
  {
932
- "uuid": "f450e6c0-b3b3-46b4-b301-14957c69a054",
951
+ "uuid": "f9d862d1-7c3b-448e-aaa6-8044562a5552",
933
952
  "title": "get host()",
934
953
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
935
954
  "file": "/test/device.ts",
@@ -949,15 +968,15 @@
949
968
  "context": null,
950
969
  "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.host, '192.168.178.2');",
951
970
  "err": {},
952
- "uuid": "61846d29-9108-4238-9faa-9ba88d5c2016",
953
- "parentUUID": "f450e6c0-b3b3-46b4-b301-14957c69a054",
971
+ "uuid": "bdb406e5-5764-4a63-abfd-302a8b19544d",
972
+ "parentUUID": "f9d862d1-7c3b-448e-aaa6-8044562a5552",
954
973
  "isHook": false,
955
974
  "skipped": false
956
975
  }
957
976
  ],
958
977
  "suites": [],
959
978
  "passes": [
960
- "61846d29-9108-4238-9faa-9ba88d5c2016"
979
+ "bdb406e5-5764-4a63-abfd-302a8b19544d"
961
980
  ],
962
981
  "failures": [],
963
982
  "pending": [],
@@ -968,7 +987,7 @@
968
987
  "_timeout": 2000
969
988
  },
970
989
  {
971
- "uuid": "b345edad-2007-4ad8-b41f-771fdd378f40",
990
+ "uuid": "8ff56529-c368-4a5a-af67-9bcebcb31073",
972
991
  "title": "get id()",
973
992
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
974
993
  "file": "/test/device.ts",
@@ -988,15 +1007,15 @@
988
1007
  "context": null,
989
1008
  "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****'\n});\nassert_1.default.strictEqual(device.id, '*****');",
990
1009
  "err": {},
991
- "uuid": "763c8861-863e-4424-b9ba-b29e68b97309",
992
- "parentUUID": "b345edad-2007-4ad8-b41f-771fdd378f40",
1010
+ "uuid": "045370cb-f768-4c24-8356-b47700818811",
1011
+ "parentUUID": "8ff56529-c368-4a5a-af67-9bcebcb31073",
993
1012
  "isHook": false,
994
1013
  "skipped": false
995
1014
  }
996
1015
  ],
997
1016
  "suites": [],
998
1017
  "passes": [
999
- "763c8861-863e-4424-b9ba-b29e68b97309"
1018
+ "045370cb-f768-4c24-8356-b47700818811"
1000
1019
  ],
1001
1020
  "failures": [],
1002
1021
  "pending": [],
@@ -1007,7 +1026,7 @@
1007
1026
  "_timeout": 2000
1008
1027
  },
1009
1028
  {
1010
- "uuid": "608daa49-7a1a-4cca-b402-110a54ec4a9f",
1029
+ "uuid": "c8a93805-e4b0-444d-b87b-0f4cf03a6129",
1011
1030
  "title": "get protocol()",
1012
1031
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1013
1032
  "file": "/test/device.ts",
@@ -1027,15 +1046,15 @@
1027
1046
  "context": null,
1028
1047
  "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n protocol: types_1.NodePyATVProtocol.airplay\n});\nassert_1.default.strictEqual(device.protocol, types_1.NodePyATVProtocol.airplay);",
1029
1048
  "err": {},
1030
- "uuid": "084970e4-b9b9-4a1d-82ef-8bd0fd9dd9e3",
1031
- "parentUUID": "608daa49-7a1a-4cca-b402-110a54ec4a9f",
1049
+ "uuid": "a42625d0-49c8-4be9-813b-135a0077b2ac",
1050
+ "parentUUID": "c8a93805-e4b0-444d-b87b-0f4cf03a6129",
1032
1051
  "isHook": false,
1033
1052
  "skipped": false
1034
1053
  }
1035
1054
  ],
1036
1055
  "suites": [],
1037
1056
  "passes": [
1038
- "084970e4-b9b9-4a1d-82ef-8bd0fd9dd9e3"
1057
+ "a42625d0-49c8-4be9-813b-135a0077b2ac"
1039
1058
  ],
1040
1059
  "failures": [],
1041
1060
  "pending": [],
@@ -1046,7 +1065,7 @@
1046
1065
  "_timeout": 2000
1047
1066
  },
1048
1067
  {
1049
- "uuid": "2de061bc-b13b-423f-86e9-8974798a239a",
1068
+ "uuid": "4b705148-6215-443e-bacd-ff6fe2d08068",
1050
1069
  "title": "get debug()",
1051
1070
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1052
1071
  "file": "/test/device.ts",
@@ -1057,7 +1076,7 @@
1057
1076
  "title": "should return true if set to true",
1058
1077
  "fullTitle": "NodePyATVDevice get debug() should return true if set to true",
1059
1078
  "timedOut": false,
1060
- "duration": 5,
1079
+ "duration": 0,
1061
1080
  "state": "passed",
1062
1081
  "speed": "fast",
1063
1082
  "pass": true,
@@ -1066,8 +1085,8 @@
1066
1085
  "context": null,
1067
1086
  "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);",
1068
1087
  "err": {},
1069
- "uuid": "87f3ec60-8773-4916-8d1a-382191830890",
1070
- "parentUUID": "2de061bc-b13b-423f-86e9-8974798a239a",
1088
+ "uuid": "84e40a70-7c36-4c10-9a37-2b3dfd0d3b5c",
1089
+ "parentUUID": "4b705148-6215-443e-bacd-ff6fe2d08068",
1071
1090
  "isHook": false,
1072
1091
  "skipped": false
1073
1092
  },
@@ -1084,8 +1103,8 @@
1084
1103
  "context": null,
1085
1104
  "code": "// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nconst device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: fn\n});\nassert_1.default.strictEqual(device.debug, fn);",
1086
1105
  "err": {},
1087
- "uuid": "6afd16c3-f469-4ea5-bbd1-e919ea2dc7b6",
1088
- "parentUUID": "2de061bc-b13b-423f-86e9-8974798a239a",
1106
+ "uuid": "94bd6979-8aa2-4c19-851b-bd54e846da45",
1107
+ "parentUUID": "4b705148-6215-443e-bacd-ff6fe2d08068",
1089
1108
  "isHook": false,
1090
1109
  "skipped": false
1091
1110
  },
@@ -1093,7 +1112,7 @@
1093
1112
  "title": "should return false if unset",
1094
1113
  "fullTitle": "NodePyATVDevice get debug() should return false if unset",
1095
1114
  "timedOut": false,
1096
- "duration": 1,
1115
+ "duration": 0,
1097
1116
  "state": "passed",
1098
1117
  "speed": "fast",
1099
1118
  "pass": true,
@@ -1102,28 +1121,28 @@
1102
1121
  "context": null,
1103
1122
  "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.debug, undefined);",
1104
1123
  "err": {},
1105
- "uuid": "764b9b80-9d55-45cd-8d63-636f774539c2",
1106
- "parentUUID": "2de061bc-b13b-423f-86e9-8974798a239a",
1124
+ "uuid": "8068945c-5c9e-40e0-83c1-51adfeba8aef",
1125
+ "parentUUID": "4b705148-6215-443e-bacd-ff6fe2d08068",
1107
1126
  "isHook": false,
1108
1127
  "skipped": false
1109
1128
  }
1110
1129
  ],
1111
1130
  "suites": [],
1112
1131
  "passes": [
1113
- "87f3ec60-8773-4916-8d1a-382191830890",
1114
- "6afd16c3-f469-4ea5-bbd1-e919ea2dc7b6",
1115
- "764b9b80-9d55-45cd-8d63-636f774539c2"
1132
+ "84e40a70-7c36-4c10-9a37-2b3dfd0d3b5c",
1133
+ "94bd6979-8aa2-4c19-851b-bd54e846da45",
1134
+ "8068945c-5c9e-40e0-83c1-51adfeba8aef"
1116
1135
  ],
1117
1136
  "failures": [],
1118
1137
  "pending": [],
1119
1138
  "skipped": [],
1120
- "duration": 6,
1139
+ "duration": 0,
1121
1140
  "root": false,
1122
1141
  "rootEmpty": false,
1123
1142
  "_timeout": 2000
1124
1143
  },
1125
1144
  {
1126
- "uuid": "1ce8646a-512a-41c4-ab98-d55e1c939204",
1145
+ "uuid": "954ec2cc-f673-4a9f-9571-f9a09a4f54d5",
1127
1146
  "title": "set debug()",
1128
1147
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1129
1148
  "file": "/test/device.ts",
@@ -1143,8 +1162,8 @@
1143
1162
  "context": null,
1144
1163
  "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.debug, undefined);\ndevice.debug = true;\nassert_1.default.strictEqual(device.debug, true);",
1145
1164
  "err": {},
1146
- "uuid": "c37a41be-997d-4930-b7a0-d765f7b853e5",
1147
- "parentUUID": "1ce8646a-512a-41c4-ab98-d55e1c939204",
1165
+ "uuid": "95e2a0a1-7244-440f-b9df-5b9a77476e69",
1166
+ "parentUUID": "954ec2cc-f673-4a9f-9571-f9a09a4f54d5",
1148
1167
  "isHook": false,
1149
1168
  "skipped": false
1150
1169
  },
@@ -1161,8 +1180,8 @@
1161
1180
  "context": null,
1162
1181
  "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert_1.default.strictEqual(device.debug, undefined);",
1163
1182
  "err": {},
1164
- "uuid": "65c0e6d6-9753-4238-a0e1-f12dae9d6f64",
1165
- "parentUUID": "1ce8646a-512a-41c4-ab98-d55e1c939204",
1183
+ "uuid": "75ad6b92-11be-414f-a519-16f0cf48c1b1",
1184
+ "parentUUID": "954ec2cc-f673-4a9f-9571-f9a09a4f54d5",
1166
1185
  "isHook": false,
1167
1186
  "skipped": false
1168
1187
  },
@@ -1179,8 +1198,8 @@
1179
1198
  "context": null,
1180
1199
  "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert_1.default.strictEqual(device.debug, undefined);",
1181
1200
  "err": {},
1182
- "uuid": "09abf20f-a0cb-4f08-a4e7-c0ab0aa3b091",
1183
- "parentUUID": "1ce8646a-512a-41c4-ab98-d55e1c939204",
1201
+ "uuid": "1da1d5d9-2c12-414e-b166-0aa95e2f4fd5",
1202
+ "parentUUID": "954ec2cc-f673-4a9f-9571-f9a09a4f54d5",
1184
1203
  "isHook": false,
1185
1204
  "skipped": false
1186
1205
  },
@@ -1188,7 +1207,7 @@
1188
1207
  "title": "should work for debug = fn",
1189
1208
  "fullTitle": "NodePyATVDevice set debug() should work for debug = fn",
1190
1209
  "timedOut": false,
1191
- "duration": 0,
1210
+ "duration": 1,
1192
1211
  "state": "passed",
1193
1212
  "speed": "fast",
1194
1213
  "pass": true,
@@ -1197,29 +1216,29 @@
1197
1216
  "context": null,
1198
1217
  "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nassert_1.default.strictEqual(device.debug, undefined);\ndevice.debug = fn;\nassert_1.default.strictEqual(device.debug, fn);",
1199
1218
  "err": {},
1200
- "uuid": "b5b0876b-7f54-4dce-a8ca-163e119a2b98",
1201
- "parentUUID": "1ce8646a-512a-41c4-ab98-d55e1c939204",
1219
+ "uuid": "76a6404d-b838-48a9-ab1b-a9fba953508d",
1220
+ "parentUUID": "954ec2cc-f673-4a9f-9571-f9a09a4f54d5",
1202
1221
  "isHook": false,
1203
1222
  "skipped": false
1204
1223
  }
1205
1224
  ],
1206
1225
  "suites": [],
1207
1226
  "passes": [
1208
- "c37a41be-997d-4930-b7a0-d765f7b853e5",
1209
- "65c0e6d6-9753-4238-a0e1-f12dae9d6f64",
1210
- "09abf20f-a0cb-4f08-a4e7-c0ab0aa3b091",
1211
- "b5b0876b-7f54-4dce-a8ca-163e119a2b98"
1227
+ "95e2a0a1-7244-440f-b9df-5b9a77476e69",
1228
+ "75ad6b92-11be-414f-a519-16f0cf48c1b1",
1229
+ "1da1d5d9-2c12-414e-b166-0aa95e2f4fd5",
1230
+ "76a6404d-b838-48a9-ab1b-a9fba953508d"
1212
1231
  ],
1213
1232
  "failures": [],
1214
1233
  "pending": [],
1215
1234
  "skipped": [],
1216
- "duration": 0,
1235
+ "duration": 1,
1217
1236
  "root": false,
1218
1237
  "rootEmpty": false,
1219
1238
  "_timeout": 2000
1220
1239
  },
1221
1240
  {
1222
- "uuid": "cb5b26c4-187d-48f4-8f84-c9cf42dbd9e1",
1241
+ "uuid": "95dcee3b-98b2-4b4d-91a7-85e1b8a58218",
1223
1242
  "title": "toJSON()",
1224
1243
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1225
1244
  "file": "/test/device.ts",
@@ -1239,8 +1258,8 @@
1239
1258
  "context": null,
1240
1259
  "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n});\nassert_1.default.deepEqual(device.toJSON(), {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n});",
1241
1260
  "err": {},
1242
- "uuid": "d9090746-d441-460b-ac79-efb967ceca6b",
1243
- "parentUUID": "cb5b26c4-187d-48f4-8f84-c9cf42dbd9e1",
1261
+ "uuid": "17a21ed1-7638-416d-9233-5d05280b8ba0",
1262
+ "parentUUID": "95dcee3b-98b2-4b4d-91a7-85e1b8a58218",
1244
1263
  "isHook": false,
1245
1264
  "skipped": false
1246
1265
  },
@@ -1257,16 +1276,16 @@
1257
1276
  "context": null,
1258
1277
  "code": "const config = {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n};\nconst deviceA = new device_1.default(config);\nconst deviceB = new device_1.default(deviceA.toJSON());\nassert_1.default.deepEqual(deviceB.toJSON(), config);",
1259
1278
  "err": {},
1260
- "uuid": "2292d051-1498-4bdc-921e-d3760dc8afcd",
1261
- "parentUUID": "cb5b26c4-187d-48f4-8f84-c9cf42dbd9e1",
1279
+ "uuid": "8509845b-9b5a-496f-93e5-58b2cf912e70",
1280
+ "parentUUID": "95dcee3b-98b2-4b4d-91a7-85e1b8a58218",
1262
1281
  "isHook": false,
1263
1282
  "skipped": false
1264
1283
  }
1265
1284
  ],
1266
1285
  "suites": [],
1267
1286
  "passes": [
1268
- "d9090746-d441-460b-ac79-efb967ceca6b",
1269
- "2292d051-1498-4bdc-921e-d3760dc8afcd"
1287
+ "17a21ed1-7638-416d-9233-5d05280b8ba0",
1288
+ "8509845b-9b5a-496f-93e5-58b2cf912e70"
1270
1289
  ],
1271
1290
  "failures": [],
1272
1291
  "pending": [],
@@ -1277,7 +1296,7 @@
1277
1296
  "_timeout": 2000
1278
1297
  },
1279
1298
  {
1280
- "uuid": "c1ee0fb8-bb74-495f-9f96-a954324187e9",
1299
+ "uuid": "796754c5-ff66-4f73-957a-6e3afd20895f",
1281
1300
  "title": "toString()",
1282
1301
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1283
1302
  "file": "/test/device.ts",
@@ -1297,15 +1316,15 @@
1297
1316
  "context": null,
1298
1317
  "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.toString(), 'NodePyATVDevice(My Testdevice, 192.168.178.2)');",
1299
1318
  "err": {},
1300
- "uuid": "bc014dbb-9b53-44a3-8ed5-f6d82378a0d5",
1301
- "parentUUID": "c1ee0fb8-bb74-495f-9f96-a954324187e9",
1319
+ "uuid": "e6bf6f46-1128-44cd-8cc8-0ede823e7f5f",
1320
+ "parentUUID": "796754c5-ff66-4f73-957a-6e3afd20895f",
1302
1321
  "isHook": false,
1303
1322
  "skipped": false
1304
1323
  }
1305
1324
  ],
1306
1325
  "suites": [],
1307
1326
  "passes": [
1308
- "bc014dbb-9b53-44a3-8ed5-f6d82378a0d5"
1327
+ "e6bf6f46-1128-44cd-8cc8-0ede823e7f5f"
1309
1328
  ],
1310
1329
  "failures": [],
1311
1330
  "pending": [],
@@ -1316,7 +1335,7 @@
1316
1335
  "_timeout": 2000
1317
1336
  },
1318
1337
  {
1319
- "uuid": "362ce3fe-8259-4326-99fb-6c66b06e4115",
1338
+ "uuid": "15f6c17f-d4ec-43a2-ac1b-1544c0358abe",
1320
1339
  "title": "getState()",
1321
1340
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1322
1341
  "file": "/test/device.ts",
@@ -1336,8 +1355,8 @@
1336
1355
  "context": null,
1337
1356
  "code": "",
1338
1357
  "err": {},
1339
- "uuid": "029934ba-0985-4e1c-a42b-2c635f06fb61",
1340
- "parentUUID": "362ce3fe-8259-4326-99fb-6c66b06e4115",
1358
+ "uuid": "fc419efd-4ddb-4a0f-96b9-a005615d001a",
1359
+ "parentUUID": "15f6c17f-d4ec-43a2-ac1b-1544c0358abe",
1341
1360
  "isHook": false,
1342
1361
  "skipped": false
1343
1362
  },
@@ -1352,10 +1371,28 @@
1352
1371
  "fail": false,
1353
1372
  "pending": false,
1354
1373
  "context": null,
1355
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const result = yield device.getState();\n assert_1.default.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: types_1.NodePyATVMediaType.video,\n deviceState: types_1.NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: types_1.NodePyATVShuffleState.off,\n repeat: types_1.NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n });\n});",
1374
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const result = yield device.getState();\n assert_1.default.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: types_1.NodePyATVMediaType.video,\n deviceState: types_1.NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: types_1.NodePyATVShuffleState.off,\n repeat: types_1.NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n });\n});",
1356
1375
  "err": {},
1357
- "uuid": "cfa0d1a8-e176-44b5-a804-128bfda2d760",
1358
- "parentUUID": "362ce3fe-8259-4326-99fb-6c66b06e4115",
1376
+ "uuid": "b1cd3855-f444-4d1b-9990-7e260d98ca74",
1377
+ "parentUUID": "15f6c17f-d4ec-43a2-ac1b-1544c0358abe",
1378
+ "isHook": false,
1379
+ "skipped": false
1380
+ },
1381
+ {
1382
+ "title": "should reject with error if pyatv fails",
1383
+ "fullTitle": "NodePyATVDevice getState() should reject with error if pyatv fails",
1384
+ "timedOut": false,
1385
+ "duration": 0,
1386
+ "state": "passed",
1387
+ "speed": "fast",
1388
+ "pass": true,
1389
+ "fail": false,
1390
+ "pending": false,
1391
+ "context": null,
1392
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n });\n })\n });\n assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield device.getState();\n }), /Got pyatv Error: invalid credentials: 321/);\n});",
1393
+ "err": {},
1394
+ "uuid": "2b7136d5-ffb2-41c6-99e6-1a8b55dc0ff7",
1395
+ "parentUUID": "15f6c17f-d4ec-43a2-ac1b-1544c0358abe",
1359
1396
  "isHook": false,
1360
1397
  "skipped": false
1361
1398
  },
@@ -1363,17 +1400,17 @@
1363
1400
  "title": "should cache requests for a bit",
1364
1401
  "fullTitle": "NodePyATVDevice getState() should cache requests for a bit",
1365
1402
  "timedOut": false,
1366
- "duration": 1,
1403
+ "duration": 2,
1367
1404
  "state": "passed",
1368
1405
  "speed": "fast",
1369
1406
  "pass": true,
1370
1407
  "fail": false,
1371
1408
  "pending": false,
1372
1409
  "context": null,
1373
- "code": "return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: new Date().toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n const secondResult = yield device.getState();\n assert_1.default.strictEqual(firstResult.dateTime, secondResult.dateTime);\n assert_1.default.strictEqual(executions, 1);\n});",
1410
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: new Date().toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n const secondResult = yield device.getState();\n assert_1.default.strictEqual(firstResult.dateTime, secondResult.dateTime);\n assert_1.default.strictEqual(executions, 1);\n});",
1374
1411
  "err": {},
1375
- "uuid": "c03a0866-c6b5-4e69-9421-09e44217c10e",
1376
- "parentUUID": "362ce3fe-8259-4326-99fb-6c66b06e4115",
1412
+ "uuid": "0576bc17-474c-4988-8bd8-d9c0d9f4a0fb",
1413
+ "parentUUID": "15f6c17f-d4ec-43a2-ac1b-1544c0358abe",
1377
1414
  "isHook": false,
1378
1415
  "skipped": false
1379
1416
  },
@@ -1388,32 +1425,33 @@
1388
1425
  "fail": false,
1389
1426
  "pending": false,
1390
1427
  "context": null,
1391
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n datetime: new Date(new Date().getTime() - 1000).toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n assert_1.default.strictEqual(firstResult.position, 27);\n const secondResult = yield device.getState();\n assert_1.default.ok(secondResult.position);\n assert_1.default.ok(secondResult.position > 27, `Position should be > 27, was ${secondResult.position}`);\n assert_1.default.ok(secondResult.position < 30, `Position should be > 27, was ${secondResult.position}`);\n});",
1428
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: new Date(new Date().getTime() - 1000).toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n assert_1.default.strictEqual(firstResult.position, 27);\n const secondResult = yield device.getState();\n assert_1.default.ok(secondResult.position);\n assert_1.default.ok(secondResult.position > 27, `Position should be > 27, was ${secondResult.position}`);\n assert_1.default.ok(secondResult.position < 30, `Position should be > 27, was ${secondResult.position}`);\n});",
1392
1429
  "err": {},
1393
- "uuid": "0efc73bb-0cb2-4ef8-bdf3-f00ee6efed9d",
1394
- "parentUUID": "362ce3fe-8259-4326-99fb-6c66b06e4115",
1430
+ "uuid": "24e586cb-aeeb-4cd3-aa99-38ba94f826ed",
1431
+ "parentUUID": "15f6c17f-d4ec-43a2-ac1b-1544c0358abe",
1395
1432
  "isHook": false,
1396
1433
  "skipped": false
1397
1434
  }
1398
1435
  ],
1399
1436
  "suites": [],
1400
1437
  "passes": [
1401
- "cfa0d1a8-e176-44b5-a804-128bfda2d760",
1402
- "c03a0866-c6b5-4e69-9421-09e44217c10e",
1403
- "0efc73bb-0cb2-4ef8-bdf3-f00ee6efed9d"
1438
+ "b1cd3855-f444-4d1b-9990-7e260d98ca74",
1439
+ "2b7136d5-ffb2-41c6-99e6-1a8b55dc0ff7",
1440
+ "0576bc17-474c-4988-8bd8-d9c0d9f4a0fb",
1441
+ "24e586cb-aeeb-4cd3-aa99-38ba94f826ed"
1404
1442
  ],
1405
1443
  "failures": [],
1406
1444
  "pending": [
1407
- "029934ba-0985-4e1c-a42b-2c635f06fb61"
1445
+ "fc419efd-4ddb-4a0f-96b9-a005615d001a"
1408
1446
  ],
1409
1447
  "skipped": [],
1410
- "duration": 4,
1448
+ "duration": 5,
1411
1449
  "root": false,
1412
1450
  "rootEmpty": false,
1413
1451
  "_timeout": 2000
1414
1452
  },
1415
1453
  {
1416
- "uuid": "1b6ae89f-4d91-41cd-b7ce-3fe8ff0565d9",
1454
+ "uuid": "8d927ef8-8dcd-40b1-9767-9ef08ec4fd76",
1417
1455
  "title": "clearState()",
1418
1456
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1419
1457
  "file": "/test/device.ts",
@@ -1431,17 +1469,17 @@
1431
1469
  "fail": false,
1432
1470
  "pending": false,
1433
1471
  "context": null,
1434
- "code": "return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n title: 'Solo: A Star Wars Story'\n });\n })\n });\n assert_1.default.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n device.clearState();\n assert_1.default.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n assert_1.default.strictEqual(executions, 2);\n});",
1472
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n title: 'Solo: A Star Wars Story'\n });\n })\n });\n assert_1.default.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n device.clearState();\n assert_1.default.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n assert_1.default.strictEqual(executions, 2);\n});",
1435
1473
  "err": {},
1436
- "uuid": "2dcfb213-0578-4bc5-98f1-219bb5e9dcef",
1437
- "parentUUID": "1b6ae89f-4d91-41cd-b7ce-3fe8ff0565d9",
1474
+ "uuid": "1f0e9bb4-948f-452a-b9f1-4a7ef4ca9a2a",
1475
+ "parentUUID": "8d927ef8-8dcd-40b1-9767-9ef08ec4fd76",
1438
1476
  "isHook": false,
1439
1477
  "skipped": false
1440
1478
  }
1441
1479
  ],
1442
1480
  "suites": [],
1443
1481
  "passes": [
1444
- "2dcfb213-0578-4bc5-98f1-219bb5e9dcef"
1482
+ "1f0e9bb4-948f-452a-b9f1-4a7ef4ca9a2a"
1445
1483
  ],
1446
1484
  "failures": [],
1447
1485
  "pending": [],
@@ -1452,7 +1490,7 @@
1452
1490
  "_timeout": 2000
1453
1491
  },
1454
1492
  {
1455
- "uuid": "d8df4a39-aa1b-461e-a4a3-1f6fe32299f6",
1493
+ "uuid": "92ea1414-8d85-431e-9d1c-0c0c7e40f1d2",
1456
1494
  "title": "getDateTime()",
1457
1495
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1458
1496
  "file": "/test/device.ts",
@@ -1463,35 +1501,35 @@
1463
1501
  "title": "should work",
1464
1502
  "fullTitle": "NodePyATVDevice getDateTime() should work",
1465
1503
  "timedOut": false,
1466
- "duration": 1,
1504
+ "duration": 2,
1467
1505
  "state": "passed",
1468
1506
  "speed": "fast",
1469
1507
  "pass": true,
1470
1508
  "fail": false,
1471
1509
  "pending": false,
1472
1510
  "context": null,
1473
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n datetime: new Date().toJSON()\n });\n })\n });\n const result = yield device.getDateTime();\n assert_1.default.ok(result instanceof Date);\n});",
1511
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: new Date().toJSON()\n });\n })\n });\n const result = yield device.getDateTime();\n assert_1.default.ok(result instanceof Date);\n});",
1474
1512
  "err": {},
1475
- "uuid": "c6049b18-718e-4c68-b162-4b291a5f853f",
1476
- "parentUUID": "d8df4a39-aa1b-461e-a4a3-1f6fe32299f6",
1513
+ "uuid": "7cf1f7da-cef4-4086-9235-dc03d063a90f",
1514
+ "parentUUID": "92ea1414-8d85-431e-9d1c-0c0c7e40f1d2",
1477
1515
  "isHook": false,
1478
1516
  "skipped": false
1479
1517
  }
1480
1518
  ],
1481
1519
  "suites": [],
1482
1520
  "passes": [
1483
- "c6049b18-718e-4c68-b162-4b291a5f853f"
1521
+ "7cf1f7da-cef4-4086-9235-dc03d063a90f"
1484
1522
  ],
1485
1523
  "failures": [],
1486
1524
  "pending": [],
1487
1525
  "skipped": [],
1488
- "duration": 1,
1526
+ "duration": 2,
1489
1527
  "root": false,
1490
1528
  "rootEmpty": false,
1491
1529
  "_timeout": 2000
1492
1530
  },
1493
1531
  {
1494
- "uuid": "452d62ee-f878-4bc5-8c52-fd1c07b032ef",
1532
+ "uuid": "500acdc2-a011-463b-b890-bd5a735111a8",
1495
1533
  "title": "getHash()",
1496
1534
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1497
1535
  "file": "/test/device.ts",
@@ -1502,35 +1540,35 @@
1502
1540
  "title": "should work",
1503
1541
  "fullTitle": "NodePyATVDevice getHash() should work",
1504
1542
  "timedOut": false,
1505
- "duration": 1,
1543
+ "duration": 2,
1506
1544
  "state": "passed",
1507
1545
  "speed": "fast",
1508
1546
  "pass": true,
1509
1547
  "fail": false,
1510
1548
  "pending": false,
1511
1549
  "context": null,
1512
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n hash: '12345'\n });\n })\n });\n const result = yield device.getHash();\n assert_1.default.strictEqual(result, '12345');\n});",
1550
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n hash: '12345'\n });\n })\n });\n const result = yield device.getHash();\n assert_1.default.strictEqual(result, '12345');\n});",
1513
1551
  "err": {},
1514
- "uuid": "29fe0d3e-b941-4fb1-83c1-872bb97f1bfb",
1515
- "parentUUID": "452d62ee-f878-4bc5-8c52-fd1c07b032ef",
1552
+ "uuid": "78e06f59-ba81-4041-9c30-668f2d27e2a5",
1553
+ "parentUUID": "500acdc2-a011-463b-b890-bd5a735111a8",
1516
1554
  "isHook": false,
1517
1555
  "skipped": false
1518
1556
  }
1519
1557
  ],
1520
1558
  "suites": [],
1521
1559
  "passes": [
1522
- "29fe0d3e-b941-4fb1-83c1-872bb97f1bfb"
1560
+ "78e06f59-ba81-4041-9c30-668f2d27e2a5"
1523
1561
  ],
1524
1562
  "failures": [],
1525
1563
  "pending": [],
1526
1564
  "skipped": [],
1527
- "duration": 1,
1565
+ "duration": 2,
1528
1566
  "root": false,
1529
1567
  "rootEmpty": false,
1530
1568
  "_timeout": 2000
1531
1569
  },
1532
1570
  {
1533
- "uuid": "261c75c8-342f-4a85-bf41-4f7a39a219fc",
1571
+ "uuid": "38b195ac-c959-4077-9ea4-53883e1e6862",
1534
1572
  "title": "getMediaType()",
1535
1573
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1536
1574
  "file": "/test/device.ts",
@@ -1541,35 +1579,35 @@
1541
1579
  "title": "should work",
1542
1580
  "fullTitle": "NodePyATVDevice getMediaType() should work",
1543
1581
  "timedOut": false,
1544
- "duration": 1,
1582
+ "duration": 2,
1545
1583
  "state": "passed",
1546
1584
  "speed": "fast",
1547
1585
  "pass": true,
1548
1586
  "fail": false,
1549
1587
  "pending": false,
1550
1588
  "context": null,
1551
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n media_type: 'video'\n });\n })\n });\n const result = yield device.getMediaType();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVMediaType.video);\n assert_1.default.deepStrictEqual(result, 'video');\n});",
1589
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n media_type: 'video'\n });\n })\n });\n const result = yield device.getMediaType();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVMediaType.video);\n assert_1.default.deepStrictEqual(result, 'video');\n});",
1552
1590
  "err": {},
1553
- "uuid": "189e0bdf-2fa5-47a6-9744-b3abbb975789",
1554
- "parentUUID": "261c75c8-342f-4a85-bf41-4f7a39a219fc",
1591
+ "uuid": "f5dcdeff-e0d9-4aa7-9853-c1ccca29fbb1",
1592
+ "parentUUID": "38b195ac-c959-4077-9ea4-53883e1e6862",
1555
1593
  "isHook": false,
1556
1594
  "skipped": false
1557
1595
  }
1558
1596
  ],
1559
1597
  "suites": [],
1560
1598
  "passes": [
1561
- "189e0bdf-2fa5-47a6-9744-b3abbb975789"
1599
+ "f5dcdeff-e0d9-4aa7-9853-c1ccca29fbb1"
1562
1600
  ],
1563
1601
  "failures": [],
1564
1602
  "pending": [],
1565
1603
  "skipped": [],
1566
- "duration": 1,
1604
+ "duration": 2,
1567
1605
  "root": false,
1568
1606
  "rootEmpty": false,
1569
1607
  "_timeout": 2000
1570
1608
  },
1571
1609
  {
1572
- "uuid": "09674526-af0e-474b-87b0-b1b8f1bc49e4",
1610
+ "uuid": "49b88e97-8257-4a4e-a80e-6f692d20ab6b",
1573
1611
  "title": "getDeviceState()",
1574
1612
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1575
1613
  "file": "/test/device.ts",
@@ -1580,35 +1618,35 @@
1580
1618
  "title": "should work",
1581
1619
  "fullTitle": "NodePyATVDevice getDeviceState() should work",
1582
1620
  "timedOut": false,
1583
- "duration": 1,
1621
+ "duration": 2,
1584
1622
  "state": "passed",
1585
1623
  "speed": "fast",
1586
1624
  "pass": true,
1587
1625
  "fail": false,
1588
1626
  "pending": false,
1589
1627
  "context": null,
1590
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n device_state: 'seeking'\n });\n })\n });\n const result = yield device.getDeviceState();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVDeviceState.seeking);\n assert_1.default.deepStrictEqual(result, 'seeking');\n});",
1628
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n device_state: 'seeking'\n });\n })\n });\n const result = yield device.getDeviceState();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVDeviceState.seeking);\n assert_1.default.deepStrictEqual(result, 'seeking');\n});",
1591
1629
  "err": {},
1592
- "uuid": "77df9312-affd-4e74-9d97-cc236c141755",
1593
- "parentUUID": "09674526-af0e-474b-87b0-b1b8f1bc49e4",
1630
+ "uuid": "09e5960a-a2d3-4a94-b87b-3ae9bec46566",
1631
+ "parentUUID": "49b88e97-8257-4a4e-a80e-6f692d20ab6b",
1594
1632
  "isHook": false,
1595
1633
  "skipped": false
1596
1634
  }
1597
1635
  ],
1598
1636
  "suites": [],
1599
1637
  "passes": [
1600
- "77df9312-affd-4e74-9d97-cc236c141755"
1638
+ "09e5960a-a2d3-4a94-b87b-3ae9bec46566"
1601
1639
  ],
1602
1640
  "failures": [],
1603
1641
  "pending": [],
1604
1642
  "skipped": [],
1605
- "duration": 1,
1643
+ "duration": 2,
1606
1644
  "root": false,
1607
1645
  "rootEmpty": false,
1608
1646
  "_timeout": 2000
1609
1647
  },
1610
1648
  {
1611
- "uuid": "6d61a49b-1459-4c0f-afc9-91cc2c64eb9b",
1649
+ "uuid": "7fe5d8ed-15ca-4e70-9c86-cc8a327b3ddf",
1612
1650
  "title": "getTitle()",
1613
1651
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1614
1652
  "file": "/test/device.ts",
@@ -1619,35 +1657,35 @@
1619
1657
  "title": "should work",
1620
1658
  "fullTitle": "NodePyATVDevice getTitle() should work",
1621
1659
  "timedOut": false,
1622
- "duration": 1,
1660
+ "duration": 2,
1623
1661
  "state": "passed",
1624
1662
  "speed": "fast",
1625
1663
  "pass": true,
1626
1664
  "fail": false,
1627
1665
  "pending": false,
1628
1666
  "context": null,
1629
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const result = yield device.getTitle();\n assert_1.default.strictEqual(result, 'My Movie');\n});",
1667
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const result = yield device.getTitle();\n assert_1.default.strictEqual(result, 'My Movie');\n});",
1630
1668
  "err": {},
1631
- "uuid": "fba2aa68-6cce-4243-a740-77d151b25579",
1632
- "parentUUID": "6d61a49b-1459-4c0f-afc9-91cc2c64eb9b",
1669
+ "uuid": "5692d42d-db8d-4710-b76a-a57dee882560",
1670
+ "parentUUID": "7fe5d8ed-15ca-4e70-9c86-cc8a327b3ddf",
1633
1671
  "isHook": false,
1634
1672
  "skipped": false
1635
1673
  }
1636
1674
  ],
1637
1675
  "suites": [],
1638
1676
  "passes": [
1639
- "fba2aa68-6cce-4243-a740-77d151b25579"
1677
+ "5692d42d-db8d-4710-b76a-a57dee882560"
1640
1678
  ],
1641
1679
  "failures": [],
1642
1680
  "pending": [],
1643
1681
  "skipped": [],
1644
- "duration": 1,
1682
+ "duration": 2,
1645
1683
  "root": false,
1646
1684
  "rootEmpty": false,
1647
1685
  "_timeout": 2000
1648
1686
  },
1649
1687
  {
1650
- "uuid": "f6639e40-d3cb-472c-bd60-fdb1c9270828",
1688
+ "uuid": "469014eb-e538-4234-8807-056219a51fcf",
1651
1689
  "title": "getArtist()",
1652
1690
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1653
1691
  "file": "/test/device.ts",
@@ -1665,17 +1703,17 @@
1665
1703
  "fail": false,
1666
1704
  "pending": false,
1667
1705
  "context": null,
1668
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n artist: 'My Artist'\n });\n })\n });\n const result = yield device.getArtist();\n assert_1.default.strictEqual(result, 'My Artist');\n});",
1706
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n artist: 'My Artist'\n });\n })\n });\n const result = yield device.getArtist();\n assert_1.default.strictEqual(result, 'My Artist');\n});",
1669
1707
  "err": {},
1670
- "uuid": "2e5d2009-97ce-44d0-9840-1198a963fde9",
1671
- "parentUUID": "f6639e40-d3cb-472c-bd60-fdb1c9270828",
1708
+ "uuid": "dbf0d49e-91dc-4405-8ef4-94cebceea410",
1709
+ "parentUUID": "469014eb-e538-4234-8807-056219a51fcf",
1672
1710
  "isHook": false,
1673
1711
  "skipped": false
1674
1712
  }
1675
1713
  ],
1676
1714
  "suites": [],
1677
1715
  "passes": [
1678
- "2e5d2009-97ce-44d0-9840-1198a963fde9"
1716
+ "dbf0d49e-91dc-4405-8ef4-94cebceea410"
1679
1717
  ],
1680
1718
  "failures": [],
1681
1719
  "pending": [],
@@ -1686,7 +1724,7 @@
1686
1724
  "_timeout": 2000
1687
1725
  },
1688
1726
  {
1689
- "uuid": "87a503f5-992a-4744-844c-10cf66951b8b",
1727
+ "uuid": "d21cc2b5-f8b1-411d-b322-d780cfd29947",
1690
1728
  "title": "getAlbum()",
1691
1729
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1692
1730
  "file": "/test/device.ts",
@@ -1704,17 +1742,17 @@
1704
1742
  "fail": false,
1705
1743
  "pending": false,
1706
1744
  "context": null,
1707
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n album: 'My ALbum'\n });\n })\n });\n const result = yield device.getAlbum();\n assert_1.default.strictEqual(result, 'My ALbum');\n});",
1745
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n album: 'My ALbum'\n });\n })\n });\n const result = yield device.getAlbum();\n assert_1.default.strictEqual(result, 'My ALbum');\n});",
1708
1746
  "err": {},
1709
- "uuid": "477d646c-72ca-4c1d-b6bf-75768f8dd1c0",
1710
- "parentUUID": "87a503f5-992a-4744-844c-10cf66951b8b",
1747
+ "uuid": "131b9a1f-2ee6-40a9-9548-d992f9ec80c9",
1748
+ "parentUUID": "d21cc2b5-f8b1-411d-b322-d780cfd29947",
1711
1749
  "isHook": false,
1712
1750
  "skipped": false
1713
1751
  }
1714
1752
  ],
1715
1753
  "suites": [],
1716
1754
  "passes": [
1717
- "477d646c-72ca-4c1d-b6bf-75768f8dd1c0"
1755
+ "131b9a1f-2ee6-40a9-9548-d992f9ec80c9"
1718
1756
  ],
1719
1757
  "failures": [],
1720
1758
  "pending": [],
@@ -1725,7 +1763,7 @@
1725
1763
  "_timeout": 2000
1726
1764
  },
1727
1765
  {
1728
- "uuid": "c99878e3-baf1-4450-acb5-1253a3cc2fff",
1766
+ "uuid": "5c6f2b5f-ee6a-417b-b87b-530beee333a0",
1729
1767
  "title": "getGenre()",
1730
1768
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1731
1769
  "file": "/test/device.ts",
@@ -1743,17 +1781,17 @@
1743
1781
  "fail": false,
1744
1782
  "pending": false,
1745
1783
  "context": null,
1746
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n genre: 'My Genre'\n });\n })\n });\n const result = yield device.getGenre();\n assert_1.default.strictEqual(result, 'My Genre');\n});",
1784
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n genre: 'My Genre'\n });\n })\n });\n const result = yield device.getGenre();\n assert_1.default.strictEqual(result, 'My Genre');\n});",
1747
1785
  "err": {},
1748
- "uuid": "b34fa43d-d35a-4a3f-8541-a434a3f4d618",
1749
- "parentUUID": "c99878e3-baf1-4450-acb5-1253a3cc2fff",
1786
+ "uuid": "49e8974e-5bde-4c82-bd57-fdc3a82ab085",
1787
+ "parentUUID": "5c6f2b5f-ee6a-417b-b87b-530beee333a0",
1750
1788
  "isHook": false,
1751
1789
  "skipped": false
1752
1790
  }
1753
1791
  ],
1754
1792
  "suites": [],
1755
1793
  "passes": [
1756
- "b34fa43d-d35a-4a3f-8541-a434a3f4d618"
1794
+ "49e8974e-5bde-4c82-bd57-fdc3a82ab085"
1757
1795
  ],
1758
1796
  "failures": [],
1759
1797
  "pending": [],
@@ -1764,7 +1802,7 @@
1764
1802
  "_timeout": 2000
1765
1803
  },
1766
1804
  {
1767
- "uuid": "e9237697-e169-4371-9679-2a2fbd404296",
1805
+ "uuid": "da2aaa2b-bafe-484f-818c-de88886d5410",
1768
1806
  "title": "getTotalTime()",
1769
1807
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1770
1808
  "file": "/test/device.ts",
@@ -1782,17 +1820,17 @@
1782
1820
  "fail": false,
1783
1821
  "pending": false,
1784
1822
  "context": null,
1785
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n total_time: 45\n });\n })\n });\n const result = yield device.getTotalTime();\n assert_1.default.strictEqual(result, 45);\n});",
1823
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n total_time: 45\n });\n })\n });\n const result = yield device.getTotalTime();\n assert_1.default.strictEqual(result, 45);\n});",
1786
1824
  "err": {},
1787
- "uuid": "fa8779c1-4dcf-4cfd-bb03-cc971026977e",
1788
- "parentUUID": "e9237697-e169-4371-9679-2a2fbd404296",
1825
+ "uuid": "c8895617-e86c-415d-93a3-492479b5eda0",
1826
+ "parentUUID": "da2aaa2b-bafe-484f-818c-de88886d5410",
1789
1827
  "isHook": false,
1790
1828
  "skipped": false
1791
1829
  }
1792
1830
  ],
1793
1831
  "suites": [],
1794
1832
  "passes": [
1795
- "fa8779c1-4dcf-4cfd-bb03-cc971026977e"
1833
+ "c8895617-e86c-415d-93a3-492479b5eda0"
1796
1834
  ],
1797
1835
  "failures": [],
1798
1836
  "pending": [],
@@ -1803,7 +1841,7 @@
1803
1841
  "_timeout": 2000
1804
1842
  },
1805
1843
  {
1806
- "uuid": "afba4f33-27fe-44ca-a344-96561615aad5",
1844
+ "uuid": "d09140a9-b33a-48d4-af0e-7cec0e15c8e7",
1807
1845
  "title": "getPosition()",
1808
1846
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1809
1847
  "file": "/test/device.ts",
@@ -1821,17 +1859,17 @@
1821
1859
  "fail": false,
1822
1860
  "pending": false,
1823
1861
  "context": null,
1824
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n position: 30\n });\n })\n });\n const result = yield device.getPosition();\n assert_1.default.strictEqual(result, 30);\n});",
1862
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n position: 30\n });\n })\n });\n const result = yield device.getPosition();\n assert_1.default.strictEqual(result, 30);\n});",
1825
1863
  "err": {},
1826
- "uuid": "1de62da9-ab38-4f13-9c9e-c9d32f169e70",
1827
- "parentUUID": "afba4f33-27fe-44ca-a344-96561615aad5",
1864
+ "uuid": "79623525-ce57-4577-873f-25ccc561a665",
1865
+ "parentUUID": "d09140a9-b33a-48d4-af0e-7cec0e15c8e7",
1828
1866
  "isHook": false,
1829
1867
  "skipped": false
1830
1868
  }
1831
1869
  ],
1832
1870
  "suites": [],
1833
1871
  "passes": [
1834
- "1de62da9-ab38-4f13-9c9e-c9d32f169e70"
1872
+ "79623525-ce57-4577-873f-25ccc561a665"
1835
1873
  ],
1836
1874
  "failures": [],
1837
1875
  "pending": [],
@@ -1842,7 +1880,7 @@
1842
1880
  "_timeout": 2000
1843
1881
  },
1844
1882
  {
1845
- "uuid": "50b310cf-00c9-43bf-97ba-e891e43ccabc",
1883
+ "uuid": "0fd32466-f620-431b-99d0-6b97bb77b5f5",
1846
1884
  "title": "getShuffle()",
1847
1885
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1848
1886
  "file": "/test/device.ts",
@@ -1860,17 +1898,17 @@
1860
1898
  "fail": false,
1861
1899
  "pending": false,
1862
1900
  "context": null,
1863
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n shuffle: 'songs'\n });\n })\n });\n const result = yield device.getShuffle();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVShuffleState.songs);\n assert_1.default.deepStrictEqual(result, 'songs');\n});",
1901
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n shuffle: 'songs'\n });\n })\n });\n const result = yield device.getShuffle();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVShuffleState.songs);\n assert_1.default.deepStrictEqual(result, 'songs');\n});",
1864
1902
  "err": {},
1865
- "uuid": "ce3ffaaa-3865-4fbf-9203-22f52c4189a3",
1866
- "parentUUID": "50b310cf-00c9-43bf-97ba-e891e43ccabc",
1903
+ "uuid": "a74de3ca-671d-4df8-9c3e-99a56d06edca",
1904
+ "parentUUID": "0fd32466-f620-431b-99d0-6b97bb77b5f5",
1867
1905
  "isHook": false,
1868
1906
  "skipped": false
1869
1907
  }
1870
1908
  ],
1871
1909
  "suites": [],
1872
1910
  "passes": [
1873
- "ce3ffaaa-3865-4fbf-9203-22f52c4189a3"
1911
+ "a74de3ca-671d-4df8-9c3e-99a56d06edca"
1874
1912
  ],
1875
1913
  "failures": [],
1876
1914
  "pending": [],
@@ -1881,7 +1919,7 @@
1881
1919
  "_timeout": 2000
1882
1920
  },
1883
1921
  {
1884
- "uuid": "f4ffdbdf-e30f-4d6f-91cd-841ff555f80f",
1922
+ "uuid": "9d7bdd24-5911-4c81-9055-595a7598e6d3",
1885
1923
  "title": "getRepeat()",
1886
1924
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1887
1925
  "file": "/test/device.ts",
@@ -1899,17 +1937,17 @@
1899
1937
  "fail": false,
1900
1938
  "pending": false,
1901
1939
  "context": null,
1902
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n repeat: 'all'\n });\n })\n });\n const result = yield device.getRepeat();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVRepeatState.all);\n assert_1.default.deepStrictEqual(result, 'all');\n});",
1940
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n repeat: 'all'\n });\n })\n });\n const result = yield device.getRepeat();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVRepeatState.all);\n assert_1.default.deepStrictEqual(result, 'all');\n});",
1903
1941
  "err": {},
1904
- "uuid": "f692f5bb-6c94-4bbf-870f-884a46378ca4",
1905
- "parentUUID": "f4ffdbdf-e30f-4d6f-91cd-841ff555f80f",
1942
+ "uuid": "979cf49b-96da-4042-a933-d3050bdd6dda",
1943
+ "parentUUID": "9d7bdd24-5911-4c81-9055-595a7598e6d3",
1906
1944
  "isHook": false,
1907
1945
  "skipped": false
1908
1946
  }
1909
1947
  ],
1910
1948
  "suites": [],
1911
1949
  "passes": [
1912
- "f692f5bb-6c94-4bbf-870f-884a46378ca4"
1950
+ "979cf49b-96da-4042-a933-d3050bdd6dda"
1913
1951
  ],
1914
1952
  "failures": [],
1915
1953
  "pending": [],
@@ -1920,7 +1958,7 @@
1920
1958
  "_timeout": 2000
1921
1959
  },
1922
1960
  {
1923
- "uuid": "bf91175e-957b-4e60-b6f3-43c9c3cd5e40",
1961
+ "uuid": "75a8515a-94f5-4ad7-8c59-9efef57e4728",
1924
1962
  "title": "getApp()",
1925
1963
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1926
1964
  "file": "/test/device.ts",
@@ -1938,17 +1976,17 @@
1938
1976
  "fail": false,
1939
1977
  "pending": false,
1940
1978
  "context": null,
1941
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n app: 'My App'\n });\n })\n });\n const result = yield device.getApp();\n assert_1.default.strictEqual(result, 'My App');\n});",
1979
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n app: 'My App'\n });\n })\n });\n const result = yield device.getApp();\n assert_1.default.strictEqual(result, 'My App');\n});",
1942
1980
  "err": {},
1943
- "uuid": "ffc528c0-48a6-4293-8597-b98bd1260cb6",
1944
- "parentUUID": "bf91175e-957b-4e60-b6f3-43c9c3cd5e40",
1981
+ "uuid": "a90637e2-7ad0-49f7-8f34-9e37d933090a",
1982
+ "parentUUID": "75a8515a-94f5-4ad7-8c59-9efef57e4728",
1945
1983
  "isHook": false,
1946
1984
  "skipped": false
1947
1985
  }
1948
1986
  ],
1949
1987
  "suites": [],
1950
1988
  "passes": [
1951
- "ffc528c0-48a6-4293-8597-b98bd1260cb6"
1989
+ "a90637e2-7ad0-49f7-8f34-9e37d933090a"
1952
1990
  ],
1953
1991
  "failures": [],
1954
1992
  "pending": [],
@@ -1959,7 +1997,7 @@
1959
1997
  "_timeout": 2000
1960
1998
  },
1961
1999
  {
1962
- "uuid": "af2e5299-c66e-433b-b90f-c00a66a9fdfc",
2000
+ "uuid": "f0d0893a-290c-4727-b13e-dc18dbe8b758",
1963
2001
  "title": "getAppId()",
1964
2002
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1965
2003
  "file": "/test/device.ts",
@@ -1977,17 +2015,17 @@
1977
2015
  "fail": false,
1978
2016
  "pending": false,
1979
2017
  "context": null,
1980
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n app_id: 'app.example.com'\n });\n })\n });\n const result = yield device.getAppId();\n assert_1.default.strictEqual(result, 'app.example.com');\n});",
2018
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n app_id: 'app.example.com'\n });\n })\n });\n const result = yield device.getAppId();\n assert_1.default.strictEqual(result, 'app.example.com');\n});",
1981
2019
  "err": {},
1982
- "uuid": "388bebbe-98fb-43e2-8e0a-87a3f1ce8bfe",
1983
- "parentUUID": "af2e5299-c66e-433b-b90f-c00a66a9fdfc",
2020
+ "uuid": "d046c1ec-4872-4e85-85e1-2d2a19333511",
2021
+ "parentUUID": "f0d0893a-290c-4727-b13e-dc18dbe8b758",
1984
2022
  "isHook": false,
1985
2023
  "skipped": false
1986
2024
  }
1987
2025
  ],
1988
2026
  "suites": [],
1989
2027
  "passes": [
1990
- "388bebbe-98fb-43e2-8e0a-87a3f1ce8bfe"
2028
+ "d046c1ec-4872-4e85-85e1-2d2a19333511"
1991
2029
  ],
1992
2030
  "failures": [],
1993
2031
  "pending": [],
@@ -1998,7 +2036,7 @@
1998
2036
  "_timeout": 2000
1999
2037
  },
2000
2038
  {
2001
- "uuid": "383887e0-e612-4acd-9cab-bd157e0f0bd5",
2039
+ "uuid": "9fce90af-65ce-487f-acea-bfa61728ce80",
2002
2040
  "title": "pressKey()",
2003
2041
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2004
2042
  "file": "/test/device.ts",
@@ -2016,10 +2054,10 @@
2016
2054
  "fail": false,
2017
2055
  "pending": false,
2018
2056
  "context": null,
2019
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n yield device.pressKey(types_1.NodePyATVKeys.home);\n});",
2057
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n yield device.pressKey(types_1.NodePyATVKeys.home);\n});",
2020
2058
  "err": {},
2021
- "uuid": "8e740431-efc3-4496-b9e7-3e17dbacb8c4",
2022
- "parentUUID": "383887e0-e612-4acd-9cab-bd157e0f0bd5",
2059
+ "uuid": "2152cf71-8376-4681-a139-afff859fabfc",
2060
+ "parentUUID": "9fce90af-65ce-487f-acea-bfa61728ce80",
2023
2061
  "isHook": false,
2024
2062
  "skipped": false
2025
2063
  },
@@ -2027,7 +2065,7 @@
2027
2065
  "title": "should throw error with invalid key",
2028
2066
  "fullTitle": "NodePyATVDevice pressKey() should throw error with invalid key",
2029
2067
  "timedOut": false,
2030
- "duration": 0,
2068
+ "duration": 1,
2031
2069
  "state": "passed",
2032
2070
  "speed": "fast",
2033
2071
  "pass": true,
@@ -2036,8 +2074,8 @@
2036
2074
  "context": null,
2037
2075
  "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n // @ts-ignore\n yield device.pressKey('foo');\n }), /Unsupported key value foo/);\n});",
2038
2076
  "err": {},
2039
- "uuid": "b8d1fdd7-a4b8-4e01-9fb2-4120901d19ca",
2040
- "parentUUID": "383887e0-e612-4acd-9cab-bd157e0f0bd5",
2077
+ "uuid": "d73d5340-b238-4a60-bfe9-42d38aa31d78",
2078
+ "parentUUID": "9fce90af-65ce-487f-acea-bfa61728ce80",
2041
2079
  "isHook": false,
2042
2080
  "skipped": false
2043
2081
  },
@@ -2045,37 +2083,37 @@
2045
2083
  "title": "should throw error if pyatv result is not success",
2046
2084
  "fullTitle": "NodePyATVDevice pressKey() should throw error if pyatv result is not success",
2047
2085
  "timedOut": false,
2048
- "duration": 1,
2086
+ "duration": 2,
2049
2087
  "state": "passed",
2050
2088
  "speed": "fast",
2051
2089
  "pass": true,
2052
2090
  "fail": false,
2053
2091
  "pending": false,
2054
2092
  "context": null,
2055
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"failure\"}');\n })\n });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield device.pressKey(types_1.NodePyATVKeys.home);\n }), /Unable to parse pyatv response/);\n});",
2093
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"failure\"}');\n })\n });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield device.pressKey(types_1.NodePyATVKeys.home);\n }), /Unable to parse pyatv response/);\n});",
2056
2094
  "err": {},
2057
- "uuid": "3c5a287a-4417-489d-bb5a-636f692eb2c1",
2058
- "parentUUID": "383887e0-e612-4acd-9cab-bd157e0f0bd5",
2095
+ "uuid": "436bf85c-13a4-4135-b65d-c0c7b4145a14",
2096
+ "parentUUID": "9fce90af-65ce-487f-acea-bfa61728ce80",
2059
2097
  "isHook": false,
2060
2098
  "skipped": false
2061
2099
  }
2062
2100
  ],
2063
2101
  "suites": [],
2064
2102
  "passes": [
2065
- "8e740431-efc3-4496-b9e7-3e17dbacb8c4",
2066
- "b8d1fdd7-a4b8-4e01-9fb2-4120901d19ca",
2067
- "3c5a287a-4417-489d-bb5a-636f692eb2c1"
2103
+ "2152cf71-8376-4681-a139-afff859fabfc",
2104
+ "d73d5340-b238-4a60-bfe9-42d38aa31d78",
2105
+ "436bf85c-13a4-4135-b65d-c0c7b4145a14"
2068
2106
  ],
2069
2107
  "failures": [],
2070
2108
  "pending": [],
2071
2109
  "skipped": [],
2072
- "duration": 3,
2110
+ "duration": 5,
2073
2111
  "root": false,
2074
2112
  "rootEmpty": false,
2075
2113
  "_timeout": 2000
2076
2114
  },
2077
2115
  {
2078
- "uuid": "0ab1d36d-ea93-4fc1-ac24-d7eb9a932c0a",
2116
+ "uuid": "395ea846-5073-447a-a313-032f080fe643",
2079
2117
  "title": "down()",
2080
2118
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2081
2119
  "file": "/test/device.ts",
@@ -2093,17 +2131,17 @@
2093
2131
  "fail": false,
2094
2132
  "pending": false,
2095
2133
  "context": null,
2096
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2134
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2097
2135
  "err": {},
2098
- "uuid": "aa2a7e00-52b5-4153-8b45-cbb91ff8cd0a",
2099
- "parentUUID": "0ab1d36d-ea93-4fc1-ac24-d7eb9a932c0a",
2136
+ "uuid": "990f6be0-2836-48a8-91a5-2aafe9959ead",
2137
+ "parentUUID": "395ea846-5073-447a-a313-032f080fe643",
2100
2138
  "isHook": false,
2101
2139
  "skipped": false
2102
2140
  }
2103
2141
  ],
2104
2142
  "suites": [],
2105
2143
  "passes": [
2106
- "aa2a7e00-52b5-4153-8b45-cbb91ff8cd0a"
2144
+ "990f6be0-2836-48a8-91a5-2aafe9959ead"
2107
2145
  ],
2108
2146
  "failures": [],
2109
2147
  "pending": [],
@@ -2114,7 +2152,7 @@
2114
2152
  "_timeout": 2000
2115
2153
  },
2116
2154
  {
2117
- "uuid": "285c3600-b478-4b24-b669-4cb22ec6a793",
2155
+ "uuid": "52c44f5e-4d70-4af3-94ae-b88fa00db903",
2118
2156
  "title": "home()",
2119
2157
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2120
2158
  "file": "/test/device.ts",
@@ -2125,35 +2163,35 @@
2125
2163
  "title": "should work",
2126
2164
  "fullTitle": "NodePyATVDevice home() should work",
2127
2165
  "timedOut": false,
2128
- "duration": 2,
2166
+ "duration": 1,
2129
2167
  "state": "passed",
2130
2168
  "speed": "fast",
2131
2169
  "pass": true,
2132
2170
  "fail": false,
2133
2171
  "pending": false,
2134
2172
  "context": null,
2135
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2173
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2136
2174
  "err": {},
2137
- "uuid": "cf100fd6-15df-488c-b2b1-a6eedcc4e178",
2138
- "parentUUID": "285c3600-b478-4b24-b669-4cb22ec6a793",
2175
+ "uuid": "02185d51-e884-4441-a49e-e46d0a06a0f2",
2176
+ "parentUUID": "52c44f5e-4d70-4af3-94ae-b88fa00db903",
2139
2177
  "isHook": false,
2140
2178
  "skipped": false
2141
2179
  }
2142
2180
  ],
2143
2181
  "suites": [],
2144
2182
  "passes": [
2145
- "cf100fd6-15df-488c-b2b1-a6eedcc4e178"
2183
+ "02185d51-e884-4441-a49e-e46d0a06a0f2"
2146
2184
  ],
2147
2185
  "failures": [],
2148
2186
  "pending": [],
2149
2187
  "skipped": [],
2150
- "duration": 2,
2188
+ "duration": 1,
2151
2189
  "root": false,
2152
2190
  "rootEmpty": false,
2153
2191
  "_timeout": 2000
2154
2192
  },
2155
2193
  {
2156
- "uuid": "5859e612-2eb0-4c00-8f26-9980c61a61be",
2194
+ "uuid": "303dda7a-7bba-460e-b3c4-f665b8ed8308",
2157
2195
  "title": "homeHold()",
2158
2196
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2159
2197
  "file": "/test/device.ts",
@@ -2164,35 +2202,35 @@
2164
2202
  "title": "should work",
2165
2203
  "fullTitle": "NodePyATVDevice homeHold() should work",
2166
2204
  "timedOut": false,
2167
- "duration": 3,
2205
+ "duration": 1,
2168
2206
  "state": "passed",
2169
2207
  "speed": "fast",
2170
2208
  "pass": true,
2171
2209
  "fail": false,
2172
2210
  "pending": false,
2173
2211
  "context": null,
2174
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2212
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2175
2213
  "err": {},
2176
- "uuid": "b64f780f-e6b6-4b69-bd15-322ef8a707f0",
2177
- "parentUUID": "5859e612-2eb0-4c00-8f26-9980c61a61be",
2214
+ "uuid": "4b1a346b-6537-4daf-90e9-bfec4301bee4",
2215
+ "parentUUID": "303dda7a-7bba-460e-b3c4-f665b8ed8308",
2178
2216
  "isHook": false,
2179
2217
  "skipped": false
2180
2218
  }
2181
2219
  ],
2182
2220
  "suites": [],
2183
2221
  "passes": [
2184
- "b64f780f-e6b6-4b69-bd15-322ef8a707f0"
2222
+ "4b1a346b-6537-4daf-90e9-bfec4301bee4"
2185
2223
  ],
2186
2224
  "failures": [],
2187
2225
  "pending": [],
2188
2226
  "skipped": [],
2189
- "duration": 3,
2227
+ "duration": 1,
2190
2228
  "root": false,
2191
2229
  "rootEmpty": false,
2192
2230
  "_timeout": 2000
2193
2231
  },
2194
2232
  {
2195
- "uuid": "676b96b8-4109-443c-871f-8cc4ecf6dcdc",
2233
+ "uuid": "5edc3f20-173f-401b-91f0-c6a41647e741",
2196
2234
  "title": "left()",
2197
2235
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2198
2236
  "file": "/test/device.ts",
@@ -2210,17 +2248,17 @@
2210
2248
  "fail": false,
2211
2249
  "pending": false,
2212
2250
  "context": null,
2213
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2251
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2214
2252
  "err": {},
2215
- "uuid": "b05faa4f-0fda-4705-8d5b-361a0e26563d",
2216
- "parentUUID": "676b96b8-4109-443c-871f-8cc4ecf6dcdc",
2253
+ "uuid": "b78139e1-f324-4bf5-be05-28bdeff30351",
2254
+ "parentUUID": "5edc3f20-173f-401b-91f0-c6a41647e741",
2217
2255
  "isHook": false,
2218
2256
  "skipped": false
2219
2257
  }
2220
2258
  ],
2221
2259
  "suites": [],
2222
2260
  "passes": [
2223
- "b05faa4f-0fda-4705-8d5b-361a0e26563d"
2261
+ "b78139e1-f324-4bf5-be05-28bdeff30351"
2224
2262
  ],
2225
2263
  "failures": [],
2226
2264
  "pending": [],
@@ -2231,7 +2269,7 @@
2231
2269
  "_timeout": 2000
2232
2270
  },
2233
2271
  {
2234
- "uuid": "c4dcc21d-38ce-48d0-8611-9eed048b3498",
2272
+ "uuid": "38d02c5c-ca8f-4a5f-be98-75dfb46c3840",
2235
2273
  "title": "menu()",
2236
2274
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2237
2275
  "file": "/test/device.ts",
@@ -2242,35 +2280,35 @@
2242
2280
  "title": "should work",
2243
2281
  "fullTitle": "NodePyATVDevice menu() should work",
2244
2282
  "timedOut": false,
2245
- "duration": 1,
2283
+ "duration": 2,
2246
2284
  "state": "passed",
2247
2285
  "speed": "fast",
2248
2286
  "pass": true,
2249
2287
  "fail": false,
2250
2288
  "pending": false,
2251
2289
  "context": null,
2252
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2290
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2253
2291
  "err": {},
2254
- "uuid": "454e5fa2-238b-4efe-853c-251bfc2c235b",
2255
- "parentUUID": "c4dcc21d-38ce-48d0-8611-9eed048b3498",
2292
+ "uuid": "e7c379bf-e35b-4c15-8088-ee57037f48bd",
2293
+ "parentUUID": "38d02c5c-ca8f-4a5f-be98-75dfb46c3840",
2256
2294
  "isHook": false,
2257
2295
  "skipped": false
2258
2296
  }
2259
2297
  ],
2260
2298
  "suites": [],
2261
2299
  "passes": [
2262
- "454e5fa2-238b-4efe-853c-251bfc2c235b"
2300
+ "e7c379bf-e35b-4c15-8088-ee57037f48bd"
2263
2301
  ],
2264
2302
  "failures": [],
2265
2303
  "pending": [],
2266
2304
  "skipped": [],
2267
- "duration": 1,
2305
+ "duration": 2,
2268
2306
  "root": false,
2269
2307
  "rootEmpty": false,
2270
2308
  "_timeout": 2000
2271
2309
  },
2272
2310
  {
2273
- "uuid": "aa2eaa7b-664b-49af-a844-1e989e461c2f",
2311
+ "uuid": "d3ed8bbe-b609-4ae6-a5db-2539c03e9a23",
2274
2312
  "title": "next()",
2275
2313
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2276
2314
  "file": "/test/device.ts",
@@ -2281,35 +2319,35 @@
2281
2319
  "title": "should work",
2282
2320
  "fullTitle": "NodePyATVDevice next() should work",
2283
2321
  "timedOut": false,
2284
- "duration": 0,
2322
+ "duration": 1,
2285
2323
  "state": "passed",
2286
2324
  "speed": "fast",
2287
2325
  "pass": true,
2288
2326
  "fail": false,
2289
2327
  "pending": false,
2290
2328
  "context": null,
2291
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2329
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2292
2330
  "err": {},
2293
- "uuid": "6d577b2b-8515-4748-9142-6834686bb6c1",
2294
- "parentUUID": "aa2eaa7b-664b-49af-a844-1e989e461c2f",
2331
+ "uuid": "62603ab4-343a-429c-a2fc-1a45a2a4da63",
2332
+ "parentUUID": "d3ed8bbe-b609-4ae6-a5db-2539c03e9a23",
2295
2333
  "isHook": false,
2296
2334
  "skipped": false
2297
2335
  }
2298
2336
  ],
2299
2337
  "suites": [],
2300
2338
  "passes": [
2301
- "6d577b2b-8515-4748-9142-6834686bb6c1"
2339
+ "62603ab4-343a-429c-a2fc-1a45a2a4da63"
2302
2340
  ],
2303
2341
  "failures": [],
2304
2342
  "pending": [],
2305
2343
  "skipped": [],
2306
- "duration": 0,
2344
+ "duration": 1,
2307
2345
  "root": false,
2308
2346
  "rootEmpty": false,
2309
2347
  "_timeout": 2000
2310
2348
  },
2311
2349
  {
2312
- "uuid": "99459c98-f1ce-40b9-8930-4c054fb03a15",
2350
+ "uuid": "0dbde633-3539-4842-81ea-251bf96fb2a9",
2313
2351
  "title": "pause()",
2314
2352
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2315
2353
  "file": "/test/device.ts",
@@ -2320,35 +2358,35 @@
2320
2358
  "title": "should work",
2321
2359
  "fullTitle": "NodePyATVDevice pause() should work",
2322
2360
  "timedOut": false,
2323
- "duration": 0,
2361
+ "duration": 1,
2324
2362
  "state": "passed",
2325
2363
  "speed": "fast",
2326
2364
  "pass": true,
2327
2365
  "fail": false,
2328
2366
  "pending": false,
2329
2367
  "context": null,
2330
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2368
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2331
2369
  "err": {},
2332
- "uuid": "f5d9042f-9922-4bac-8d86-032a3bd3aa04",
2333
- "parentUUID": "99459c98-f1ce-40b9-8930-4c054fb03a15",
2370
+ "uuid": "33333c25-0a37-4a35-986e-e1e0113397fa",
2371
+ "parentUUID": "0dbde633-3539-4842-81ea-251bf96fb2a9",
2334
2372
  "isHook": false,
2335
2373
  "skipped": false
2336
2374
  }
2337
2375
  ],
2338
2376
  "suites": [],
2339
2377
  "passes": [
2340
- "f5d9042f-9922-4bac-8d86-032a3bd3aa04"
2378
+ "33333c25-0a37-4a35-986e-e1e0113397fa"
2341
2379
  ],
2342
2380
  "failures": [],
2343
2381
  "pending": [],
2344
2382
  "skipped": [],
2345
- "duration": 0,
2383
+ "duration": 1,
2346
2384
  "root": false,
2347
2385
  "rootEmpty": false,
2348
2386
  "_timeout": 2000
2349
2387
  },
2350
2388
  {
2351
- "uuid": "23e9495e-b798-4c0a-83b2-1f963aa90c8f",
2389
+ "uuid": "a65c09eb-5ad5-410b-b81c-2f806933c5b5",
2352
2390
  "title": "play()",
2353
2391
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2354
2392
  "file": "/test/device.ts",
@@ -2359,35 +2397,35 @@
2359
2397
  "title": "should work",
2360
2398
  "fullTitle": "NodePyATVDevice play() should work",
2361
2399
  "timedOut": false,
2362
- "duration": 1,
2400
+ "duration": 6,
2363
2401
  "state": "passed",
2364
2402
  "speed": "fast",
2365
2403
  "pass": true,
2366
2404
  "fail": false,
2367
2405
  "pending": false,
2368
2406
  "context": null,
2369
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2407
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2370
2408
  "err": {},
2371
- "uuid": "8ec96b2c-b2ed-42fd-a6b9-118448d22861",
2372
- "parentUUID": "23e9495e-b798-4c0a-83b2-1f963aa90c8f",
2409
+ "uuid": "6b44d7f3-40c8-448d-af9b-e1d88c954fba",
2410
+ "parentUUID": "a65c09eb-5ad5-410b-b81c-2f806933c5b5",
2373
2411
  "isHook": false,
2374
2412
  "skipped": false
2375
2413
  }
2376
2414
  ],
2377
2415
  "suites": [],
2378
2416
  "passes": [
2379
- "8ec96b2c-b2ed-42fd-a6b9-118448d22861"
2417
+ "6b44d7f3-40c8-448d-af9b-e1d88c954fba"
2380
2418
  ],
2381
2419
  "failures": [],
2382
2420
  "pending": [],
2383
2421
  "skipped": [],
2384
- "duration": 1,
2422
+ "duration": 6,
2385
2423
  "root": false,
2386
2424
  "rootEmpty": false,
2387
2425
  "_timeout": 2000
2388
2426
  },
2389
2427
  {
2390
- "uuid": "586f2b94-4573-4b99-977e-0231f16e857c",
2428
+ "uuid": "79d6a414-41f4-4226-8b6c-e6df6991baac",
2391
2429
  "title": "playPause()",
2392
2430
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2393
2431
  "file": "/test/device.ts",
@@ -2398,35 +2436,35 @@
2398
2436
  "title": "should work",
2399
2437
  "fullTitle": "NodePyATVDevice playPause() should work",
2400
2438
  "timedOut": false,
2401
- "duration": 1,
2439
+ "duration": 2,
2402
2440
  "state": "passed",
2403
2441
  "speed": "fast",
2404
2442
  "pass": true,
2405
2443
  "fail": false,
2406
2444
  "pending": false,
2407
2445
  "context": null,
2408
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2446
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2409
2447
  "err": {},
2410
- "uuid": "ce8236e7-dbc9-415d-876a-0c1f480ac356",
2411
- "parentUUID": "586f2b94-4573-4b99-977e-0231f16e857c",
2448
+ "uuid": "54ec8679-5329-485e-97c4-8bfe0de0de2c",
2449
+ "parentUUID": "79d6a414-41f4-4226-8b6c-e6df6991baac",
2412
2450
  "isHook": false,
2413
2451
  "skipped": false
2414
2452
  }
2415
2453
  ],
2416
2454
  "suites": [],
2417
2455
  "passes": [
2418
- "ce8236e7-dbc9-415d-876a-0c1f480ac356"
2456
+ "54ec8679-5329-485e-97c4-8bfe0de0de2c"
2419
2457
  ],
2420
2458
  "failures": [],
2421
2459
  "pending": [],
2422
2460
  "skipped": [],
2423
- "duration": 1,
2461
+ "duration": 2,
2424
2462
  "root": false,
2425
2463
  "rootEmpty": false,
2426
2464
  "_timeout": 2000
2427
2465
  },
2428
2466
  {
2429
- "uuid": "5aee17b4-0ed8-44a0-bd88-c990d85e3ef9",
2467
+ "uuid": "3705471f-9972-4c4e-bc08-01516616c5b2",
2430
2468
  "title": "previous()",
2431
2469
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2432
2470
  "file": "/test/device.ts",
@@ -2444,17 +2482,17 @@
2444
2482
  "fail": false,
2445
2483
  "pending": false,
2446
2484
  "context": null,
2447
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2485
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2448
2486
  "err": {},
2449
- "uuid": "1d43f7b4-ebc7-44bb-b506-eb5819af1dc1",
2450
- "parentUUID": "5aee17b4-0ed8-44a0-bd88-c990d85e3ef9",
2487
+ "uuid": "6602322f-39a9-4660-abd7-948662799a99",
2488
+ "parentUUID": "3705471f-9972-4c4e-bc08-01516616c5b2",
2451
2489
  "isHook": false,
2452
2490
  "skipped": false
2453
2491
  }
2454
2492
  ],
2455
2493
  "suites": [],
2456
2494
  "passes": [
2457
- "1d43f7b4-ebc7-44bb-b506-eb5819af1dc1"
2495
+ "6602322f-39a9-4660-abd7-948662799a99"
2458
2496
  ],
2459
2497
  "failures": [],
2460
2498
  "pending": [],
@@ -2465,7 +2503,7 @@
2465
2503
  "_timeout": 2000
2466
2504
  },
2467
2505
  {
2468
- "uuid": "95a7f935-df42-4cdd-a960-525cda78ea28",
2506
+ "uuid": "b0e88f7e-5790-410d-8eaa-219cecc222e3",
2469
2507
  "title": "right()",
2470
2508
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2471
2509
  "file": "/test/device.ts",
@@ -2476,35 +2514,35 @@
2476
2514
  "title": "should work",
2477
2515
  "fullTitle": "NodePyATVDevice right() should work",
2478
2516
  "timedOut": false,
2479
- "duration": 2,
2517
+ "duration": 1,
2480
2518
  "state": "passed",
2481
2519
  "speed": "fast",
2482
2520
  "pass": true,
2483
2521
  "fail": false,
2484
2522
  "pending": false,
2485
2523
  "context": null,
2486
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2524
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2487
2525
  "err": {},
2488
- "uuid": "b107f882-cf22-4713-ae2c-f260cf0b2ff4",
2489
- "parentUUID": "95a7f935-df42-4cdd-a960-525cda78ea28",
2526
+ "uuid": "f4d4bf72-ac5c-46d3-939c-a9d43985399d",
2527
+ "parentUUID": "b0e88f7e-5790-410d-8eaa-219cecc222e3",
2490
2528
  "isHook": false,
2491
2529
  "skipped": false
2492
2530
  }
2493
2531
  ],
2494
2532
  "suites": [],
2495
2533
  "passes": [
2496
- "b107f882-cf22-4713-ae2c-f260cf0b2ff4"
2534
+ "f4d4bf72-ac5c-46d3-939c-a9d43985399d"
2497
2535
  ],
2498
2536
  "failures": [],
2499
2537
  "pending": [],
2500
2538
  "skipped": [],
2501
- "duration": 2,
2539
+ "duration": 1,
2502
2540
  "root": false,
2503
2541
  "rootEmpty": false,
2504
2542
  "_timeout": 2000
2505
2543
  },
2506
2544
  {
2507
- "uuid": "6f958d2d-2db2-4337-ad4a-43daf3e28931",
2545
+ "uuid": "387bf0cf-89cd-4377-8102-f7bd78878e81",
2508
2546
  "title": "select()",
2509
2547
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2510
2548
  "file": "/test/device.ts",
@@ -2515,35 +2553,35 @@
2515
2553
  "title": "should work",
2516
2554
  "fullTitle": "NodePyATVDevice select() should work",
2517
2555
  "timedOut": false,
2518
- "duration": 2,
2556
+ "duration": 1,
2519
2557
  "state": "passed",
2520
2558
  "speed": "fast",
2521
2559
  "pass": true,
2522
2560
  "fail": false,
2523
2561
  "pending": false,
2524
2562
  "context": null,
2525
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2563
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2526
2564
  "err": {},
2527
- "uuid": "78b2fad3-a37c-4c6e-a8c1-ffb1a6370f03",
2528
- "parentUUID": "6f958d2d-2db2-4337-ad4a-43daf3e28931",
2565
+ "uuid": "e4712370-de17-4a86-90a8-4dffbdc05dd7",
2566
+ "parentUUID": "387bf0cf-89cd-4377-8102-f7bd78878e81",
2529
2567
  "isHook": false,
2530
2568
  "skipped": false
2531
2569
  }
2532
2570
  ],
2533
2571
  "suites": [],
2534
2572
  "passes": [
2535
- "78b2fad3-a37c-4c6e-a8c1-ffb1a6370f03"
2573
+ "e4712370-de17-4a86-90a8-4dffbdc05dd7"
2536
2574
  ],
2537
2575
  "failures": [],
2538
2576
  "pending": [],
2539
2577
  "skipped": [],
2540
- "duration": 2,
2578
+ "duration": 1,
2541
2579
  "root": false,
2542
2580
  "rootEmpty": false,
2543
2581
  "_timeout": 2000
2544
2582
  },
2545
2583
  {
2546
- "uuid": "4f7e9436-6752-4a13-b763-1cffc56d6da1",
2584
+ "uuid": "222eba2a-c57b-42ab-a6d4-fe5302473e4c",
2547
2585
  "title": "skipBackward()",
2548
2586
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2549
2587
  "file": "/test/device.ts",
@@ -2561,17 +2599,17 @@
2561
2599
  "fail": false,
2562
2600
  "pending": false,
2563
2601
  "context": null,
2564
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2602
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2565
2603
  "err": {},
2566
- "uuid": "487f235f-67bf-4259-b2e9-cfd65550b902",
2567
- "parentUUID": "4f7e9436-6752-4a13-b763-1cffc56d6da1",
2604
+ "uuid": "97db45d9-08a0-49b2-b389-5ee25d5971b9",
2605
+ "parentUUID": "222eba2a-c57b-42ab-a6d4-fe5302473e4c",
2568
2606
  "isHook": false,
2569
2607
  "skipped": false
2570
2608
  }
2571
2609
  ],
2572
2610
  "suites": [],
2573
2611
  "passes": [
2574
- "487f235f-67bf-4259-b2e9-cfd65550b902"
2612
+ "97db45d9-08a0-49b2-b389-5ee25d5971b9"
2575
2613
  ],
2576
2614
  "failures": [],
2577
2615
  "pending": [],
@@ -2582,7 +2620,7 @@
2582
2620
  "_timeout": 2000
2583
2621
  },
2584
2622
  {
2585
- "uuid": "6eaf1b7d-bfd6-439f-9e26-9ac5cfaf496b",
2623
+ "uuid": "7c00e8df-9fb0-4d37-a72b-72a8724dc370",
2586
2624
  "title": "skipForward()",
2587
2625
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2588
2626
  "file": "/test/device.ts",
@@ -2600,17 +2638,17 @@
2600
2638
  "fail": false,
2601
2639
  "pending": false,
2602
2640
  "context": null,
2603
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2641
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2604
2642
  "err": {},
2605
- "uuid": "ea22f1b6-0b3e-4243-a842-974e0ecc26be",
2606
- "parentUUID": "6eaf1b7d-bfd6-439f-9e26-9ac5cfaf496b",
2643
+ "uuid": "17650103-33c7-42d6-8355-34d70af14075",
2644
+ "parentUUID": "7c00e8df-9fb0-4d37-a72b-72a8724dc370",
2607
2645
  "isHook": false,
2608
2646
  "skipped": false
2609
2647
  }
2610
2648
  ],
2611
2649
  "suites": [],
2612
2650
  "passes": [
2613
- "ea22f1b6-0b3e-4243-a842-974e0ecc26be"
2651
+ "17650103-33c7-42d6-8355-34d70af14075"
2614
2652
  ],
2615
2653
  "failures": [],
2616
2654
  "pending": [],
@@ -2621,7 +2659,7 @@
2621
2659
  "_timeout": 2000
2622
2660
  },
2623
2661
  {
2624
- "uuid": "2fdaec60-0979-4b58-a024-e38688d290aa",
2662
+ "uuid": "906c454a-8047-4ce0-94c9-f2845a8c959f",
2625
2663
  "title": "stop()",
2626
2664
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2627
2665
  "file": "/test/device.ts",
@@ -2632,35 +2670,35 @@
2632
2670
  "title": "should work",
2633
2671
  "fullTitle": "NodePyATVDevice stop() should work",
2634
2672
  "timedOut": false,
2635
- "duration": 2,
2673
+ "duration": 1,
2636
2674
  "state": "passed",
2637
2675
  "speed": "fast",
2638
2676
  "pass": true,
2639
2677
  "fail": false,
2640
2678
  "pending": false,
2641
2679
  "context": null,
2642
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2680
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2643
2681
  "err": {},
2644
- "uuid": "a7bec754-db8a-4945-b50c-d651de725a48",
2645
- "parentUUID": "2fdaec60-0979-4b58-a024-e38688d290aa",
2682
+ "uuid": "d5f6b11e-368c-4483-a574-302f6026d071",
2683
+ "parentUUID": "906c454a-8047-4ce0-94c9-f2845a8c959f",
2646
2684
  "isHook": false,
2647
2685
  "skipped": false
2648
2686
  }
2649
2687
  ],
2650
2688
  "suites": [],
2651
2689
  "passes": [
2652
- "a7bec754-db8a-4945-b50c-d651de725a48"
2690
+ "d5f6b11e-368c-4483-a574-302f6026d071"
2653
2691
  ],
2654
2692
  "failures": [],
2655
2693
  "pending": [],
2656
2694
  "skipped": [],
2657
- "duration": 2,
2695
+ "duration": 1,
2658
2696
  "root": false,
2659
2697
  "rootEmpty": false,
2660
2698
  "_timeout": 2000
2661
2699
  },
2662
2700
  {
2663
- "uuid": "9c19247e-3aae-4834-b108-a42d5422e3da",
2701
+ "uuid": "ca87d2c4-180f-4416-91ba-d786ae0bacd1",
2664
2702
  "title": "suspend()",
2665
2703
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2666
2704
  "file": "/test/device.ts",
@@ -2671,35 +2709,35 @@
2671
2709
  "title": "should work",
2672
2710
  "fullTitle": "NodePyATVDevice suspend() should work",
2673
2711
  "timedOut": false,
2674
- "duration": 2,
2712
+ "duration": 1,
2675
2713
  "state": "passed",
2676
2714
  "speed": "fast",
2677
2715
  "pass": true,
2678
2716
  "fail": false,
2679
2717
  "pending": false,
2680
2718
  "context": null,
2681
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2719
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2682
2720
  "err": {},
2683
- "uuid": "2b020e93-3168-43ad-98d6-f6ad71ac475f",
2684
- "parentUUID": "9c19247e-3aae-4834-b108-a42d5422e3da",
2721
+ "uuid": "97edc484-96c0-44dd-b048-7c9d94d85257",
2722
+ "parentUUID": "ca87d2c4-180f-4416-91ba-d786ae0bacd1",
2685
2723
  "isHook": false,
2686
2724
  "skipped": false
2687
2725
  }
2688
2726
  ],
2689
2727
  "suites": [],
2690
2728
  "passes": [
2691
- "2b020e93-3168-43ad-98d6-f6ad71ac475f"
2729
+ "97edc484-96c0-44dd-b048-7c9d94d85257"
2692
2730
  ],
2693
2731
  "failures": [],
2694
2732
  "pending": [],
2695
2733
  "skipped": [],
2696
- "duration": 2,
2734
+ "duration": 1,
2697
2735
  "root": false,
2698
2736
  "rootEmpty": false,
2699
2737
  "_timeout": 2000
2700
2738
  },
2701
2739
  {
2702
- "uuid": "9ca51bf2-61d6-4881-9b11-bdcd0fcec3db",
2740
+ "uuid": "e3c8fec5-e119-4faa-a298-cf62849c5449",
2703
2741
  "title": "topMenu()",
2704
2742
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2705
2743
  "file": "/test/device.ts",
@@ -2710,35 +2748,35 @@
2710
2748
  "title": "should work",
2711
2749
  "fullTitle": "NodePyATVDevice topMenu() should work",
2712
2750
  "timedOut": false,
2713
- "duration": 2,
2751
+ "duration": 1,
2714
2752
  "state": "passed",
2715
2753
  "speed": "fast",
2716
2754
  "pass": true,
2717
2755
  "fail": false,
2718
2756
  "pending": false,
2719
2757
  "context": null,
2720
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2758
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2721
2759
  "err": {},
2722
- "uuid": "fdfda40c-bf45-46be-8338-c2cf58c28f5a",
2723
- "parentUUID": "9ca51bf2-61d6-4881-9b11-bdcd0fcec3db",
2760
+ "uuid": "43d39608-6e31-4ec3-b5fd-de02a4a60c3a",
2761
+ "parentUUID": "e3c8fec5-e119-4faa-a298-cf62849c5449",
2724
2762
  "isHook": false,
2725
2763
  "skipped": false
2726
2764
  }
2727
2765
  ],
2728
2766
  "suites": [],
2729
2767
  "passes": [
2730
- "fdfda40c-bf45-46be-8338-c2cf58c28f5a"
2768
+ "43d39608-6e31-4ec3-b5fd-de02a4a60c3a"
2731
2769
  ],
2732
2770
  "failures": [],
2733
2771
  "pending": [],
2734
2772
  "skipped": [],
2735
- "duration": 2,
2773
+ "duration": 1,
2736
2774
  "root": false,
2737
2775
  "rootEmpty": false,
2738
2776
  "_timeout": 2000
2739
2777
  },
2740
2778
  {
2741
- "uuid": "f616ce34-cd7e-4cfd-a671-fe152d14442e",
2779
+ "uuid": "a35ebc90-e9dc-4295-bbf9-71d759b15145",
2742
2780
  "title": "up()",
2743
2781
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2744
2782
  "file": "/test/device.ts",
@@ -2756,17 +2794,17 @@
2756
2794
  "fail": false,
2757
2795
  "pending": false,
2758
2796
  "context": null,
2759
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2797
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2760
2798
  "err": {},
2761
- "uuid": "4acc9886-ba6d-4eef-ac66-e076054e14ca",
2762
- "parentUUID": "f616ce34-cd7e-4cfd-a671-fe152d14442e",
2799
+ "uuid": "d661223f-0c5b-4094-9e66-49869858c052",
2800
+ "parentUUID": "a35ebc90-e9dc-4295-bbf9-71d759b15145",
2763
2801
  "isHook": false,
2764
2802
  "skipped": false
2765
2803
  }
2766
2804
  ],
2767
2805
  "suites": [],
2768
2806
  "passes": [
2769
- "4acc9886-ba6d-4eef-ac66-e076054e14ca"
2807
+ "d661223f-0c5b-4094-9e66-49869858c052"
2770
2808
  ],
2771
2809
  "failures": [],
2772
2810
  "pending": [],
@@ -2777,7 +2815,7 @@
2777
2815
  "_timeout": 2000
2778
2816
  },
2779
2817
  {
2780
- "uuid": "e319eef3-6fd3-4200-816a-635b8d4c63e2",
2818
+ "uuid": "a84bbd4e-b59b-4101-a561-df96cff4d8da",
2781
2819
  "title": "volumeDown()",
2782
2820
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2783
2821
  "file": "/test/device.ts",
@@ -2788,35 +2826,35 @@
2788
2826
  "title": "should work",
2789
2827
  "fullTitle": "NodePyATVDevice volumeDown() should work",
2790
2828
  "timedOut": false,
2791
- "duration": 2,
2829
+ "duration": 1,
2792
2830
  "state": "passed",
2793
2831
  "speed": "fast",
2794
2832
  "pass": true,
2795
2833
  "fail": false,
2796
2834
  "pending": false,
2797
2835
  "context": null,
2798
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2836
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2799
2837
  "err": {},
2800
- "uuid": "8d185a98-7549-4f4b-99a4-b20f2b3f21ef",
2801
- "parentUUID": "e319eef3-6fd3-4200-816a-635b8d4c63e2",
2838
+ "uuid": "44dece83-7cad-478c-a4a5-badedd492f2c",
2839
+ "parentUUID": "a84bbd4e-b59b-4101-a561-df96cff4d8da",
2802
2840
  "isHook": false,
2803
2841
  "skipped": false
2804
2842
  }
2805
2843
  ],
2806
2844
  "suites": [],
2807
2845
  "passes": [
2808
- "8d185a98-7549-4f4b-99a4-b20f2b3f21ef"
2846
+ "44dece83-7cad-478c-a4a5-badedd492f2c"
2809
2847
  ],
2810
2848
  "failures": [],
2811
2849
  "pending": [],
2812
2850
  "skipped": [],
2813
- "duration": 2,
2851
+ "duration": 1,
2814
2852
  "root": false,
2815
2853
  "rootEmpty": false,
2816
2854
  "_timeout": 2000
2817
2855
  },
2818
2856
  {
2819
- "uuid": "aefa3c55-2e76-4633-9b45-9a5fbf7c8327",
2857
+ "uuid": "829a2a45-f598-4b9e-a4d8-7b189df768ab",
2820
2858
  "title": "volumeUp()",
2821
2859
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2822
2860
  "file": "/test/device.ts",
@@ -2827,35 +2865,35 @@
2827
2865
  "title": "should work",
2828
2866
  "fullTitle": "NodePyATVDevice volumeUp() should work",
2829
2867
  "timedOut": false,
2830
- "duration": 2,
2868
+ "duration": 1,
2831
2869
  "state": "passed",
2832
2870
  "speed": "fast",
2833
2871
  "pass": true,
2834
2872
  "fail": false,
2835
2873
  "pending": false,
2836
2874
  "context": null,
2837
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2875
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2838
2876
  "err": {},
2839
- "uuid": "ce981d8b-e39d-4adb-b843-f369fe53d569",
2840
- "parentUUID": "aefa3c55-2e76-4633-9b45-9a5fbf7c8327",
2877
+ "uuid": "95c76f45-e2e9-44fe-a756-d16346890221",
2878
+ "parentUUID": "829a2a45-f598-4b9e-a4d8-7b189df768ab",
2841
2879
  "isHook": false,
2842
2880
  "skipped": false
2843
2881
  }
2844
2882
  ],
2845
2883
  "suites": [],
2846
2884
  "passes": [
2847
- "ce981d8b-e39d-4adb-b843-f369fe53d569"
2885
+ "95c76f45-e2e9-44fe-a756-d16346890221"
2848
2886
  ],
2849
2887
  "failures": [],
2850
2888
  "pending": [],
2851
2889
  "skipped": [],
2852
- "duration": 2,
2890
+ "duration": 1,
2853
2891
  "root": false,
2854
2892
  "rootEmpty": false,
2855
2893
  "_timeout": 2000
2856
2894
  },
2857
2895
  {
2858
- "uuid": "57ea8e53-7cc0-49d3-b6ad-f26f59377d0b",
2896
+ "uuid": "904e2540-c8b8-430b-be67-6a989c6fc901",
2859
2897
  "title": "wakeup()",
2860
2898
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2861
2899
  "file": "/test/device.ts",
@@ -2866,29 +2904,29 @@
2866
2904
  "title": "should work",
2867
2905
  "fullTitle": "NodePyATVDevice wakeup() should work",
2868
2906
  "timedOut": false,
2869
- "duration": 2,
2907
+ "duration": 1,
2870
2908
  "state": "passed",
2871
2909
  "speed": "fast",
2872
2910
  "pass": true,
2873
2911
  "fail": false,
2874
2912
  "pending": false,
2875
2913
  "context": null,
2876
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2914
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2877
2915
  "err": {},
2878
- "uuid": "45104f75-fed6-45db-9201-9ab475c4c0d1",
2879
- "parentUUID": "57ea8e53-7cc0-49d3-b6ad-f26f59377d0b",
2916
+ "uuid": "9c062422-0054-45c6-b56b-9736d754b185",
2917
+ "parentUUID": "904e2540-c8b8-430b-be67-6a989c6fc901",
2880
2918
  "isHook": false,
2881
2919
  "skipped": false
2882
2920
  }
2883
2921
  ],
2884
2922
  "suites": [],
2885
2923
  "passes": [
2886
- "45104f75-fed6-45db-9201-9ab475c4c0d1"
2924
+ "9c062422-0054-45c6-b56b-9736d754b185"
2887
2925
  ],
2888
2926
  "failures": [],
2889
2927
  "pending": [],
2890
2928
  "skipped": [],
2891
- "duration": 2,
2929
+ "duration": 1,
2892
2930
  "root": false,
2893
2931
  "rootEmpty": false,
2894
2932
  "_timeout": 2000
@@ -2904,7 +2942,7 @@
2904
2942
  "_timeout": 2000
2905
2943
  },
2906
2944
  {
2907
- "uuid": "e5943e50-d9ea-4a13-b591-267ec30169aa",
2945
+ "uuid": "35883a9b-bfdc-4f16-8c63-1a41ad636145",
2908
2946
  "title": "NodePyATVInstance",
2909
2947
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
2910
2948
  "file": "/test/instance.ts",
@@ -2913,7 +2951,7 @@
2913
2951
  "tests": [],
2914
2952
  "suites": [
2915
2953
  {
2916
- "uuid": "194bc093-2e0f-459f-b375-046881d44bde",
2954
+ "uuid": "ad76dd58-0817-4ec0-93a3-ac6031b4cd99",
2917
2955
  "title": "static version()",
2918
2956
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
2919
2957
  "file": "/test/instance.ts",
@@ -2924,7 +2962,7 @@
2924
2962
  "title": "should work with pyatv [L]",
2925
2963
  "fullTitle": "NodePyATVInstance static version() should work with pyatv [L]",
2926
2964
  "timedOut": false,
2927
- "duration": 777,
2965
+ "duration": 851,
2928
2966
  "state": "passed",
2929
2967
  "speed": "slow",
2930
2968
  "pass": true,
@@ -2933,8 +2971,8 @@
2933
2971
  "context": null,
2934
2972
  "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(4000);\n const result = yield index_1.default.version();\n if (result.pyatv === null) {\n throw new Error('No version found for pyatv. Is it installed in test environment?');\n }\n assert_1.default.equal(typeof result.pyatv, 'string', 'result.pyatv is a string');\n assert_1.default.ok(result.pyatv.length >= 5, 'result.pyatv has content');\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n assert_1.default.strictEqual(result.module, require(__dirname + '/../package.json').version || null);\n});",
2935
2973
  "err": {},
2936
- "uuid": "ff7a1da2-9af4-47ab-987e-0e0ffa1e2345",
2937
- "parentUUID": "194bc093-2e0f-459f-b375-046881d44bde",
2974
+ "uuid": "0785646e-3a05-463f-a9fd-9d1eba9e1e23",
2975
+ "parentUUID": "ad76dd58-0817-4ec0-93a3-ac6031b4cd99",
2938
2976
  "isHook": false,
2939
2977
  "skipped": false
2940
2978
  },
@@ -2942,17 +2980,17 @@
2942
2980
  "title": "should return the pyatv version",
2943
2981
  "fullTitle": "NodePyATVInstance static version() should return the pyatv version",
2944
2982
  "timedOut": false,
2945
- "duration": 2,
2983
+ "duration": 1,
2946
2984
  "state": "passed",
2947
2985
  "speed": "fast",
2948
2986
  "pass": true,
2949
2987
  "fail": false,
2950
2988
  "pending": false,
2951
2989
  "context": null,
2952
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.code(1);\n cp.end('atvremote 0.7.4');\n })\n });\n assert_1.default.ok(result.pyatv);\n assert_1.default.strictEqual(result.pyatv, '0.7.4');\n});",
2990
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.code(1);\n cp.end('atvremote 0.7.4');\n })\n });\n assert_1.default.ok(result.pyatv);\n assert_1.default.strictEqual(result.pyatv, '0.7.4');\n});",
2953
2991
  "err": {},
2954
- "uuid": "725d1afd-f744-41c0-913e-1da55ed58a07",
2955
- "parentUUID": "194bc093-2e0f-459f-b375-046881d44bde",
2992
+ "uuid": "9311556a-6297-48ec-9ac7-3a471cfbd2af",
2993
+ "parentUUID": "ad76dd58-0817-4ec0-93a3-ac6031b4cd99",
2956
2994
  "isHook": false,
2957
2995
  "skipped": false
2958
2996
  },
@@ -2960,17 +2998,17 @@
2960
2998
  "title": "should return the module version",
2961
2999
  "fullTitle": "NodePyATVInstance static version() should return the module version",
2962
3000
  "timedOut": false,
2963
- "duration": 2,
3001
+ "duration": 1,
2964
3002
  "state": "passed",
2965
3003
  "speed": "fast",
2966
3004
  "pass": true,
2967
3005
  "fail": false,
2968
3006
  "pending": false,
2969
3007
  "context": null,
2970
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n noColors: true,\n spawn: fake_spawn_1.createFakeSpawn(cp => cp.code(1).end())\n });\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n assert_1.default.strictEqual(result.module, require(__dirname + '/../package.json').version || null);\n});",
3008
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n noColors: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n assert_1.default.strictEqual(result.module, require(__dirname + '/../package.json').version || null);\n});",
2971
3009
  "err": {},
2972
- "uuid": "afcff9c0-0920-40c1-a2db-626759ebd435",
2973
- "parentUUID": "194bc093-2e0f-459f-b375-046881d44bde",
3010
+ "uuid": "36399ad3-2f20-40e8-92ab-a838350d93f7",
3011
+ "parentUUID": "ad76dd58-0817-4ec0-93a3-ac6031b4cd99",
2974
3012
  "isHook": false,
2975
3013
  "skipped": false
2976
3014
  },
@@ -2985,10 +3023,10 @@
2985
3023
  "fail": false,
2986
3024
  "pending": false,
2987
3025
  "context": null,
2988
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n atvremotePath: '/foo/bar',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n assert_1.default.strictEqual(cp.cmd(), '/foo/bar');\n cp.code(1).end();\n })\n });\n});",
3026
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n atvremotePath: '/foo/bar',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), '/foo/bar');\n cp.code(1).end();\n })\n });\n});",
2989
3027
  "err": {},
2990
- "uuid": "d08a218e-a04d-486e-8900-385e4209b317",
2991
- "parentUUID": "194bc093-2e0f-459f-b375-046881d44bde",
3028
+ "uuid": "98950447-0a4a-45bb-9b76-03b7566b79ae",
3029
+ "parentUUID": "ad76dd58-0817-4ec0-93a3-ac6031b4cd99",
2992
3030
  "isHook": false,
2993
3031
  "skipped": false
2994
3032
  },
@@ -2996,17 +3034,17 @@
2996
3034
  "title": "should work with option.debug = true",
2997
3035
  "fullTitle": "NodePyATVInstance static version() should work with option.debug = true",
2998
3036
  "timedOut": false,
2999
- "duration": 1,
3037
+ "duration": 2,
3000
3038
  "state": "passed",
3001
3039
  "speed": "fast",
3002
3040
  "pass": true,
3003
3041
  "fail": false,
3004
3042
  "pending": false,
3005
3043
  "context": null,
3006
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n debug: true,\n spawn: fake_spawn_1.createFakeSpawn(cp => cp.code(1).end())\n });\n});",
3044
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n debug: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n});",
3007
3045
  "err": {},
3008
- "uuid": "cfea2617-43a8-44b5-9108-3becc9029cb4",
3009
- "parentUUID": "194bc093-2e0f-459f-b375-046881d44bde",
3046
+ "uuid": "a17a0f4e-325d-4620-a5a9-8a377f93d776",
3047
+ "parentUUID": "ad76dd58-0817-4ec0-93a3-ac6031b4cd99",
3010
3048
  "isHook": false,
3011
3049
  "skipped": false
3012
3050
  },
@@ -3021,10 +3059,10 @@
3021
3059
  "fail": false,
3022
3060
  "pending": false,
3023
3061
  "context": null,
3024
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n debug: () => { },\n noColors: true,\n spawn: fake_spawn_1.createFakeSpawn(cp => cp.code(1).end())\n });\n});",
3062
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n debug: () => { },\n noColors: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n});",
3025
3063
  "err": {},
3026
- "uuid": "6403aefb-caf2-4e23-9b3c-bd78730380ca",
3027
- "parentUUID": "194bc093-2e0f-459f-b375-046881d44bde",
3064
+ "uuid": "4dd77390-ce7c-4b04-aed5-07209f483696",
3065
+ "parentUUID": "ad76dd58-0817-4ec0-93a3-ac6031b4cd99",
3028
3066
  "isHook": false,
3029
3067
  "skipped": false
3030
3068
  },
@@ -3032,17 +3070,17 @@
3032
3070
  "title": "should return null on pyatv stderr output",
3033
3071
  "fullTitle": "NodePyATVInstance static version() should return null on pyatv stderr output",
3034
3072
  "timedOut": false,
3035
- "duration": 1,
3073
+ "duration": 2,
3036
3074
  "state": "passed",
3037
3075
  "speed": "fast",
3038
3076
  "pass": true,
3039
3077
  "fail": false,
3040
3078
  "pending": false,
3041
3079
  "context": null,
3042
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: fake_spawn_1.createFakeSpawn(cp => cp.stderr('Hello World!').code(123).end())\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});",
3080
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.stderr('Hello World!').code(123).end())\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});",
3043
3081
  "err": {},
3044
- "uuid": "44dad6fe-c246-4762-9376-ff1c1df0023d",
3045
- "parentUUID": "194bc093-2e0f-459f-b375-046881d44bde",
3082
+ "uuid": "b153ffa0-ff07-4f9a-b0e7-6b76036f1973",
3083
+ "parentUUID": "ad76dd58-0817-4ec0-93a3-ac6031b4cd99",
3046
3084
  "isHook": false,
3047
3085
  "skipped": false
3048
3086
  },
@@ -3057,10 +3095,10 @@
3057
3095
  "fail": false,
3058
3096
  "pending": false,
3059
3097
  "context": null,
3060
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.error(new Error('Hello world!')).end();\n })\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});",
3098
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('Hello world!')).end();\n })\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});",
3061
3099
  "err": {},
3062
- "uuid": "900f20b9-ccae-4d29-ba80-1ba2568e22b7",
3063
- "parentUUID": "194bc093-2e0f-459f-b375-046881d44bde",
3100
+ "uuid": "348ef697-21d0-4549-9795-009799f09be0",
3101
+ "parentUUID": "ad76dd58-0817-4ec0-93a3-ac6031b4cd99",
3064
3102
  "isHook": false,
3065
3103
  "skipped": false
3066
3104
  },
@@ -3075,10 +3113,10 @@
3075
3113
  "fail": false,
3076
3114
  "pending": false,
3077
3115
  "context": null,
3078
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.stdout('atvremote 42').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});",
3116
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 42').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});",
3079
3117
  "err": {},
3080
- "uuid": "f2da1535-7eaa-4897-9347-b8a44e156561",
3081
- "parentUUID": "194bc093-2e0f-459f-b375-046881d44bde",
3118
+ "uuid": "7648daad-67c5-4f4a-9129-db31e3cf7cbd",
3119
+ "parentUUID": "ad76dd58-0817-4ec0-93a3-ac6031b4cd99",
3082
3120
  "isHook": false,
3083
3121
  "skipped": false
3084
3122
  },
@@ -3086,17 +3124,17 @@
3086
3124
  "title": "should return null on empty module version",
3087
3125
  "fullTitle": "NodePyATVInstance static version() should return null on empty module version",
3088
3126
  "timedOut": false,
3089
- "duration": 1,
3127
+ "duration": 2,
3090
3128
  "state": "passed",
3091
3129
  "speed": "fast",
3092
3130
  "pass": true,
3093
3131
  "fail": false,
3094
3132
  "pending": false,
3095
3133
  "context": null,
3096
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const path = require.resolve(__dirname + '/../package.json');\n require(path);\n const cache = require.cache[path];\n assert_1.default.ok(cache, 'package.json is in require cache');\n cache.exports = {};\n const result = yield index_1.default.version({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.stdout('atvremote 0.7.4').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.module, null);\n});",
3134
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const path = require.resolve(__dirname + '/../package.json');\n require(path);\n const cache = require.cache[path];\n assert_1.default.ok(cache, 'package.json is in require cache');\n cache.exports = {};\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.7.4').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.module, null);\n});",
3097
3135
  "err": {},
3098
- "uuid": "3cfcc1b2-2506-4fa1-9934-f8bb860991a9",
3099
- "parentUUID": "194bc093-2e0f-459f-b375-046881d44bde",
3136
+ "uuid": "5cdb9e9e-e5eb-446a-9228-51f380e4a0ca",
3137
+ "parentUUID": "ad76dd58-0817-4ec0-93a3-ac6031b4cd99",
3100
3138
  "isHook": false,
3101
3139
  "skipped": false
3102
3140
  },
@@ -3111,38 +3149,38 @@
3111
3149
  "fail": false,
3112
3150
  "pending": false,
3113
3151
  "context": null,
3114
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const path = require.resolve(__dirname + '/../package.json');\n require(path);\n const cache = require.cache[path];\n assert_1.default.ok(cache, 'package.json is in require cache');\n cache.exports = { version: 42 };\n const result = yield index_1.default.version({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.stdout('atvremote 0.7.4').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.module, null);\n});",
3152
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const path = require.resolve(__dirname + '/../package.json');\n require(path);\n const cache = require.cache[path];\n assert_1.default.ok(cache, 'package.json is in require cache');\n cache.exports = { version: 42 };\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.7.4').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.module, null);\n});",
3115
3153
  "err": {},
3116
- "uuid": "edb69c9f-a556-448b-acfc-bc621a8d0349",
3117
- "parentUUID": "194bc093-2e0f-459f-b375-046881d44bde",
3154
+ "uuid": "cc1f0ab7-debe-40a1-88e0-ee1a5368caae",
3155
+ "parentUUID": "ad76dd58-0817-4ec0-93a3-ac6031b4cd99",
3118
3156
  "isHook": false,
3119
3157
  "skipped": false
3120
3158
  }
3121
3159
  ],
3122
3160
  "suites": [],
3123
3161
  "passes": [
3124
- "ff7a1da2-9af4-47ab-987e-0e0ffa1e2345",
3125
- "725d1afd-f744-41c0-913e-1da55ed58a07",
3126
- "afcff9c0-0920-40c1-a2db-626759ebd435",
3127
- "d08a218e-a04d-486e-8900-385e4209b317",
3128
- "cfea2617-43a8-44b5-9108-3becc9029cb4",
3129
- "6403aefb-caf2-4e23-9b3c-bd78730380ca",
3130
- "44dad6fe-c246-4762-9376-ff1c1df0023d",
3131
- "900f20b9-ccae-4d29-ba80-1ba2568e22b7",
3132
- "f2da1535-7eaa-4897-9347-b8a44e156561",
3133
- "3cfcc1b2-2506-4fa1-9934-f8bb860991a9",
3134
- "edb69c9f-a556-448b-acfc-bc621a8d0349"
3162
+ "0785646e-3a05-463f-a9fd-9d1eba9e1e23",
3163
+ "9311556a-6297-48ec-9ac7-3a471cfbd2af",
3164
+ "36399ad3-2f20-40e8-92ab-a838350d93f7",
3165
+ "98950447-0a4a-45bb-9b76-03b7566b79ae",
3166
+ "a17a0f4e-325d-4620-a5a9-8a377f93d776",
3167
+ "4dd77390-ce7c-4b04-aed5-07209f483696",
3168
+ "b153ffa0-ff07-4f9a-b0e7-6b76036f1973",
3169
+ "348ef697-21d0-4549-9795-009799f09be0",
3170
+ "7648daad-67c5-4f4a-9129-db31e3cf7cbd",
3171
+ "5cdb9e9e-e5eb-446a-9228-51f380e4a0ca",
3172
+ "cc1f0ab7-debe-40a1-88e0-ee1a5368caae"
3135
3173
  ],
3136
3174
  "failures": [],
3137
3175
  "pending": [],
3138
3176
  "skipped": [],
3139
- "duration": 791,
3177
+ "duration": 866,
3140
3178
  "root": false,
3141
3179
  "rootEmpty": false,
3142
3180
  "_timeout": 2000
3143
3181
  },
3144
3182
  {
3145
- "uuid": "5df5582e-1f24-4153-a62d-edae47655ab2",
3183
+ "uuid": "f9ea34bd-997f-4c6c-ae9e-c15566c61644",
3146
3184
  "title": "static check()",
3147
3185
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3148
3186
  "file": "/test/instance.ts",
@@ -3153,7 +3191,7 @@
3153
3191
  "title": "should resolve in test environment [L]",
3154
3192
  "fullTitle": "NodePyATVInstance static check() should resolve in test environment [L]",
3155
3193
  "timedOut": false,
3156
- "duration": 6231,
3194
+ "duration": 6137,
3157
3195
  "state": "passed",
3158
3196
  "speed": "slow",
3159
3197
  "pass": true,
@@ -3162,8 +3200,8 @@
3162
3200
  "context": null,
3163
3201
  "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(12000);\n yield index_1.default.check();\n});",
3164
3202
  "err": {},
3165
- "uuid": "d289db96-e714-4b4c-8fa3-f318e1840de7",
3166
- "parentUUID": "5df5582e-1f24-4153-a62d-edae47655ab2",
3203
+ "uuid": "74c555e6-1acf-4f0f-8386-64ae386be6b0",
3204
+ "parentUUID": "f9ea34bd-997f-4c6c-ae9e-c15566c61644",
3167
3205
  "isHook": false,
3168
3206
  "skipped": false
3169
3207
  },
@@ -3171,17 +3209,17 @@
3171
3209
  "title": "should return nice error message if pyatv was not found",
3172
3210
  "fullTitle": "NodePyATVInstance static check() should return nice error message if pyatv was not found",
3173
3211
  "timedOut": false,
3174
- "duration": 3,
3212
+ "duration": 2,
3175
3213
  "state": "passed",
3176
3214
  "speed": "fast",
3177
3215
  "pass": true,
3178
3216
  "fail": false,
3179
3217
  "pending": false,
3180
3218
  "context": null,
3181
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});",
3219
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});",
3182
3220
  "err": {},
3183
- "uuid": "4117fd97-7605-4263-b804-42a79084f702",
3184
- "parentUUID": "5df5582e-1f24-4153-a62d-edae47655ab2",
3221
+ "uuid": "582ddac7-47c3-42ce-87b0-2112d68e190e",
3222
+ "parentUUID": "f9ea34bd-997f-4c6c-ae9e-c15566c61644",
3185
3223
  "isHook": false,
3186
3224
  "skipped": false
3187
3225
  },
@@ -3196,10 +3234,10 @@
3196
3234
  "fail": false,
3197
3235
  "pending": false,
3198
3236
  "context": null,
3199
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.stdout('atvremote 0.5.1').code(1).end();\n })\n });\n }), /Found pyatv, but unforunately it's too old. Please update pyatv./);\n});",
3237
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.5.1').code(1).end();\n })\n });\n }), /Found pyatv, but unforunately it's too old. Please update pyatv./);\n});",
3200
3238
  "err": {},
3201
- "uuid": "74f40ca9-9e7b-4147-8690-873e8876c2b9",
3202
- "parentUUID": "5df5582e-1f24-4153-a62d-edae47655ab2",
3239
+ "uuid": "04ea791e-a8ef-4068-8411-8ac316e7a362",
3240
+ "parentUUID": "f9ea34bd-997f-4c6c-ae9e-c15566c61644",
3203
3241
  "isHook": false,
3204
3242
  "skipped": false
3205
3243
  },
@@ -3214,31 +3252,31 @@
3214
3252
  "fail": false,
3215
3253
  "pending": false,
3216
3254
  "context": null,
3217
- "code": "return __awaiter(this, void 0, void 0, function* () {\n let i = 0;\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n if (i === 0) {\n cp.stdout('atvremote 0.7.0').code(1).end();\n i++;\n }\n else {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n }\n })\n });\n }), /Unable to scan for devices/);\n});",
3255
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n let i = 0;\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n if (i === 0) {\n cp.stdout('atvremote 0.7.0').code(1).end();\n i++;\n }\n else {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n }\n })\n });\n }), /Unable to scan for devices/);\n});",
3218
3256
  "err": {},
3219
- "uuid": "917bcc34-5163-41e4-9f62-899ee638b9ba",
3220
- "parentUUID": "5df5582e-1f24-4153-a62d-edae47655ab2",
3257
+ "uuid": "87fd9cfa-e6c2-4db1-9c41-c92f32b874e0",
3258
+ "parentUUID": "f9ea34bd-997f-4c6c-ae9e-c15566c61644",
3221
3259
  "isHook": false,
3222
3260
  "skipped": false
3223
3261
  }
3224
3262
  ],
3225
3263
  "suites": [],
3226
3264
  "passes": [
3227
- "d289db96-e714-4b4c-8fa3-f318e1840de7",
3228
- "4117fd97-7605-4263-b804-42a79084f702",
3229
- "74f40ca9-9e7b-4147-8690-873e8876c2b9",
3230
- "917bcc34-5163-41e4-9f62-899ee638b9ba"
3265
+ "74c555e6-1acf-4f0f-8386-64ae386be6b0",
3266
+ "582ddac7-47c3-42ce-87b0-2112d68e190e",
3267
+ "04ea791e-a8ef-4068-8411-8ac316e7a362",
3268
+ "87fd9cfa-e6c2-4db1-9c41-c92f32b874e0"
3231
3269
  ],
3232
3270
  "failures": [],
3233
3271
  "pending": [],
3234
3272
  "skipped": [],
3235
- "duration": 6239,
3273
+ "duration": 6144,
3236
3274
  "root": false,
3237
3275
  "rootEmpty": false,
3238
3276
  "_timeout": 2000
3239
3277
  },
3240
3278
  {
3241
- "uuid": "22fa8689-7f12-41ce-9d80-3d2e2150dc17",
3279
+ "uuid": "c379b2a2-27f0-4cff-a4b1-f677e240cbdf",
3242
3280
  "title": "static find()",
3243
3281
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3244
3282
  "file": "/test/instance.ts",
@@ -3249,7 +3287,7 @@
3249
3287
  "title": "should work [L]",
3250
3288
  "fullTitle": "NodePyATVInstance static find() should work [L]",
3251
3289
  "timedOut": false,
3252
- "duration": 5602,
3290
+ "duration": 5527,
3253
3291
  "state": "passed",
3254
3292
  "speed": "slow",
3255
3293
  "pass": true,
@@ -3258,8 +3296,8 @@
3258
3296
  "context": null,
3259
3297
  "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(8000);\n const result = yield index_1.default.find();\n assert_1.default.ok(Array.isArray(result));\n});",
3260
3298
  "err": {},
3261
- "uuid": "edb39026-1ad3-4b74-a559-18ee7688d9fb",
3262
- "parentUUID": "22fa8689-7f12-41ce-9d80-3d2e2150dc17",
3299
+ "uuid": "802a21cf-04fe-4d79-a822-c29b71414b0d",
3300
+ "parentUUID": "c379b2a2-27f0-4cff-a4b1-f677e240cbdf",
3263
3301
  "isHook": false,
3264
3302
  "skipped": false
3265
3303
  },
@@ -3267,17 +3305,17 @@
3267
3305
  "title": "should handle option.atvscriptPath",
3268
3306
  "fullTitle": "NodePyATVInstance static find() should handle option.atvscriptPath",
3269
3307
  "timedOut": false,
3270
- "duration": 1,
3308
+ "duration": 2,
3271
3309
  "state": "passed",
3272
3310
  "speed": "fast",
3273
3311
  "pass": true,
3274
3312
  "fail": false,
3275
3313
  "pending": false,
3276
3314
  "context": null,
3277
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n atvscriptPath: '/foo/bar',\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n assert_1.default.strictEqual(cp.cmd(), '/foo/bar');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});",
3315
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n atvscriptPath: '/foo/bar',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), '/foo/bar');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});",
3278
3316
  "err": {},
3279
- "uuid": "4c8192be-b93d-4f9c-84a6-142668c2c09d",
3280
- "parentUUID": "22fa8689-7f12-41ce-9d80-3d2e2150dc17",
3317
+ "uuid": "fba44b0e-5b17-48be-b308-766569f136d7",
3318
+ "parentUUID": "c379b2a2-27f0-4cff-a4b1-f677e240cbdf",
3281
3319
  "isHook": false,
3282
3320
  "skipped": false
3283
3321
  },
@@ -3285,17 +3323,17 @@
3285
3323
  "title": "should throw error on stderr output",
3286
3324
  "fullTitle": "NodePyATVInstance static find() should throw error on stderr output",
3287
3325
  "timedOut": false,
3288
- "duration": 1,
3326
+ "duration": 2,
3289
3327
  "state": "passed",
3290
3328
  "speed": "fast",
3291
3329
  "pass": true,
3292
3330
  "fail": false,
3293
3331
  "pending": false,
3294
3332
  "context": null,
3295
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.stderr('Hello World!').code(1).end();\n })\n });\n }), /Unable to execute request/);\n});",
3333
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stderr('Hello World!').code(1).end();\n })\n });\n }), /Unable to execute request/);\n});",
3296
3334
  "err": {},
3297
- "uuid": "867ff8d6-0f07-4ca8-aaf7-db2f6d5b5854",
3298
- "parentUUID": "22fa8689-7f12-41ce-9d80-3d2e2150dc17",
3335
+ "uuid": "f16f1db9-8a9d-4c10-b7e7-33b5b3fe413b",
3336
+ "parentUUID": "c379b2a2-27f0-4cff-a4b1-f677e240cbdf",
3299
3337
  "isHook": false,
3300
3338
  "skipped": false
3301
3339
  },
@@ -3310,10 +3348,10 @@
3310
3348
  "fail": false,
3311
3349
  "pending": false,
3312
3350
  "context": null,
3313
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.error(new Error('Hello world!')).code(1).end();\n })\n });\n }), /Hello world!/);\n});",
3351
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('Hello world!')).code(1).end();\n })\n });\n }), /Hello world!/);\n});",
3314
3352
  "err": {},
3315
- "uuid": "d7eb3c9a-6b66-4739-aa49-0ff9c96f3d7a",
3316
- "parentUUID": "22fa8689-7f12-41ce-9d80-3d2e2150dc17",
3353
+ "uuid": "cd764e16-6ecc-4add-8eef-0588486fcebf",
3354
+ "parentUUID": "c379b2a2-27f0-4cff-a4b1-f677e240cbdf",
3317
3355
  "isHook": false,
3318
3356
  "skipped": false
3319
3357
  },
@@ -3321,17 +3359,17 @@
3321
3359
  "title": "should throw error if atvscript result is not valid json",
3322
3360
  "fullTitle": "NodePyATVInstance static find() should throw error if atvscript result is not valid json",
3323
3361
  "timedOut": false,
3324
- "duration": 2,
3362
+ "duration": 1,
3325
3363
  "state": "passed",
3326
3364
  "speed": "fast",
3327
3365
  "pass": true,
3328
3366
  "fail": false,
3329
3367
  "pending": false,
3330
3368
  "context": null,
3331
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.stdout(JSON.stringify({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).substr(1)).end();\n })\n });\n }), /Unable to parse result/);\n});",
3369
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout(JSON.stringify({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).substr(1)).end();\n })\n });\n }), /Unable to parse result/);\n});",
3332
3370
  "err": {},
3333
- "uuid": "191fe71f-94d3-453d-bf15-dcfc02a92fe1",
3334
- "parentUUID": "22fa8689-7f12-41ce-9d80-3d2e2150dc17",
3371
+ "uuid": "8a2f0355-e162-400c-a4c8-9aa3e9cc34cb",
3372
+ "parentUUID": "c379b2a2-27f0-4cff-a4b1-f677e240cbdf",
3335
3373
  "isHook": false,
3336
3374
  "skipped": false
3337
3375
  },
@@ -3346,10 +3384,10 @@
3346
3384
  "fail": false,
3347
3385
  "pending": false,
3348
3386
  "context": null,
3349
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.stdout({\n result: 'error'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});",
3387
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout({\n result: 'error'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});",
3350
3388
  "err": {},
3351
- "uuid": "2c221c63-2f58-4e96-8072-b4975f53772d",
3352
- "parentUUID": "22fa8689-7f12-41ce-9d80-3d2e2150dc17",
3389
+ "uuid": "3598b498-40bd-4f9b-910a-3f048ade6597",
3390
+ "parentUUID": "c379b2a2-27f0-4cff-a4b1-f677e240cbdf",
3353
3391
  "isHook": false,
3354
3392
  "skipped": false
3355
3393
  },
@@ -3364,34 +3402,34 @@
3364
3402
  "fail": false,
3365
3403
  "pending": false,
3366
3404
  "context": null,
3367
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n cp.stdout({\n result: 'success'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});",
3405
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout({\n result: 'success'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});",
3368
3406
  "err": {},
3369
- "uuid": "e32e267f-47cf-4f9f-b96b-48fccd34ddd2",
3370
- "parentUUID": "22fa8689-7f12-41ce-9d80-3d2e2150dc17",
3407
+ "uuid": "f64cb2d1-4345-42b1-b8c5-0b013af78a1f",
3408
+ "parentUUID": "c379b2a2-27f0-4cff-a4b1-f677e240cbdf",
3371
3409
  "isHook": false,
3372
3410
  "skipped": false
3373
3411
  }
3374
3412
  ],
3375
3413
  "suites": [],
3376
3414
  "passes": [
3377
- "edb39026-1ad3-4b74-a559-18ee7688d9fb",
3378
- "4c8192be-b93d-4f9c-84a6-142668c2c09d",
3379
- "867ff8d6-0f07-4ca8-aaf7-db2f6d5b5854",
3380
- "d7eb3c9a-6b66-4739-aa49-0ff9c96f3d7a",
3381
- "191fe71f-94d3-453d-bf15-dcfc02a92fe1",
3382
- "2c221c63-2f58-4e96-8072-b4975f53772d",
3383
- "e32e267f-47cf-4f9f-b96b-48fccd34ddd2"
3415
+ "802a21cf-04fe-4d79-a822-c29b71414b0d",
3416
+ "fba44b0e-5b17-48be-b308-766569f136d7",
3417
+ "f16f1db9-8a9d-4c10-b7e7-33b5b3fe413b",
3418
+ "cd764e16-6ecc-4add-8eef-0588486fcebf",
3419
+ "8a2f0355-e162-400c-a4c8-9aa3e9cc34cb",
3420
+ "3598b498-40bd-4f9b-910a-3f048ade6597",
3421
+ "f64cb2d1-4345-42b1-b8c5-0b013af78a1f"
3384
3422
  ],
3385
3423
  "failures": [],
3386
3424
  "pending": [],
3387
3425
  "skipped": [],
3388
- "duration": 5610,
3426
+ "duration": 5536,
3389
3427
  "root": false,
3390
3428
  "rootEmpty": false,
3391
3429
  "_timeout": 2000
3392
3430
  },
3393
3431
  {
3394
- "uuid": "1801808a-4e76-4c7d-8e47-275246d99e44",
3432
+ "uuid": "0940cf38-67d4-42fb-aa27-293324e3e2be",
3395
3433
  "title": "static device()",
3396
3434
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3397
3435
  "file": "/test/instance.ts",
@@ -3402,7 +3440,7 @@
3402
3440
  "title": "should pass options to constructor",
3403
3441
  "fullTitle": "NodePyATVInstance static device() should pass options to constructor",
3404
3442
  "timedOut": false,
3405
- "duration": 1,
3443
+ "duration": 0,
3406
3444
  "state": "passed",
3407
3445
  "speed": "fast",
3408
3446
  "pass": true,
@@ -3411,26 +3449,26 @@
3411
3449
  "context": null,
3412
3450
  "code": "const device = index_1.default.device({ host: '192.168.178.6', name: 'My Testdevice' });\nassert_1.default.strictEqual(device.host, '192.168.178.6');\nassert_1.default.strictEqual(device.name, 'My Testdevice');",
3413
3451
  "err": {},
3414
- "uuid": "fa2758c6-4318-4aeb-b594-bce46b5aaadd",
3415
- "parentUUID": "1801808a-4e76-4c7d-8e47-275246d99e44",
3452
+ "uuid": "97916697-6d00-4015-9d11-c94df0976781",
3453
+ "parentUUID": "0940cf38-67d4-42fb-aa27-293324e3e2be",
3416
3454
  "isHook": false,
3417
3455
  "skipped": false
3418
3456
  }
3419
3457
  ],
3420
3458
  "suites": [],
3421
3459
  "passes": [
3422
- "fa2758c6-4318-4aeb-b594-bce46b5aaadd"
3460
+ "97916697-6d00-4015-9d11-c94df0976781"
3423
3461
  ],
3424
3462
  "failures": [],
3425
3463
  "pending": [],
3426
3464
  "skipped": [],
3427
- "duration": 1,
3465
+ "duration": 0,
3428
3466
  "root": false,
3429
3467
  "rootEmpty": false,
3430
3468
  "_timeout": 2000
3431
3469
  },
3432
3470
  {
3433
- "uuid": "aa582847-178e-41ea-ad6f-17ee9bcb3a63",
3471
+ "uuid": "8e1ad529-22e3-4090-b038-ed13883fd4c4",
3434
3472
  "title": "version()",
3435
3473
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3436
3474
  "file": "/test/instance.ts",
@@ -3441,35 +3479,35 @@
3441
3479
  "title": "should merge options from constructor",
3442
3480
  "fullTitle": "NodePyATVInstance version() should merge options from constructor",
3443
3481
  "timedOut": false,
3444
- "duration": 2,
3482
+ "duration": 1,
3445
3483
  "state": "passed",
3446
3484
  "speed": "fast",
3447
3485
  "pass": true,
3448
3486
  "fail": false,
3449
3487
  "pending": false,
3450
3488
  "context": null,
3451
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvremotePath: 'test' });\n yield i.version({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.code(1).end();\n })\n });\n});",
3489
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvremotePath: 'test' });\n yield i.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.code(1).end();\n })\n });\n});",
3452
3490
  "err": {},
3453
- "uuid": "1028c287-e73f-4ae0-ba60-536bfa308d14",
3454
- "parentUUID": "aa582847-178e-41ea-ad6f-17ee9bcb3a63",
3491
+ "uuid": "1aacbdf1-4311-41d6-bc19-8583e1a32ede",
3492
+ "parentUUID": "8e1ad529-22e3-4090-b038-ed13883fd4c4",
3455
3493
  "isHook": false,
3456
3494
  "skipped": false
3457
3495
  }
3458
3496
  ],
3459
3497
  "suites": [],
3460
3498
  "passes": [
3461
- "1028c287-e73f-4ae0-ba60-536bfa308d14"
3499
+ "1aacbdf1-4311-41d6-bc19-8583e1a32ede"
3462
3500
  ],
3463
3501
  "failures": [],
3464
3502
  "pending": [],
3465
3503
  "skipped": [],
3466
- "duration": 2,
3504
+ "duration": 1,
3467
3505
  "root": false,
3468
3506
  "rootEmpty": false,
3469
3507
  "_timeout": 2000
3470
3508
  },
3471
3509
  {
3472
- "uuid": "b17fd829-c6a9-41af-a996-f883dd365c95",
3510
+ "uuid": "83386d83-489a-47dd-b786-6aa0631e6e4e",
3473
3511
  "title": "check()",
3474
3512
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3475
3513
  "file": "/test/instance.ts",
@@ -3480,35 +3518,35 @@
3480
3518
  "title": "should merge options from constructor",
3481
3519
  "fullTitle": "NodePyATVInstance check() should merge options from constructor",
3482
3520
  "timedOut": false,
3483
- "duration": 2,
3521
+ "duration": 3,
3484
3522
  "state": "passed",
3485
3523
  "speed": "fast",
3486
3524
  "pass": true,
3487
3525
  "fail": false,
3488
3526
  "pending": false,
3489
3527
  "context": null,
3490
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvremotePath: 'test' });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield i.check({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});",
3528
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvremotePath: 'test' });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield i.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});",
3491
3529
  "err": {},
3492
- "uuid": "6f487426-e3e5-485a-90d4-aa4fd866d124",
3493
- "parentUUID": "b17fd829-c6a9-41af-a996-f883dd365c95",
3530
+ "uuid": "f10df6b9-f382-4352-aa7a-c5097a7b2b80",
3531
+ "parentUUID": "83386d83-489a-47dd-b786-6aa0631e6e4e",
3494
3532
  "isHook": false,
3495
3533
  "skipped": false
3496
3534
  }
3497
3535
  ],
3498
3536
  "suites": [],
3499
3537
  "passes": [
3500
- "6f487426-e3e5-485a-90d4-aa4fd866d124"
3538
+ "f10df6b9-f382-4352-aa7a-c5097a7b2b80"
3501
3539
  ],
3502
3540
  "failures": [],
3503
3541
  "pending": [],
3504
3542
  "skipped": [],
3505
- "duration": 2,
3543
+ "duration": 3,
3506
3544
  "root": false,
3507
3545
  "rootEmpty": false,
3508
3546
  "_timeout": 2000
3509
3547
  },
3510
3548
  {
3511
- "uuid": "75a42357-b01d-421c-b83a-f991b15366a4",
3549
+ "uuid": "e4dd23c6-0483-46b7-aa89-9359384daa40",
3512
3550
  "title": "find()",
3513
3551
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3514
3552
  "file": "/test/instance.ts",
@@ -3519,35 +3557,35 @@
3519
3557
  "title": "should merge options from constructor",
3520
3558
  "fullTitle": "NodePyATVInstance find() should merge options from constructor",
3521
3559
  "timedOut": false,
3522
- "duration": 1,
3560
+ "duration": 2,
3523
3561
  "state": "passed",
3524
3562
  "speed": "fast",
3525
3563
  "pass": true,
3526
3564
  "fail": false,
3527
3565
  "pending": false,
3528
3566
  "context": null,
3529
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvscriptPath: 'test' });\n yield i.find({\n spawn: fake_spawn_1.createFakeSpawn(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});",
3567
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvscriptPath: 'test' });\n yield i.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});",
3530
3568
  "err": {},
3531
- "uuid": "8d990d1c-5b6e-42ef-a113-b0742c985f2b",
3532
- "parentUUID": "75a42357-b01d-421c-b83a-f991b15366a4",
3569
+ "uuid": "3a71fe03-1552-421d-b20c-d67775e3b601",
3570
+ "parentUUID": "e4dd23c6-0483-46b7-aa89-9359384daa40",
3533
3571
  "isHook": false,
3534
3572
  "skipped": false
3535
3573
  }
3536
3574
  ],
3537
3575
  "suites": [],
3538
3576
  "passes": [
3539
- "8d990d1c-5b6e-42ef-a113-b0742c985f2b"
3577
+ "3a71fe03-1552-421d-b20c-d67775e3b601"
3540
3578
  ],
3541
3579
  "failures": [],
3542
3580
  "pending": [],
3543
3581
  "skipped": [],
3544
- "duration": 1,
3582
+ "duration": 2,
3545
3583
  "root": false,
3546
3584
  "rootEmpty": false,
3547
3585
  "_timeout": 2000
3548
3586
  },
3549
3587
  {
3550
- "uuid": "a73db786-f3bf-45c2-b435-e46af91abea5",
3588
+ "uuid": "77a436da-504f-4da1-ac9a-50a53d53869a",
3551
3589
  "title": "device()",
3552
3590
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3553
3591
  "file": "/test/instance.ts",
@@ -3558,7 +3596,7 @@
3558
3596
  "title": "should merge options from constructor",
3559
3597
  "fullTitle": "NodePyATVInstance device() should merge options from constructor",
3560
3598
  "timedOut": false,
3561
- "duration": 0,
3599
+ "duration": 1,
3562
3600
  "state": "passed",
3563
3601
  "speed": "fast",
3564
3602
  "pass": true,
@@ -3567,26 +3605,26 @@
3567
3605
  "context": null,
3568
3606
  "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ debug: true });\n const d = i.device({ name: 'My Testdevice', host: '192.168.178.2' });\n assert_1.default.deepStrictEqual(d.debug, true);\n});",
3569
3607
  "err": {},
3570
- "uuid": "9da102b1-f128-4b23-b959-99da80bf3a52",
3571
- "parentUUID": "a73db786-f3bf-45c2-b435-e46af91abea5",
3608
+ "uuid": "e4237d9e-d618-46a0-9378-694c38210b41",
3609
+ "parentUUID": "77a436da-504f-4da1-ac9a-50a53d53869a",
3572
3610
  "isHook": false,
3573
3611
  "skipped": false
3574
3612
  }
3575
3613
  ],
3576
3614
  "suites": [],
3577
3615
  "passes": [
3578
- "9da102b1-f128-4b23-b959-99da80bf3a52"
3616
+ "e4237d9e-d618-46a0-9378-694c38210b41"
3579
3617
  ],
3580
3618
  "failures": [],
3581
3619
  "pending": [],
3582
3620
  "skipped": [],
3583
- "duration": 0,
3621
+ "duration": 1,
3584
3622
  "root": false,
3585
3623
  "rootEmpty": false,
3586
3624
  "_timeout": 2000
3587
3625
  },
3588
3626
  {
3589
- "uuid": "8c52add1-4ca8-47bc-8ba5-22aad2ee3a79",
3627
+ "uuid": "5dd6d654-2ab5-4b37-8676-b8a76b802c45",
3590
3628
  "title": "Type Exports",
3591
3629
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3592
3630
  "file": "/test/instance.ts",
@@ -3606,8 +3644,8 @@
3606
3644
  "context": null,
3607
3645
  "code": "assert_1.default.ok(index_1.NodePyATVProtocol);",
3608
3646
  "err": {},
3609
- "uuid": "cf009811-e279-499a-8413-1ac1f0a14f71",
3610
- "parentUUID": "8c52add1-4ca8-47bc-8ba5-22aad2ee3a79",
3647
+ "uuid": "2103e2c5-ed46-45f2-880e-20a06cf8647e",
3648
+ "parentUUID": "5dd6d654-2ab5-4b37-8676-b8a76b802c45",
3611
3649
  "isHook": false,
3612
3650
  "skipped": false
3613
3651
  },
@@ -3624,8 +3662,8 @@
3624
3662
  "context": null,
3625
3663
  "code": "assert_1.default.ok(index_1.NodePyATVMediaType);",
3626
3664
  "err": {},
3627
- "uuid": "784f68aa-62c2-4e6f-9553-d5382428a5c2",
3628
- "parentUUID": "8c52add1-4ca8-47bc-8ba5-22aad2ee3a79",
3665
+ "uuid": "7399cf4d-98f1-4ff0-9bdf-4bcf32072f76",
3666
+ "parentUUID": "5dd6d654-2ab5-4b37-8676-b8a76b802c45",
3629
3667
  "isHook": false,
3630
3668
  "skipped": false
3631
3669
  },
@@ -3642,8 +3680,8 @@
3642
3680
  "context": null,
3643
3681
  "code": "assert_1.default.ok(index_1.NodePyATVDeviceEvent);",
3644
3682
  "err": {},
3645
- "uuid": "26ee7de2-2792-4f9e-909a-de4d6d5ca179",
3646
- "parentUUID": "8c52add1-4ca8-47bc-8ba5-22aad2ee3a79",
3683
+ "uuid": "1a7ce0aa-691c-4b5b-a4ee-c442808443dc",
3684
+ "parentUUID": "5dd6d654-2ab5-4b37-8676-b8a76b802c45",
3647
3685
  "isHook": false,
3648
3686
  "skipped": false
3649
3687
  },
@@ -3660,8 +3698,8 @@
3660
3698
  "context": null,
3661
3699
  "code": "assert_1.default.ok(index_1.NodePyATVDeviceState);",
3662
3700
  "err": {},
3663
- "uuid": "e2013a84-c336-415d-9226-3b8a95cecca9",
3664
- "parentUUID": "8c52add1-4ca8-47bc-8ba5-22aad2ee3a79",
3701
+ "uuid": "ad49184c-0753-41e3-be79-9feaa5a014ee",
3702
+ "parentUUID": "5dd6d654-2ab5-4b37-8676-b8a76b802c45",
3665
3703
  "isHook": false,
3666
3704
  "skipped": false
3667
3705
  },
@@ -3678,8 +3716,8 @@
3678
3716
  "context": null,
3679
3717
  "code": "assert_1.default.ok(index_1.NodePyATVRepeatState);",
3680
3718
  "err": {},
3681
- "uuid": "7179846d-3f75-4e7e-b4d1-0bb0965dc567",
3682
- "parentUUID": "8c52add1-4ca8-47bc-8ba5-22aad2ee3a79",
3719
+ "uuid": "3da0e5c2-1ce7-4574-804a-aa5c4a415a2c",
3720
+ "parentUUID": "5dd6d654-2ab5-4b37-8676-b8a76b802c45",
3683
3721
  "isHook": false,
3684
3722
  "skipped": false
3685
3723
  },
@@ -3696,8 +3734,8 @@
3696
3734
  "context": null,
3697
3735
  "code": "assert_1.default.ok(index_1.NodePyATVShuffleState);",
3698
3736
  "err": {},
3699
- "uuid": "71d6c895-1279-4983-9bcc-4b10aaea9732",
3700
- "parentUUID": "8c52add1-4ca8-47bc-8ba5-22aad2ee3a79",
3737
+ "uuid": "d87c7dd2-4b07-4bd7-9bd6-c5234c0ddc6e",
3738
+ "parentUUID": "5dd6d654-2ab5-4b37-8676-b8a76b802c45",
3701
3739
  "isHook": false,
3702
3740
  "skipped": false
3703
3741
  },
@@ -3714,21 +3752,59 @@
3714
3752
  "context": null,
3715
3753
  "code": "assert_1.default.ok(index_1.NodePyATVKeys);",
3716
3754
  "err": {},
3717
- "uuid": "68332df5-3765-4586-8f48-e58abc4cc8b2",
3718
- "parentUUID": "8c52add1-4ca8-47bc-8ba5-22aad2ee3a79",
3755
+ "uuid": "d112e96f-9929-47cb-9cee-148f6b09b60c",
3756
+ "parentUUID": "5dd6d654-2ab5-4b37-8676-b8a76b802c45",
3757
+ "isHook": false,
3758
+ "skipped": false
3759
+ },
3760
+ {
3761
+ "title": "Type NodePyATVInstanceOptions should be exported",
3762
+ "fullTitle": "NodePyATVInstance Type Exports Type NodePyATVInstanceOptions should be exported",
3763
+ "timedOut": false,
3764
+ "duration": 0,
3765
+ "state": "passed",
3766
+ "speed": "fast",
3767
+ "pass": true,
3768
+ "fail": false,
3769
+ "pending": false,
3770
+ "context": null,
3771
+ "code": "assert_1.default.ok(index_1.NodePyATVListenerState);",
3772
+ "err": {},
3773
+ "uuid": "dd33ba1d-8413-438d-ad02-b1b3a50fbc66",
3774
+ "parentUUID": "5dd6d654-2ab5-4b37-8676-b8a76b802c45",
3775
+ "isHook": false,
3776
+ "skipped": false
3777
+ },
3778
+ {
3779
+ "title": "Type NodePyATVPowerState should be exported",
3780
+ "fullTitle": "NodePyATVInstance Type Exports Type NodePyATVPowerState should be exported",
3781
+ "timedOut": false,
3782
+ "duration": 0,
3783
+ "state": "passed",
3784
+ "speed": "fast",
3785
+ "pass": true,
3786
+ "fail": false,
3787
+ "pending": false,
3788
+ "context": null,
3789
+ "code": "assert_1.default.ok(index_1.NodePyATVPowerState);",
3790
+ "err": {},
3791
+ "uuid": "06e066a3-2dd3-48ed-99d5-a9fc07ac135a",
3792
+ "parentUUID": "5dd6d654-2ab5-4b37-8676-b8a76b802c45",
3719
3793
  "isHook": false,
3720
3794
  "skipped": false
3721
3795
  }
3722
3796
  ],
3723
3797
  "suites": [],
3724
3798
  "passes": [
3725
- "cf009811-e279-499a-8413-1ac1f0a14f71",
3726
- "784f68aa-62c2-4e6f-9553-d5382428a5c2",
3727
- "26ee7de2-2792-4f9e-909a-de4d6d5ca179",
3728
- "e2013a84-c336-415d-9226-3b8a95cecca9",
3729
- "7179846d-3f75-4e7e-b4d1-0bb0965dc567",
3730
- "71d6c895-1279-4983-9bcc-4b10aaea9732",
3731
- "68332df5-3765-4586-8f48-e58abc4cc8b2"
3799
+ "2103e2c5-ed46-45f2-880e-20a06cf8647e",
3800
+ "7399cf4d-98f1-4ff0-9bdf-4bcf32072f76",
3801
+ "1a7ce0aa-691c-4b5b-a4ee-c442808443dc",
3802
+ "ad49184c-0753-41e3-be79-9feaa5a014ee",
3803
+ "3da0e5c2-1ce7-4574-804a-aa5c4a415a2c",
3804
+ "d87c7dd2-4b07-4bd7-9bd6-c5234c0ddc6e",
3805
+ "d112e96f-9929-47cb-9cee-148f6b09b60c",
3806
+ "dd33ba1d-8413-438d-ad02-b1b3a50fbc66",
3807
+ "06e066a3-2dd3-48ed-99d5-a9fc07ac135a"
3732
3808
  ],
3733
3809
  "failures": [],
3734
3810
  "pending": [],
@@ -3749,7 +3825,7 @@
3749
3825
  "_timeout": 2000
3750
3826
  },
3751
3827
  {
3752
- "uuid": "112a102c-71b3-4e2b-b0c4-cf8a3660b44e",
3828
+ "uuid": "321ad6db-9240-45f1-beb4-c40efae97579",
3753
3829
  "title": "Tools",
3754
3830
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
3755
3831
  "file": "/test/tools.ts",
@@ -3758,7 +3834,7 @@
3758
3834
  "tests": [],
3759
3835
  "suites": [
3760
3836
  {
3761
- "uuid": "a64a3eb5-8a55-407f-b27d-07430871b1d2",
3837
+ "uuid": "0da15df2-e29e-4c0b-b26c-f04c1952e891",
3762
3838
  "title": "addRequestId() / removeRequestId()",
3763
3839
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
3764
3840
  "file": "/test/tools.ts",
@@ -3769,17 +3845,17 @@
3769
3845
  "title": "should return a string",
3770
3846
  "fullTitle": "Tools addRequestId() / removeRequestId() should return a string",
3771
3847
  "timedOut": false,
3772
- "duration": 1,
3848
+ "duration": 0,
3773
3849
  "state": "passed",
3774
3850
  "speed": "fast",
3775
3851
  "pass": true,
3776
3852
  "fail": false,
3777
3853
  "pending": false,
3778
3854
  "context": null,
3779
- "code": "const id = tools_1.addRequestId();\nassert_1.default.strictEqual(typeof id, 'string');\ntools_1.removeRequestId(id);",
3855
+ "code": "const id = (0, tools_1.addRequestId)();\nassert_1.default.strictEqual(typeof id, 'string');\n(0, tools_1.removeRequestId)(id);",
3780
3856
  "err": {},
3781
- "uuid": "d33b6383-71e8-48c5-9d36-d340770ec359",
3782
- "parentUUID": "a64a3eb5-8a55-407f-b27d-07430871b1d2",
3857
+ "uuid": "e79f177c-03b9-4d18-b319-0ecb4e21a735",
3858
+ "parentUUID": "0da15df2-e29e-4c0b-b26c-f04c1952e891",
3783
3859
  "isHook": false,
3784
3860
  "skipped": false
3785
3861
  },
@@ -3794,29 +3870,29 @@
3794
3870
  "fail": false,
3795
3871
  "pending": false,
3796
3872
  "context": null,
3797
- "code": "tools_1.removeRequestId('FOO');",
3873
+ "code": "(0, tools_1.removeRequestId)('FOO');",
3798
3874
  "err": {},
3799
- "uuid": "c15547cb-1d1e-4742-9f71-5f69e19b1182",
3800
- "parentUUID": "a64a3eb5-8a55-407f-b27d-07430871b1d2",
3875
+ "uuid": "e909b23e-61dc-4593-ab84-2f1372b148f8",
3876
+ "parentUUID": "0da15df2-e29e-4c0b-b26c-f04c1952e891",
3801
3877
  "isHook": false,
3802
3878
  "skipped": false
3803
3879
  }
3804
3880
  ],
3805
3881
  "suites": [],
3806
3882
  "passes": [
3807
- "d33b6383-71e8-48c5-9d36-d340770ec359",
3808
- "c15547cb-1d1e-4742-9f71-5f69e19b1182"
3883
+ "e79f177c-03b9-4d18-b319-0ecb4e21a735",
3884
+ "e909b23e-61dc-4593-ab84-2f1372b148f8"
3809
3885
  ],
3810
3886
  "failures": [],
3811
3887
  "pending": [],
3812
3888
  "skipped": [],
3813
- "duration": 1,
3889
+ "duration": 0,
3814
3890
  "root": false,
3815
3891
  "rootEmpty": false,
3816
3892
  "_timeout": 2000
3817
3893
  },
3818
3894
  {
3819
- "uuid": "8feade42-853d-4a5a-844d-dec457d4a972",
3895
+ "uuid": "81fc7655-4ee3-413f-aa33-a8752a3a6f75",
3820
3896
  "title": "debug()",
3821
3897
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
3822
3898
  "file": "/test/tools.ts",
@@ -3834,10 +3910,10 @@
3834
3910
  "fail": false,
3835
3911
  "pending": false,
3836
3912
  "context": null,
3837
- "code": "tools_1.debug('TEST', 'Hello World.', {});",
3913
+ "code": "(0, tools_1.debug)('TEST', 'Hello World.', {});",
3838
3914
  "err": {},
3839
- "uuid": "63be0808-f0f0-4c1a-ab84-5047079dcbde",
3840
- "parentUUID": "8feade42-853d-4a5a-844d-dec457d4a972",
3915
+ "uuid": "dc74e89c-1c5b-4043-baec-4c904339d9c6",
3916
+ "parentUUID": "81fc7655-4ee3-413f-aa33-a8752a3a6f75",
3841
3917
  "isHook": false,
3842
3918
  "skipped": false
3843
3919
  },
@@ -3852,10 +3928,10 @@
3852
3928
  "fail": false,
3853
3929
  "pending": false,
3854
3930
  "context": null,
3855
- "code": "tools_1.debug('TEST', 'Hello World.', { debug: true });",
3931
+ "code": "(0, tools_1.debug)('TEST', 'Hello World.', { debug: true });",
3856
3932
  "err": {},
3857
- "uuid": "4cdc4683-a3dc-42d2-898d-c14347a50345",
3858
- "parentUUID": "8feade42-853d-4a5a-844d-dec457d4a972",
3933
+ "uuid": "2c595dc6-d795-4624-8933-395ac04a7d4f",
3934
+ "parentUUID": "81fc7655-4ee3-413f-aa33-a8752a3a6f75",
3859
3935
  "isHook": false,
3860
3936
  "skipped": false
3861
3937
  },
@@ -3870,10 +3946,10 @@
3870
3946
  "fail": false,
3871
3947
  "pending": false,
3872
3948
  "context": null,
3873
- "code": "tools_1.debug('TEST', 'Hello World.', {\n debug: function (msg) {\n assert_1.default.strictEqual(this, null);\n assert_1.default.ok(msg.includes('Hello World'));\n }\n});",
3949
+ "code": "(0, tools_1.debug)('TEST', 'Hello World.', {\n debug: function (msg) {\n assert_1.default.strictEqual(this, null);\n assert_1.default.ok(msg.includes('Hello World'));\n }\n});",
3874
3950
  "err": {},
3875
- "uuid": "e556ebd2-ab79-4855-b90c-95cde956e36a",
3876
- "parentUUID": "8feade42-853d-4a5a-844d-dec457d4a972",
3951
+ "uuid": "d037ffd8-57ce-4fab-abd5-c6dec6cc9c95",
3952
+ "parentUUID": "81fc7655-4ee3-413f-aa33-a8752a3a6f75",
3877
3953
  "isHook": false,
3878
3954
  "skipped": false
3879
3955
  },
@@ -3881,17 +3957,17 @@
3881
3957
  "title": "should work with colors disabled",
3882
3958
  "fullTitle": "Tools debug() should work with colors disabled",
3883
3959
  "timedOut": false,
3884
- "duration": 1,
3960
+ "duration": 0,
3885
3961
  "state": "passed",
3886
3962
  "speed": "fast",
3887
3963
  "pass": true,
3888
3964
  "fail": false,
3889
3965
  "pending": false,
3890
3966
  "context": null,
3891
- "code": "tools_1.debug('TEST', 'Hello World.', { noColors: true });",
3967
+ "code": "(0, tools_1.debug)('TEST', 'Hello World.', { noColors: true });",
3892
3968
  "err": {},
3893
- "uuid": "95500e40-9813-4635-a390-b054810aa8f2",
3894
- "parentUUID": "8feade42-853d-4a5a-844d-dec457d4a972",
3969
+ "uuid": "2459a41e-3d52-4691-bdb6-38e9f566032e",
3970
+ "parentUUID": "81fc7655-4ee3-413f-aa33-a8752a3a6f75",
3895
3971
  "isHook": false,
3896
3972
  "skipped": false
3897
3973
  },
@@ -3906,32 +3982,32 @@
3906
3982
  "fail": false,
3907
3983
  "pending": false,
3908
3984
  "context": null,
3909
- "code": "tools_1.debug('TEST', 'Hello World.', {\n noColors: true,\n debug: function (msg) {\n assert_1.default.strictEqual(this, null);\n assert_1.default.strictEqual(msg, '[node-pyatv][TEST] Hello World.');\n }\n});",
3985
+ "code": "(0, tools_1.debug)('TEST', 'Hello World.', {\n noColors: true,\n debug: function (msg) {\n assert_1.default.strictEqual(this, null);\n assert_1.default.strictEqual(msg, '[node-pyatv][TEST] Hello World.');\n }\n});",
3910
3986
  "err": {},
3911
- "uuid": "98e17bb5-b9e1-4c97-9a7c-6a2b680f5d93",
3912
- "parentUUID": "8feade42-853d-4a5a-844d-dec457d4a972",
3987
+ "uuid": "993fad52-fe1b-44b8-9653-8652955f2e18",
3988
+ "parentUUID": "81fc7655-4ee3-413f-aa33-a8752a3a6f75",
3913
3989
  "isHook": false,
3914
3990
  "skipped": false
3915
3991
  }
3916
3992
  ],
3917
3993
  "suites": [],
3918
3994
  "passes": [
3919
- "63be0808-f0f0-4c1a-ab84-5047079dcbde",
3920
- "4cdc4683-a3dc-42d2-898d-c14347a50345",
3921
- "e556ebd2-ab79-4855-b90c-95cde956e36a",
3922
- "95500e40-9813-4635-a390-b054810aa8f2",
3923
- "98e17bb5-b9e1-4c97-9a7c-6a2b680f5d93"
3995
+ "dc74e89c-1c5b-4043-baec-4c904339d9c6",
3996
+ "2c595dc6-d795-4624-8933-395ac04a7d4f",
3997
+ "d037ffd8-57ce-4fab-abd5-c6dec6cc9c95",
3998
+ "2459a41e-3d52-4691-bdb6-38e9f566032e",
3999
+ "993fad52-fe1b-44b8-9653-8652955f2e18"
3924
4000
  ],
3925
4001
  "failures": [],
3926
4002
  "pending": [],
3927
4003
  "skipped": [],
3928
- "duration": 2,
4004
+ "duration": 1,
3929
4005
  "root": false,
3930
4006
  "rootEmpty": false,
3931
4007
  "_timeout": 2000
3932
4008
  },
3933
4009
  {
3934
- "uuid": "26d759cb-5b9f-47f9-9e20-63c5d0b6a8cf",
4010
+ "uuid": "45fbb1f8-51da-4f43-b0ee-d922e0ff0940",
3935
4011
  "title": "getExecutable()",
3936
4012
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
3937
4013
  "file": "/test/tools.ts",
@@ -3942,17 +4018,17 @@
3942
4018
  "title": "should handle atvremotePath if set",
3943
4019
  "fullTitle": "Tools getExecutable() should handle atvremotePath if set",
3944
4020
  "timedOut": false,
3945
- "duration": 1,
4021
+ "duration": 0,
3946
4022
  "state": "passed",
3947
4023
  "speed": "fast",
3948
4024
  "pass": true,
3949
4025
  "fail": false,
3950
4026
  "pending": false,
3951
4027
  "context": null,
3952
- "code": "const result = tools_1.getExecutable(types_1.NodePyATVExecutableType.atvremote, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert_1.default.strictEqual(result, '/tmp/1');",
4028
+ "code": "const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvremote, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert_1.default.strictEqual(result, '/tmp/1');",
3953
4029
  "err": {},
3954
- "uuid": "92b02390-8ca1-41f9-8683-67edcac68808",
3955
- "parentUUID": "26d759cb-5b9f-47f9-9e20-63c5d0b6a8cf",
4030
+ "uuid": "f9a11d13-03ac-49c8-b2f5-dbdf204e8223",
4031
+ "parentUUID": "45fbb1f8-51da-4f43-b0ee-d922e0ff0940",
3956
4032
  "isHook": false,
3957
4033
  "skipped": false
3958
4034
  },
@@ -3960,17 +4036,17 @@
3960
4036
  "title": "should handle atvscriptPath if set",
3961
4037
  "fullTitle": "Tools getExecutable() should handle atvscriptPath if set",
3962
4038
  "timedOut": false,
3963
- "duration": 0,
4039
+ "duration": 1,
3964
4040
  "state": "passed",
3965
4041
  "speed": "fast",
3966
4042
  "pass": true,
3967
4043
  "fail": false,
3968
4044
  "pending": false,
3969
4045
  "context": null,
3970
- "code": "const result = tools_1.getExecutable(types_1.NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert_1.default.strictEqual(result, '/tmp/2');",
4046
+ "code": "const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert_1.default.strictEqual(result, '/tmp/2');",
3971
4047
  "err": {},
3972
- "uuid": "74208f14-47ae-4e54-964e-e3e0235d6a31",
3973
- "parentUUID": "26d759cb-5b9f-47f9-9e20-63c5d0b6a8cf",
4048
+ "uuid": "8f2368b9-5b7d-4e38-88a3-ab57fcee9f11",
4049
+ "parentUUID": "45fbb1f8-51da-4f43-b0ee-d922e0ff0940",
3974
4050
  "isHook": false,
3975
4051
  "skipped": false
3976
4052
  },
@@ -3985,10 +4061,10 @@
3985
4061
  "fail": false,
3986
4062
  "pending": false,
3987
4063
  "context": null,
3988
- "code": "const result = tools_1.getExecutable(types_1.NodePyATVExecutableType.atvremote, {\n atvscriptPath: '/tmp'\n});\nassert_1.default.strictEqual(result, 'atvremote');",
4064
+ "code": "const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvremote, {\n atvscriptPath: '/tmp'\n});\nassert_1.default.strictEqual(result, 'atvremote');",
3989
4065
  "err": {},
3990
- "uuid": "6638d560-fefc-48da-b73e-a2f159814ba3",
3991
- "parentUUID": "26d759cb-5b9f-47f9-9e20-63c5d0b6a8cf",
4066
+ "uuid": "bb9eb8b7-f536-4a57-8a9e-93eaa738c1fd",
4067
+ "parentUUID": "45fbb1f8-51da-4f43-b0ee-d922e0ff0940",
3992
4068
  "isHook": false,
3993
4069
  "skipped": false
3994
4070
  },
@@ -4003,20 +4079,20 @@
4003
4079
  "fail": false,
4004
4080
  "pending": false,
4005
4081
  "context": null,
4006
- "code": "const result = tools_1.getExecutable(types_1.NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp'\n});\nassert_1.default.strictEqual(result, 'atvscript');",
4082
+ "code": "const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp'\n});\nassert_1.default.strictEqual(result, 'atvscript');",
4007
4083
  "err": {},
4008
- "uuid": "0048ad49-f679-4daa-bcd1-01f4b9dc6894",
4009
- "parentUUID": "26d759cb-5b9f-47f9-9e20-63c5d0b6a8cf",
4084
+ "uuid": "0dd92dfd-7966-4e51-b3ca-8752ce955343",
4085
+ "parentUUID": "45fbb1f8-51da-4f43-b0ee-d922e0ff0940",
4010
4086
  "isHook": false,
4011
4087
  "skipped": false
4012
4088
  }
4013
4089
  ],
4014
4090
  "suites": [],
4015
4091
  "passes": [
4016
- "92b02390-8ca1-41f9-8683-67edcac68808",
4017
- "74208f14-47ae-4e54-964e-e3e0235d6a31",
4018
- "6638d560-fefc-48da-b73e-a2f159814ba3",
4019
- "0048ad49-f679-4daa-bcd1-01f4b9dc6894"
4092
+ "f9a11d13-03ac-49c8-b2f5-dbdf204e8223",
4093
+ "8f2368b9-5b7d-4e38-88a3-ab57fcee9f11",
4094
+ "bb9eb8b7-f536-4a57-8a9e-93eaa738c1fd",
4095
+ "0dd92dfd-7966-4e51-b3ca-8752ce955343"
4020
4096
  ],
4021
4097
  "failures": [],
4022
4098
  "pending": [],
@@ -4027,7 +4103,7 @@
4027
4103
  "_timeout": 2000
4028
4104
  },
4029
4105
  {
4030
- "uuid": "d009dbf5-f66e-4f6c-95c1-4fed422a64cd",
4106
+ "uuid": "f40140c4-85af-433d-a337-fbae56035def",
4031
4107
  "title": "getParameters()",
4032
4108
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
4033
4109
  "file": "/test/tools.ts",
@@ -4045,10 +4121,10 @@
4045
4121
  "fail": false,
4046
4122
  "pending": false,
4047
4123
  "context": null,
4048
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield tools_1.getParamters();\n assert_1.default.deepEqual(result, []);\n});",
4124
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)();\n assert_1.default.deepEqual(result, []);\n});",
4049
4125
  "err": {},
4050
- "uuid": "c88d4781-c337-46ac-a0bf-bde37d49fd4a",
4051
- "parentUUID": "d009dbf5-f66e-4f6c-95c1-4fed422a64cd",
4126
+ "uuid": "6d230c05-3103-420c-8082-5a88c9adf290",
4127
+ "parentUUID": "f40140c4-85af-433d-a337-fbae56035def",
4052
4128
  "isHook": false,
4053
4129
  "skipped": false
4054
4130
  },
@@ -4056,17 +4132,17 @@
4056
4132
  "title": "easy case",
4057
4133
  "fullTitle": "Tools getParameters() easy case",
4058
4134
  "timedOut": false,
4059
- "duration": 1,
4135
+ "duration": 0,
4060
4136
  "state": "passed",
4061
4137
  "speed": "fast",
4062
4138
  "pass": true,
4063
4139
  "fail": false,
4064
4140
  "pending": false,
4065
4141
  "context": null,
4066
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield tools_1.getParamters({\n host: '192.168.178.2'\n });\n assert_1.default.deepEqual(result, ['-s', '192.168.178.2']);\n});",
4142
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)({\n host: '192.168.178.2'\n });\n assert_1.default.deepEqual(result, ['-s', '192.168.178.2']);\n});",
4067
4143
  "err": {},
4068
- "uuid": "bae8a650-adf2-404e-82fd-6ebb753fbb5a",
4069
- "parentUUID": "d009dbf5-f66e-4f6c-95c1-4fed422a64cd",
4144
+ "uuid": "c53cf609-1bd4-4a28-b410-8fb6bfb42723",
4145
+ "parentUUID": "f40140c4-85af-433d-a337-fbae56035def",
4070
4146
  "isHook": false,
4071
4147
  "skipped": false
4072
4148
  },
@@ -4074,26 +4150,26 @@
4074
4150
  "title": "full case",
4075
4151
  "fullTitle": "Tools getParameters() full case",
4076
4152
  "timedOut": false,
4077
- "duration": 0,
4153
+ "duration": 1,
4078
4154
  "state": "passed",
4079
4155
  "speed": "fast",
4080
4156
  "pass": true,
4081
4157
  "fail": false,
4082
4158
  "pending": false,
4083
4159
  "context": null,
4084
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield tools_1.getParamters({\n hosts: ['192.168.178.2', '192.168.178.3'],\n id: '****',\n protocol: types_1.NodePyATVProtocol.mrp,\n dmapCredentials: '****',\n mrpCredentials: '****',\n airplayCredentials: '****'\n });\n assert_1.default.deepEqual(result, [\n '-s', '192.168.178.2,192.168.178.3',\n '-i', '****',\n '--protocol', 'mrp',\n '--dmap-credentials', '****',\n '--mrp-credentials', '****',\n '--airplay-credentials', '****'\n ]);\n});",
4160
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)({\n hosts: ['192.168.178.2', '192.168.178.3'],\n id: '****',\n protocol: types_1.NodePyATVProtocol.mrp,\n dmapCredentials: '****',\n mrpCredentials: '****',\n airplayCredentials: '****',\n companionCredentials: '1234',\n raopCredentials: '::foo:'\n });\n assert_1.default.deepEqual(result, [\n '-s', '192.168.178.2,192.168.178.3',\n '-i', '****',\n '--protocol', 'mrp',\n '--dmap-credentials', '****',\n '--mrp-credentials', '****',\n '--airplay-credentials', '****',\n '--companion-credentials', '1234',\n '--raop-credentials', '::foo:'\n ]);\n});",
4085
4161
  "err": {},
4086
- "uuid": "4fb43074-d578-4a7b-aff4-04639f243198",
4087
- "parentUUID": "d009dbf5-f66e-4f6c-95c1-4fed422a64cd",
4162
+ "uuid": "5c5d77f9-23f0-44de-b646-e512d91c3cd0",
4163
+ "parentUUID": "f40140c4-85af-433d-a337-fbae56035def",
4088
4164
  "isHook": false,
4089
4165
  "skipped": false
4090
4166
  }
4091
4167
  ],
4092
4168
  "suites": [],
4093
4169
  "passes": [
4094
- "c88d4781-c337-46ac-a0bf-bde37d49fd4a",
4095
- "bae8a650-adf2-404e-82fd-6ebb753fbb5a",
4096
- "4fb43074-d578-4a7b-aff4-04639f243198"
4170
+ "6d230c05-3103-420c-8082-5a88c9adf290",
4171
+ "c53cf609-1bd4-4a28-b410-8fb6bfb42723",
4172
+ "5c5d77f9-23f0-44de-b646-e512d91c3cd0"
4097
4173
  ],
4098
4174
  "failures": [],
4099
4175
  "pending": [],
@@ -4104,7 +4180,7 @@
4104
4180
  "_timeout": 2000
4105
4181
  },
4106
4182
  {
4107
- "uuid": "4a1b8108-803a-42cc-9792-9cb265970d94",
4183
+ "uuid": "2affc948-b5df-482f-add0-777769b7a3da",
4108
4184
  "title": "parseState()",
4109
4185
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
4110
4186
  "file": "/test/tools.ts",
@@ -4122,10 +4198,10 @@
4122
4198
  "fail": false,
4123
4199
  "pending": false,
4124
4200
  "context": null,
4125
- "code": "const input = {};\nconst result = tools_1.parseState(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4201
+ "code": "const input = {};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4126
4202
  "err": {},
4127
- "uuid": "b5cd5f85-ce9f-4025-b37a-22ea402c7de3",
4128
- "parentUUID": "4a1b8108-803a-42cc-9792-9cb265970d94",
4203
+ "uuid": "2ba6af8e-05dd-4a6d-bf4f-e738f22d4ca8",
4204
+ "parentUUID": "2affc948-b5df-482f-add0-777769b7a3da",
4129
4205
  "isHook": false,
4130
4206
  "skipped": false
4131
4207
  },
@@ -4140,10 +4216,10 @@
4140
4216
  "fail": false,
4141
4217
  "pending": false,
4142
4218
  "context": null,
4143
- "code": "// @ts-ignore\nconst result = tools_1.parseState(null, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4219
+ "code": "// @ts-ignore\nconst result = (0, tools_1.parseState)(null, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4144
4220
  "err": {},
4145
- "uuid": "4328bfdd-e179-4ec6-9976-16df50aa1275",
4146
- "parentUUID": "4a1b8108-803a-42cc-9792-9cb265970d94",
4221
+ "uuid": "46b0ba26-e57c-424a-82a8-296f73ce0831",
4222
+ "parentUUID": "2affc948-b5df-482f-add0-777769b7a3da",
4147
4223
  "isHook": false,
4148
4224
  "skipped": false
4149
4225
  },
@@ -4151,6 +4227,24 @@
4151
4227
  "title": "should work with example data",
4152
4228
  "fullTitle": "Tools parseState() should work with example data",
4153
4229
  "timedOut": false,
4230
+ "duration": 0,
4231
+ "state": "passed",
4232
+ "speed": "fast",
4233
+ "pass": true,
4234
+ "fail": false,
4235
+ "pending": false,
4236
+ "context": null,
4237
+ "code": "const input = {\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus',\n powerState: null\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: types_1.NodePyATVMediaType.video,\n deviceState: types_1.NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: types_1.NodePyATVShuffleState.off,\n repeat: types_1.NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n});",
4238
+ "err": {},
4239
+ "uuid": "4296d5ff-0c16-4e76-a286-cefffcc9e6bc",
4240
+ "parentUUID": "2affc948-b5df-482f-add0-777769b7a3da",
4241
+ "isHook": false,
4242
+ "skipped": false
4243
+ },
4244
+ {
4245
+ "title": "should throw an error for pyatv exceptions",
4246
+ "fullTitle": "Tools parseState() should throw an error for pyatv exceptions",
4247
+ "timedOut": false,
4154
4248
  "duration": 1,
4155
4249
  "state": "passed",
4156
4250
  "speed": "fast",
@@ -4158,10 +4252,10 @@
4158
4252
  "fail": false,
4159
4253
  "pending": false,
4160
4254
  "context": null,
4161
- "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 = tools_1.parseState(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: types_1.NodePyATVMediaType.video,\n deviceState: types_1.NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: types_1.NodePyATVShuffleState.off,\n repeat: types_1.NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n});",
4255
+ "code": "const input = {\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n};\nassert_1.default.throws(() => {\n (0, tools_1.parseState)(input, '', {});\n}, /Got pyatv Error: invalid credentials: 321/);",
4162
4256
  "err": {},
4163
- "uuid": "326dfd43-c6c8-4d4d-8ca6-3bf37da500ac",
4164
- "parentUUID": "4a1b8108-803a-42cc-9792-9cb265970d94",
4257
+ "uuid": "f236d019-c7d7-4978-a59a-101303e587a8",
4258
+ "parentUUID": "2affc948-b5df-482f-add0-777769b7a3da",
4165
4259
  "isHook": false,
4166
4260
  "skipped": false
4167
4261
  },
@@ -4176,10 +4270,10 @@
4176
4270
  "fail": false,
4177
4271
  "pending": false,
4178
4272
  "context": null,
4179
- "code": "const input = { datetime: 'today' };\nconst result = tools_1.parseState(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4273
+ "code": "const input = { datetime: 'today' };\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4180
4274
  "err": {},
4181
- "uuid": "bc331938-a6c4-440a-b051-5706f7b96dbc",
4182
- "parentUUID": "4a1b8108-803a-42cc-9792-9cb265970d94",
4275
+ "uuid": "8401303d-14a9-4272-a6b4-f1eac57bd09b",
4276
+ "parentUUID": "2affc948-b5df-482f-add0-777769b7a3da",
4183
4277
  "isHook": false,
4184
4278
  "skipped": false
4185
4279
  },
@@ -4187,17 +4281,17 @@
4187
4281
  "title": "should ignore data if unsupported type",
4188
4282
  "fullTitle": "Tools parseState() should ignore data if unsupported type",
4189
4283
  "timedOut": false,
4190
- "duration": 1,
4284
+ "duration": 0,
4191
4285
  "state": "passed",
4192
4286
  "speed": "fast",
4193
4287
  "pass": true,
4194
4288
  "fail": false,
4195
4289
  "pending": false,
4196
4290
  "context": null,
4197
- "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 = tools_1.parseState(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4291
+ "code": "const input = {\n result: 'success',\n datetime: true,\n hash: 1337,\n media_type: false,\n device_state: 43,\n title: undefined,\n artist: 90,\n album: Infinity,\n genre: Math.PI,\n total_time: '23min',\n position: '0:30.123',\n shuffle: false,\n repeat: true,\n app: 0,\n app_id: 891645381647289,\n powerState: null\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4198
4292
  "err": {},
4199
- "uuid": "d28f3af0-370e-4c44-9b5b-5d784ec1dfc3",
4200
- "parentUUID": "4a1b8108-803a-42cc-9792-9cb265970d94",
4293
+ "uuid": "d13ca763-292d-4624-9e28-4628b7bb2925",
4294
+ "parentUUID": "2affc948-b5df-482f-add0-777769b7a3da",
4201
4295
  "isHook": false,
4202
4296
  "skipped": false
4203
4297
  },
@@ -4205,29 +4299,30 @@
4205
4299
  "title": "should ignore enums with unsupported valid",
4206
4300
  "fullTitle": "Tools parseState() should ignore enums with unsupported valid",
4207
4301
  "timedOut": false,
4208
- "duration": 0,
4302
+ "duration": 1,
4209
4303
  "state": "passed",
4210
4304
  "speed": "fast",
4211
4305
  "pass": true,
4212
4306
  "fail": false,
4213
4307
  "pending": false,
4214
4308
  "context": null,
4215
- "code": "const input = {\n media_type: '3d-experience',\n device_state: 'initiating',\n shuffle: 'everything',\n repeat: 'nothing'\n};\nconst result = tools_1.parseState(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4309
+ "code": "const input = {\n media_type: '3d-experience',\n device_state: 'initiating',\n shuffle: 'everything',\n repeat: 'nothing'\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4216
4310
  "err": {},
4217
- "uuid": "4f55819e-1382-496d-b110-80e052ea9013",
4218
- "parentUUID": "4a1b8108-803a-42cc-9792-9cb265970d94",
4311
+ "uuid": "7c264d89-e2be-452c-b9df-7b7d87664001",
4312
+ "parentUUID": "2affc948-b5df-482f-add0-777769b7a3da",
4219
4313
  "isHook": false,
4220
4314
  "skipped": false
4221
4315
  }
4222
4316
  ],
4223
4317
  "suites": [],
4224
4318
  "passes": [
4225
- "b5cd5f85-ce9f-4025-b37a-22ea402c7de3",
4226
- "4328bfdd-e179-4ec6-9976-16df50aa1275",
4227
- "326dfd43-c6c8-4d4d-8ca6-3bf37da500ac",
4228
- "bc331938-a6c4-440a-b051-5706f7b96dbc",
4229
- "d28f3af0-370e-4c44-9b5b-5d784ec1dfc3",
4230
- "4f55819e-1382-496d-b110-80e052ea9013"
4319
+ "2ba6af8e-05dd-4a6d-bf4f-e738f22d4ca8",
4320
+ "46b0ba26-e57c-424a-82a8-296f73ce0831",
4321
+ "4296d5ff-0c16-4e76-a286-cefffcc9e6bc",
4322
+ "f236d019-c7d7-4978-a59a-101303e587a8",
4323
+ "8401303d-14a9-4272-a6b4-f1eac57bd09b",
4324
+ "d13ca763-292d-4624-9e28-4628b7bb2925",
4325
+ "7c264d89-e2be-452c-b9df-7b7d87664001"
4231
4326
  ],
4232
4327
  "failures": [],
4233
4328
  "pending": [],
@@ -4260,7 +4355,7 @@
4260
4355
  ],
4261
4356
  "meta": {
4262
4357
  "mocha": {
4263
- "version": "9.0.3"
4358
+ "version": "9.1.3"
4264
4359
  },
4265
4360
  "mochawesome": {
4266
4361
  "options": {
@@ -4272,11 +4367,11 @@
4272
4367
  "useInlineDiffs": false,
4273
4368
  "code": true
4274
4369
  },
4275
- "version": "6.2.2"
4370
+ "version": "7.0.1"
4276
4371
  },
4277
4372
  "marge": {
4278
4373
  "options": null,
4279
- "version": "5.2.0"
4374
+ "version": "6.0.1"
4280
4375
  }
4281
4376
  }
4282
4377
  }