@sebbo2002/node-pyatv 4.3.4-develop.3 → 5.0.0

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 (89) hide show
  1. package/.mocharc.yml +3 -3
  2. package/.nycrc +1 -0
  3. package/CHANGELOG.md +26 -0
  4. package/dist/bin/check.js +2 -6
  5. package/dist/bin/check.js.map +1 -1
  6. package/dist/examples/push.js +2 -6
  7. package/dist/examples/push.js.map +1 -1
  8. package/dist/lib/device-event.d.ts +2 -2
  9. package/dist/lib/device-event.js +1 -3
  10. package/dist/lib/device-event.js.map +1 -1
  11. package/dist/lib/device-events.d.ts +2 -2
  12. package/dist/lib/device-events.js +38 -40
  13. package/dist/lib/device-events.js.map +1 -1
  14. package/dist/lib/device.d.ts +2 -2
  15. package/dist/lib/device.js +44 -46
  16. package/dist/lib/device.js.map +1 -1
  17. package/dist/lib/fake-spawn.js +7 -14
  18. package/dist/lib/fake-spawn.js.map +1 -1
  19. package/dist/lib/index.d.ts +5 -5
  20. package/dist/lib/index.js +5 -22
  21. package/dist/lib/index.js.map +1 -1
  22. package/dist/lib/instance.d.ts +2 -2
  23. package/dist/lib/instance.js +27 -27
  24. package/dist/lib/instance.js.map +1 -1
  25. package/dist/lib/tools.d.ts +1 -1
  26. package/dist/lib/tools.js +24 -34
  27. package/dist/lib/tools.js.map +1 -1
  28. package/dist/lib/types.js +20 -23
  29. package/dist/lib/types.js.map +1 -1
  30. package/docs/coverage/block-navigation.js +8 -0
  31. package/docs/coverage/cobertura-coverage.xml +2696 -1534
  32. package/docs/coverage/device-event.ts.html +64 -59
  33. package/docs/coverage/device-events.ts.html +210 -205
  34. package/docs/coverage/device.ts.html +739 -734
  35. package/docs/coverage/fake-spawn.ts.html +126 -121
  36. package/docs/coverage/favicon.png +0 -0
  37. package/docs/coverage/index.html +73 -68
  38. package/docs/coverage/index.ts.html +42 -37
  39. package/docs/coverage/instance.ts.html +236 -222
  40. package/docs/coverage/sort-arrow-sprite.png +0 -0
  41. package/docs/coverage/sorter.js +26 -0
  42. package/docs/coverage/tools.ts.html +315 -310
  43. package/docs/coverage/types.ts.html +126 -121
  44. package/docs/reference/assets/highlight.css +7 -21
  45. package/docs/reference/assets/main.js +4 -2
  46. package/docs/reference/assets/search.js +1 -1
  47. package/docs/reference/assets/style.css +424 -538
  48. package/docs/reference/classes/NodePyATVDevice.html +1059 -125
  49. package/docs/reference/classes/NodePyATVDeviceEvent.html +111 -10
  50. package/docs/reference/classes/default.html +211 -34
  51. package/docs/reference/enums/NodePyATVDeviceState.html +93 -1
  52. package/docs/reference/enums/NodePyATVKeys.html +212 -1
  53. package/docs/reference/enums/NodePyATVListenerState.html +79 -1
  54. package/docs/reference/enums/NodePyATVMediaType.html +79 -1
  55. package/docs/reference/enums/NodePyATVPowerState.html +65 -1
  56. package/docs/reference/enums/NodePyATVProtocol.html +79 -1
  57. package/docs/reference/enums/NodePyATVRepeatState.html +72 -1
  58. package/docs/reference/enums/NodePyATVShuffleState.html +72 -1
  59. package/docs/reference/index.html +58 -53
  60. package/docs/reference/interfaces/NodePyATVDeviceOptions.html +194 -1
  61. package/docs/reference/interfaces/NodePyATVFindAndInstanceOptions.html +190 -1
  62. package/docs/reference/interfaces/NodePyATVFindOptions.html +120 -1
  63. package/docs/reference/interfaces/NodePyATVGetStateOptions.html +62 -1
  64. package/docs/reference/interfaces/NodePyATVInstanceOptions.html +110 -1
  65. package/docs/reference/interfaces/NodePyATVState.html +160 -1
  66. package/docs/reference/interfaces/NodePyATVVersionResponse.html +69 -1
  67. package/docs/reference/modules.html +89 -1
  68. package/docs/reference/types/NodePyATVEventValueType.html +61 -0
  69. package/docs/tests/index.html +1 -1
  70. package/docs/tests/mochawesome.json +745 -783
  71. package/package.json +19 -16
  72. package/release.config.cjs +56 -0
  73. package/src/bin/check.ts +1 -1
  74. package/src/examples/push.ts +1 -1
  75. package/src/lib/device-event.ts +2 -2
  76. package/src/lib/device-events.ts +4 -4
  77. package/src/lib/device.ts +3 -3
  78. package/src/lib/index.ts +5 -5
  79. package/src/lib/instance.ts +23 -20
  80. package/src/lib/tools.ts +1 -1
  81. package/test/device-event.ts +2 -2
  82. package/test/device-events.ts +2 -2
  83. package/test/device.ts +4 -4
  84. package/test/instance.ts +44 -37
  85. package/test/tools.ts +2 -2
  86. package/tsconfig.json +1 -1
  87. package/docs/reference/assets/icons.css +0 -1043
  88. package/docs/reference/assets/icons.png +0 -0
  89. package/docs/reference/assets/icons@2x.png +0 -0
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "stats": {
3
3
  "suites": 84,
4
- "tests": 143,
5
- "passes": 141,
4
+ "tests": 141,
5
+ "passes": 139,
6
6
  "pending": 2,
7
7
  "failures": 0,
8
- "start": "2022-06-09T16:31:31.193Z",
9
- "end": "2022-06-09T16:31:43.294Z",
10
- "duration": 12101,
11
- "testsRegistered": 143,
8
+ "start": "2022-07-25T14:26:48.428Z",
9
+ "end": "2022-07-25T14:27:00.774Z",
10
+ "duration": 12346,
11
+ "testsRegistered": 141,
12
12
  "passPercent": 100,
13
- "pendingPercent": 1.3986013986013985,
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": "e6f3b4d9-7215-4dec-95de-8498e285244a",
21
+ "uuid": "dd29e13f-3f6a-4152-a52e-d9b0b449e6de",
22
22
  "title": "",
23
23
  "fullFile": "",
24
24
  "file": "",
@@ -27,7 +27,7 @@
27
27
  "tests": [],
28
28
  "suites": [
29
29
  {
30
- "uuid": "72c1224f-e750-4653-adba-aa7a06e0b9e9",
30
+ "uuid": "ddb1dbc1-a4c2-4551-ae80-775f12f27667",
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": "0fc60f5f-f806-4902-abb6-dda300cc439b",
39
+ "uuid": "eae7c083-8eaa-4cdb-b168-da65dc0be4cb",
40
40
  "title": "get key()",
41
41
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts",
42
42
  "file": "/test/device-event.ts",
@@ -54,17 +54,17 @@
54
54
  "fail": false,
55
55
  "pending": false,
56
56
  "context": null,
57
- "code": "const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.key, 'genre');",
57
+ "code": "const event = new NodePyATVDeviceEvent({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new NodePyATVDevice({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert.strictEqual(event.key, 'genre');",
58
58
  "err": {},
59
- "uuid": "6792a63a-d910-49d8-8ff8-e9e65d87b294",
60
- "parentUUID": "0fc60f5f-f806-4902-abb6-dda300cc439b",
59
+ "uuid": "db24a900-9785-4d78-8f8f-4dd96ed0a95e",
60
+ "parentUUID": "eae7c083-8eaa-4cdb-b168-da65dc0be4cb",
61
61
  "isHook": false,
62
62
  "skipped": false
63
63
  }
64
64
  ],
65
65
  "suites": [],
66
66
  "passes": [
67
- "6792a63a-d910-49d8-8ff8-e9e65d87b294"
67
+ "db24a900-9785-4d78-8f8f-4dd96ed0a95e"
68
68
  ],
69
69
  "failures": [],
70
70
  "pending": [],
@@ -75,7 +75,7 @@
75
75
  "_timeout": 2000
76
76
  },
77
77
  {
78
- "uuid": "7499a17e-6157-487d-8290-b84a93df365b",
78
+ "uuid": "7b8deb5f-c31d-4e24-9f75-d09165a9929a",
79
79
  "title": "get oldValue()",
80
80
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts",
81
81
  "file": "/test/device-event.ts",
@@ -93,17 +93,17 @@
93
93
  "fail": false,
94
94
  "pending": false,
95
95
  "context": null,
96
- "code": "const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.oldValue, 'Jazz');",
96
+ "code": "const event = new NodePyATVDeviceEvent({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new NodePyATVDevice({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert.strictEqual(event.oldValue, 'Jazz');",
97
97
  "err": {},
98
- "uuid": "cba7808e-2d2e-4d39-b511-960d680a7525",
99
- "parentUUID": "7499a17e-6157-487d-8290-b84a93df365b",
98
+ "uuid": "929ab47e-8f17-4e6f-9814-30e7da9c41c9",
99
+ "parentUUID": "7b8deb5f-c31d-4e24-9f75-d09165a9929a",
100
100
  "isHook": false,
101
101
  "skipped": false
102
102
  }
103
103
  ],
104
104
  "suites": [],
105
105
  "passes": [
106
- "cba7808e-2d2e-4d39-b511-960d680a7525"
106
+ "929ab47e-8f17-4e6f-9814-30e7da9c41c9"
107
107
  ],
108
108
  "failures": [],
109
109
  "pending": [],
@@ -114,7 +114,7 @@
114
114
  "_timeout": 2000
115
115
  },
116
116
  {
117
- "uuid": "5efa1633-b518-41f6-b13f-00763e9f659e",
117
+ "uuid": "c01ec9d7-d602-4798-b2b2-fa4dcda40052",
118
118
  "title": "get newValue()",
119
119
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts",
120
120
  "file": "/test/device-event.ts",
@@ -132,17 +132,17 @@
132
132
  "fail": false,
133
133
  "pending": false,
134
134
  "context": null,
135
- "code": "const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.newValue, 'Rock');",
135
+ "code": "const event = new NodePyATVDeviceEvent({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new NodePyATVDevice({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert.strictEqual(event.newValue, 'Rock');",
136
136
  "err": {},
137
- "uuid": "9d1d1c20-6ff5-4de5-9695-a4eb7f764a1b",
138
- "parentUUID": "5efa1633-b518-41f6-b13f-00763e9f659e",
137
+ "uuid": "b3a43186-5800-4d23-8c1e-f871a7058dbd",
138
+ "parentUUID": "c01ec9d7-d602-4798-b2b2-fa4dcda40052",
139
139
  "isHook": false,
140
140
  "skipped": false
141
141
  }
142
142
  ],
143
143
  "suites": [],
144
144
  "passes": [
145
- "9d1d1c20-6ff5-4de5-9695-a4eb7f764a1b"
145
+ "b3a43186-5800-4d23-8c1e-f871a7058dbd"
146
146
  ],
147
147
  "failures": [],
148
148
  "pending": [],
@@ -153,7 +153,7 @@
153
153
  "_timeout": 2000
154
154
  },
155
155
  {
156
- "uuid": "552e3f87-0f05-4f86-883d-6a3612b8e563",
156
+ "uuid": "8dc58f07-02f9-4433-93cb-03df77374168",
157
157
  "title": "get value()",
158
158
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts",
159
159
  "file": "/test/device-event.ts",
@@ -164,35 +164,35 @@
164
164
  "title": "should work",
165
165
  "fullTitle": "NodePyATVDeviceEvent get value() should work",
166
166
  "timedOut": false,
167
- "duration": 0,
167
+ "duration": 1,
168
168
  "state": "passed",
169
169
  "speed": "fast",
170
170
  "pass": true,
171
171
  "fail": false,
172
172
  "pending": false,
173
173
  "context": null,
174
- "code": "const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.value, 'Rock');",
174
+ "code": "const event = new NodePyATVDeviceEvent({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new NodePyATVDevice({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert.strictEqual(event.value, 'Rock');",
175
175
  "err": {},
176
- "uuid": "e3728e59-736d-49c5-aa33-9b960fcb06e6",
177
- "parentUUID": "552e3f87-0f05-4f86-883d-6a3612b8e563",
176
+ "uuid": "d11f51e3-7b19-4170-82a3-fe08d00939bf",
177
+ "parentUUID": "8dc58f07-02f9-4433-93cb-03df77374168",
178
178
  "isHook": false,
179
179
  "skipped": false
180
180
  }
181
181
  ],
182
182
  "suites": [],
183
183
  "passes": [
184
- "e3728e59-736d-49c5-aa33-9b960fcb06e6"
184
+ "d11f51e3-7b19-4170-82a3-fe08d00939bf"
185
185
  ],
186
186
  "failures": [],
187
187
  "pending": [],
188
188
  "skipped": [],
189
- "duration": 0,
189
+ "duration": 1,
190
190
  "root": false,
191
191
  "rootEmpty": false,
192
192
  "_timeout": 2000
193
193
  },
194
194
  {
195
- "uuid": "918f61d3-a266-4972-89fd-8de1b30a99d6",
195
+ "uuid": "17688df5-320d-4c0d-a032-c5e6708cfae4",
196
196
  "title": "get device()",
197
197
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts",
198
198
  "file": "/test/device-event.ts",
@@ -203,29 +203,29 @@
203
203
  "title": "should work",
204
204
  "fullTitle": "NodePyATVDeviceEvent get device() should work",
205
205
  "timedOut": false,
206
- "duration": 1,
206
+ "duration": 0,
207
207
  "state": "passed",
208
208
  "speed": "fast",
209
209
  "pass": true,
210
210
  "fail": false,
211
211
  "pending": false,
212
212
  "context": null,
213
- "code": "const device = new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n});\nconst event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device\n});\nassert_1.default.deepEqual(event.device, device);",
213
+ "code": "const device = new NodePyATVDevice({\n host: '192.168.178.2',\n name: 'My Testinstance'\n});\nconst event = new NodePyATVDeviceEvent({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device\n});\nassert.deepEqual(event.device, device);",
214
214
  "err": {},
215
- "uuid": "7c9018a6-2879-40e6-a6af-0548d26dd15a",
216
- "parentUUID": "918f61d3-a266-4972-89fd-8de1b30a99d6",
215
+ "uuid": "fdc3367a-2677-490b-9801-e0a0a9214303",
216
+ "parentUUID": "17688df5-320d-4c0d-a032-c5e6708cfae4",
217
217
  "isHook": false,
218
218
  "skipped": false
219
219
  }
220
220
  ],
221
221
  "suites": [],
222
222
  "passes": [
223
- "7c9018a6-2879-40e6-a6af-0548d26dd15a"
223
+ "fdc3367a-2677-490b-9801-e0a0a9214303"
224
224
  ],
225
225
  "failures": [],
226
226
  "pending": [],
227
227
  "skipped": [],
228
- "duration": 1,
228
+ "duration": 0,
229
229
  "root": false,
230
230
  "rootEmpty": false,
231
231
  "_timeout": 2000
@@ -241,7 +241,7 @@
241
241
  "_timeout": 2000
242
242
  },
243
243
  {
244
- "uuid": "4941b98a-99cd-4f87-bfac-a227ac563785",
244
+ "uuid": "40694d53-6eab-4ad5-a07e-73d948393792",
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": "4d72636a-ab79-4915-8c97-d377285cf0fa",
253
+ "uuid": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
254
254
  "title": "applyStateAndEmitEvents()",
255
255
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
256
256
  "file": "/test/device-events.ts",
@@ -261,17 +261,17 @@
261
261
  "title": "should emit update:key event",
262
262
  "fullTitle": "NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update:key event",
263
263
  "timedOut": false,
264
- "duration": 4,
264
+ "duration": 5,
265
265
  "state": "passed",
266
266
  "speed": "fast",
267
267
  "pass": true,
268
268
  "fail": false,
269
269
  "pending": false,
270
270
  "context": null,
271
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:title', event => {\n assert_1.default.ok(event instanceof lib_1.NodePyATVDeviceEvent);\n assert_1.default.strictEqual(event.key, 'title');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'My Movie');\n assert_1.default.strictEqual(event.value, 'My Movie');\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
271
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:title', event => {\n assert.ok(event instanceof NodePyATVDeviceEvent);\n assert.strictEqual(event.key, 'title');\n assert.strictEqual(event.oldValue, null);\n assert.strictEqual(event.newValue, 'My Movie');\n assert.strictEqual(event.value, 'My Movie');\n assert.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
272
272
  "err": {},
273
- "uuid": "6cedef4b-7b4f-4820-bb0b-b3c092b9af7e",
274
- "parentUUID": "4d72636a-ab79-4915-8c97-d377285cf0fa",
273
+ "uuid": "30c96378-c5d4-4bad-a992-826b3c3df5cd",
274
+ "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
275
275
  "isHook": false,
276
276
  "skipped": false
277
277
  },
@@ -279,17 +279,17 @@
279
279
  "title": "should emit update event",
280
280
  "fullTitle": "NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update event",
281
281
  "timedOut": false,
282
- "duration": 2,
282
+ "duration": 3,
283
283
  "state": "passed",
284
284
  "speed": "fast",
285
285
  "pass": true,
286
286
  "fail": false,
287
287
  "pending": false,
288
288
  "context": null,
289
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update', event => {\n assert_1.default.ok(event instanceof lib_1.NodePyATVDeviceEvent);\n assert_1.default.strictEqual(event.key, 'title');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'My Movie');\n assert_1.default.strictEqual(event.value, 'My Movie');\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
289
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update', event => {\n assert.ok(event instanceof NodePyATVDeviceEvent);\n assert.strictEqual(event.key, 'title');\n assert.strictEqual(event.oldValue, null);\n assert.strictEqual(event.newValue, 'My Movie');\n assert.strictEqual(event.value, 'My Movie');\n assert.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
290
290
  "err": {},
291
- "uuid": "76edc7e4-6203-4924-84e8-166abf9b5d59",
292
- "parentUUID": "4d72636a-ab79-4915-8c97-d377285cf0fa",
291
+ "uuid": "caac5b8e-e1ce-49b3-97c0-55d3408ce1a8",
292
+ "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
293
293
  "isHook": false,
294
294
  "skipped": false
295
295
  },
@@ -304,10 +304,10 @@
304
304
  "fail": false,
305
305
  "pending": false,
306
306
  "context": null,
307
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const sort = [];\n yield Promise.race([\n new Promise(cb => {\n device.once('update', () => {\n sort.push('update');\n cb(undefined);\n });\n }),\n new Promise(cb => {\n device.once('update:title', () => {\n sort.push('update:title');\n cb(undefined);\n });\n })\n ]);\n assert_1.default.deepStrictEqual(sort, ['update:title', 'update']);\n});",
307
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const sort = [];\n yield Promise.race([\n new Promise(cb => {\n device.once('update', () => {\n sort.push('update');\n cb(undefined);\n });\n }),\n new Promise(cb => {\n device.once('update:title', () => {\n sort.push('update:title');\n cb(undefined);\n });\n })\n ]);\n assert.deepStrictEqual(sort, ['update:title', 'update']);\n});",
308
308
  "err": {},
309
- "uuid": "af7e9ee1-1721-4f6f-b1bd-e976e6f1f983",
310
- "parentUUID": "4d72636a-ab79-4915-8c97-d377285cf0fa",
309
+ "uuid": "8e688c0a-28f9-4d65-9d54-99632dc5f2d1",
310
+ "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
311
311
  "isHook": false,
312
312
  "skipped": false
313
313
  },
@@ -322,10 +322,10 @@
322
322
  "fail": false,
323
323
  "pending": false,
324
324
  "context": null,
325
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n });\n })\n });\n yield new Promise(cb => {\n device.once('error', error => {\n assert_1.default.ok(error instanceof Error);\n assert_1.default.ok(error.toString().includes('invalid credentials: 321'));\n cb(undefined);\n });\n });\n});",
325
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n });\n })\n });\n yield new Promise(cb => {\n device.once('error', error => {\n assert.ok(error instanceof Error);\n assert.ok(error.toString().includes('invalid credentials: 321'));\n cb(undefined);\n });\n });\n});",
326
326
  "err": {},
327
- "uuid": "7e128190-9025-4aef-a832-128e2c002167",
328
- "parentUUID": "4d72636a-ab79-4915-8c97-d377285cf0fa",
327
+ "uuid": "06fb2f51-5c28-464a-88e5-771e0bf521b7",
328
+ "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
329
329
  "isHook": false,
330
330
  "skipped": false
331
331
  },
@@ -333,17 +333,17 @@
333
333
  "title": "should not emit an update if new value is same as old one",
334
334
  "fullTitle": "NodePyATVDeviceEvents applyStateAndEmitEvents() should not emit an update if new value is same as old one",
335
335
  "timedOut": false,
336
- "duration": 3,
336
+ "duration": 4,
337
337
  "state": "passed",
338
338
  "speed": "fast",
339
339
  "pass": true,
340
340
  "fail": false,
341
341
  "pending": false,
342
342
  "context": null,
343
- "code": "return __awaiter(this, void 0, void 0, function* () {\n let spawnCounter = 0;\n let eventCounter = 0;\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n if (spawnCounter === 0) {\n cp.onStdIn(() => cp.end());\n }\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n spawnCounter++;\n if (spawnCounter >= 2) {\n cp.end();\n }\n })\n });\n const listener = () => {\n eventCounter++;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n yield device.getState();\n device.off('update', listener);\n assert_1.default.strictEqual(spawnCounter, 2);\n assert_1.default.strictEqual(eventCounter, 1);\n});",
343
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n let spawnCounter = 0;\n let eventCounter = 0;\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n if (spawnCounter === 0) {\n cp.onStdIn(() => cp.end());\n }\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n spawnCounter++;\n if (spawnCounter >= 2) {\n cp.end();\n }\n })\n });\n const listener = () => {\n eventCounter++;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n yield device.getState();\n device.off('update', listener);\n assert.strictEqual(spawnCounter, 2);\n assert.strictEqual(eventCounter, 1);\n});",
344
344
  "err": {},
345
- "uuid": "575441a6-bb3e-47d2-a081-aefd7e98bde5",
346
- "parentUUID": "4d72636a-ab79-4915-8c97-d377285cf0fa",
345
+ "uuid": "632be728-816f-4406-a297-9d6eb0e8098b",
346
+ "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
347
347
  "isHook": false,
348
348
  "skipped": false
349
349
  },
@@ -351,17 +351,17 @@
351
351
  "title": "should emit error event if event listener throws an exception",
352
352
  "fullTitle": "NodePyATVDeviceEvents applyStateAndEmitEvents() should emit error event if event listener throws an exception",
353
353
  "timedOut": false,
354
- "duration": 1,
354
+ "duration": 2,
355
355
  "state": "passed",
356
356
  "speed": "fast",
357
357
  "pass": true,
358
358
  "fail": false,
359
359
  "pending": false,
360
360
  "context": null,
361
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n let callCounter = 0;\n const error = new Error('This is an error. Be nice.');\n device.once('error', err => {\n assert_1.default.strictEqual(err, error);\n callCounter++;\n });\n const listener = () => {\n throw error;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n device.off('update', listener);\n assert_1.default.strictEqual(callCounter, 1);\n});",
361
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n let callCounter = 0;\n const error = new Error('This is an error. Be nice.');\n device.once('error', err => {\n assert.strictEqual(err, error);\n callCounter++;\n });\n const listener = () => {\n throw error;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n device.off('update', listener);\n assert.strictEqual(callCounter, 1);\n});",
362
362
  "err": {},
363
- "uuid": "c0bc635c-5e19-4fee-b141-a18ff62a3fec",
364
- "parentUUID": "4d72636a-ab79-4915-8c97-d377285cf0fa",
363
+ "uuid": "87437cb3-6e62-4008-8028-aa74d14e0c7b",
364
+ "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
365
365
  "isHook": false,
366
366
  "skipped": false
367
367
  },
@@ -376,34 +376,34 @@
376
376
  "fail": false,
377
377
  "pending": false,
378
378
  "context": null,
379
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n datetime: new Date().toJSON(),\n power_state: 'off'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:powerState', event => {\n assert_1.default.ok(event instanceof lib_1.NodePyATVDeviceEvent);\n assert_1.default.strictEqual(event.key, 'powerState');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'off');\n assert_1.default.strictEqual(event.newValue, lib_1.NodePyATVPowerState.off);\n assert_1.default.strictEqual(event.value, 'off');\n assert_1.default.strictEqual(event.value, lib_1.NodePyATVPowerState.off);\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
379
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n datetime: new Date().toJSON(),\n power_state: 'off'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:powerState', event => {\n assert.ok(event instanceof NodePyATVDeviceEvent);\n assert.strictEqual(event.key, 'powerState');\n assert.strictEqual(event.oldValue, null);\n assert.strictEqual(event.newValue, 'off');\n assert.strictEqual(event.newValue, NodePyATVPowerState.off);\n assert.strictEqual(event.value, 'off');\n assert.strictEqual(event.value, NodePyATVPowerState.off);\n assert.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});",
380
380
  "err": {},
381
- "uuid": "3febe3af-8c7c-475f-a2b7-47c6d227c837",
382
- "parentUUID": "4d72636a-ab79-4915-8c97-d377285cf0fa",
381
+ "uuid": "a9519411-6ba8-426f-accd-c8dd9bd832ac",
382
+ "parentUUID": "7158b1ca-daa9-47c6-85c7-d799f3c80df0",
383
383
  "isHook": false,
384
384
  "skipped": false
385
385
  }
386
386
  ],
387
387
  "suites": [],
388
388
  "passes": [
389
- "6cedef4b-7b4f-4820-bb0b-b3c092b9af7e",
390
- "76edc7e4-6203-4924-84e8-166abf9b5d59",
391
- "af7e9ee1-1721-4f6f-b1bd-e976e6f1f983",
392
- "7e128190-9025-4aef-a832-128e2c002167",
393
- "575441a6-bb3e-47d2-a081-aefd7e98bde5",
394
- "c0bc635c-5e19-4fee-b141-a18ff62a3fec",
395
- "3febe3af-8c7c-475f-a2b7-47c6d227c837"
389
+ "30c96378-c5d4-4bad-a992-826b3c3df5cd",
390
+ "caac5b8e-e1ce-49b3-97c0-55d3408ce1a8",
391
+ "8e688c0a-28f9-4d65-9d54-99632dc5f2d1",
392
+ "06fb2f51-5c28-464a-88e5-771e0bf521b7",
393
+ "632be728-816f-4406-a297-9d6eb0e8098b",
394
+ "87437cb3-6e62-4008-8028-aa74d14e0c7b",
395
+ "a9519411-6ba8-426f-accd-c8dd9bd832ac"
396
396
  ],
397
397
  "failures": [],
398
398
  "pending": [],
399
399
  "skipped": [],
400
- "duration": 16,
400
+ "duration": 20,
401
401
  "root": false,
402
402
  "rootEmpty": false,
403
403
  "_timeout": 2000
404
404
  },
405
405
  {
406
- "uuid": "9e4c4241-4e55-4e0c-931d-727f190c0048",
406
+ "uuid": "60e89aad-0caf-4c48-bd53-897a92ead49c",
407
407
  "title": "start|stopListening()",
408
408
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
409
409
  "file": "/test/device-events.ts",
@@ -414,17 +414,17 @@
414
414
  "title": "should emit error if spawn fails",
415
415
  "fullTitle": "NodePyATVDeviceEvents start|stopListening() should emit error if spawn fails",
416
416
  "timedOut": false,
417
- "duration": 2,
417
+ "duration": 1,
418
418
  "state": "passed",
419
419
  "speed": "fast",
420
420
  "pass": true,
421
421
  "fail": false,
422
422
  "pending": false,
423
423
  "context": null,
424
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const error = new Error();\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(error).end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.strictEqual(err, error);\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
424
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const error = new Error();\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.error(error).end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert.strictEqual(err, error);\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
425
425
  "err": {},
426
- "uuid": "3811cc6b-74fc-4275-8616-f80d7e24851f",
427
- "parentUUID": "9e4c4241-4e55-4e0c-931d-727f190c0048",
426
+ "uuid": "3b10bf7a-b00f-4940-8d39-2b895816883e",
427
+ "parentUUID": "60e89aad-0caf-4c48-bd53-897a92ead49c",
428
428
  "isHook": false,
429
429
  "skipped": false
430
430
  },
@@ -432,17 +432,17 @@
432
432
  "title": "should emit error on stderr data",
433
433
  "fullTitle": "NodePyATVDeviceEvents start|stopListening() should emit error on stderr data",
434
434
  "timedOut": false,
435
- "duration": 2,
435
+ "duration": 1,
436
436
  "state": "passed",
437
437
  "speed": "fast",
438
438
  "pass": true,
439
439
  "fail": false,
440
440
  "pending": false,
441
441
  "context": null,
442
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stderr('Hello World!').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.ok(err instanceof Error);\n assert_1.default.ok(err.toString().includes('Got stderr output from pyatv: Hello World!'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
442
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.stderr('Hello World!').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert.ok(err instanceof Error);\n assert.ok(err.toString().includes('Got stderr output from pyatv: Hello World!'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
443
443
  "err": {},
444
- "uuid": "5fa741b1-0ddc-4f25-9070-a756d013bca5",
445
- "parentUUID": "9e4c4241-4e55-4e0c-931d-727f190c0048",
444
+ "uuid": "d0dbc2c2-b7eb-4000-82ef-85c539b67a00",
445
+ "parentUUID": "60e89aad-0caf-4c48-bd53-897a92ead49c",
446
446
  "isHook": false,
447
447
  "skipped": false
448
448
  },
@@ -457,10 +457,10 @@
457
457
  "fail": false,
458
458
  "pending": false,
459
459
  "context": null,
460
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('#').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.ok(err instanceof Error);\n assert_1.default.ok(err.toString().includes('Unable to parse stdout json: SyntaxError: ' +\n 'Unexpected token # in JSON at position 0'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
460
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.stdout('#').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert.ok(err instanceof Error);\n assert.ok(err.toString().includes('Unable to parse stdout json: SyntaxError: ' +\n 'Unexpected token # in JSON at position 0'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});",
461
461
  "err": {},
462
- "uuid": "5b007050-e5f4-4521-9e39-021ff331a969",
463
- "parentUUID": "9e4c4241-4e55-4e0c-931d-727f190c0048",
462
+ "uuid": "72b38aae-08aa-49ce-9719-831a36328454",
463
+ "parentUUID": "60e89aad-0caf-4c48-bd53-897a92ead49c",
464
464
  "isHook": false,
465
465
  "skipped": false
466
466
  },
@@ -477,30 +477,30 @@
477
477
  "context": null,
478
478
  "code": "",
479
479
  "err": {},
480
- "uuid": "18ac27d9-a942-4c57-ae51-b2e6c8e25010",
481
- "parentUUID": "9e4c4241-4e55-4e0c-931d-727f190c0048",
480
+ "uuid": "fc6c2580-02f9-4c2d-bb46-e55971937987",
481
+ "parentUUID": "60e89aad-0caf-4c48-bd53-897a92ead49c",
482
482
  "isHook": false,
483
483
  "skipped": false
484
484
  }
485
485
  ],
486
486
  "suites": [],
487
487
  "passes": [
488
- "3811cc6b-74fc-4275-8616-f80d7e24851f",
489
- "5fa741b1-0ddc-4f25-9070-a756d013bca5",
490
- "5b007050-e5f4-4521-9e39-021ff331a969"
488
+ "3b10bf7a-b00f-4940-8d39-2b895816883e",
489
+ "d0dbc2c2-b7eb-4000-82ef-85c539b67a00",
490
+ "72b38aae-08aa-49ce-9719-831a36328454"
491
491
  ],
492
492
  "failures": [],
493
493
  "pending": [
494
- "18ac27d9-a942-4c57-ae51-b2e6c8e25010"
494
+ "fc6c2580-02f9-4c2d-bb46-e55971937987"
495
495
  ],
496
496
  "skipped": [],
497
- "duration": 6,
497
+ "duration": 4,
498
498
  "root": false,
499
499
  "rootEmpty": false,
500
500
  "_timeout": 2000
501
501
  },
502
502
  {
503
- "uuid": "fde1a389-c6e2-4aaa-8897-f6b8530319d6",
503
+ "uuid": "ec1f8c41-0382-4807-a2c9-9ecae3938900",
504
504
  "title": "addListener() / removeAllListeners()",
505
505
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
506
506
  "file": "/test/device-events.ts",
@@ -511,35 +511,35 @@
511
511
  "title": "should work without any exceptions",
512
512
  "fullTitle": "NodePyATVDeviceEvents addListener() / removeAllListeners() should work without any exceptions",
513
513
  "timedOut": false,
514
- "duration": 0,
514
+ "duration": 1,
515
515
  "state": "passed",
516
516
  "speed": "fast",
517
517
  "pass": true,
518
518
  "fail": false,
519
519
  "pending": false,
520
520
  "context": null,
521
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n device.removeAllListeners('update');\n});",
521
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n device.removeAllListeners('update');\n});",
522
522
  "err": {},
523
- "uuid": "7cc20d0c-19aa-437a-ab43-35ad2fde50a8",
524
- "parentUUID": "fde1a389-c6e2-4aaa-8897-f6b8530319d6",
523
+ "uuid": "35de0910-574e-4c66-9c0d-69a84984633a",
524
+ "parentUUID": "ec1f8c41-0382-4807-a2c9-9ecae3938900",
525
525
  "isHook": false,
526
526
  "skipped": false
527
527
  }
528
528
  ],
529
529
  "suites": [],
530
530
  "passes": [
531
- "7cc20d0c-19aa-437a-ab43-35ad2fde50a8"
531
+ "35de0910-574e-4c66-9c0d-69a84984633a"
532
532
  ],
533
533
  "failures": [],
534
534
  "pending": [],
535
535
  "skipped": [],
536
- "duration": 0,
536
+ "duration": 1,
537
537
  "root": false,
538
538
  "rootEmpty": false,
539
539
  "_timeout": 2000
540
540
  },
541
541
  {
542
- "uuid": "9a7f64a6-d247-4dbb-b07a-ec10f7d77864",
542
+ "uuid": "a8d9bd4e-5aca-4711-b7ae-0bf67a6e6870",
543
543
  "title": "emit()",
544
544
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
545
545
  "file": "/test/device-events.ts",
@@ -557,17 +557,17 @@
557
557
  "fail": false,
558
558
  "pending": false,
559
559
  "context": null,
560
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst event = new lib_1.NodePyATVDeviceEvent({\n key: 'dateTime',\n old: 'foo',\n new: 'bar',\n device\n});\nlet executions = 0;\ndevice.once('test', (e) => {\n executions++;\n assert_1.default.strictEqual(e, event);\n assert_1.default.strictEqual(executions, 1);\n done();\n});\ndevice.emit('test', event);",
560
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst event = new NodePyATVDeviceEvent({\n key: 'dateTime',\n old: 'foo',\n new: 'bar',\n device\n});\nlet executions = 0;\ndevice.once('test', (e) => {\n executions++;\n assert.strictEqual(e, event);\n assert.strictEqual(executions, 1);\n done();\n});\ndevice.emit('test', event);",
561
561
  "err": {},
562
- "uuid": "467af1e1-a2ed-4bc0-98a4-06442fae866d",
563
- "parentUUID": "9a7f64a6-d247-4dbb-b07a-ec10f7d77864",
562
+ "uuid": "d76a086e-7803-46e7-ac1b-4026c9303211",
563
+ "parentUUID": "a8d9bd4e-5aca-4711-b7ae-0bf67a6e6870",
564
564
  "isHook": false,
565
565
  "skipped": false
566
566
  }
567
567
  ],
568
568
  "suites": [],
569
569
  "passes": [
570
- "467af1e1-a2ed-4bc0-98a4-06442fae866d"
570
+ "d76a086e-7803-46e7-ac1b-4026c9303211"
571
571
  ],
572
572
  "failures": [],
573
573
  "pending": [],
@@ -578,7 +578,7 @@
578
578
  "_timeout": 2000
579
579
  },
580
580
  {
581
- "uuid": "a9166a7a-7c8a-4384-b092-8c7f7d04fe47",
581
+ "uuid": "0bef725a-bd32-417f-8dc6-e7d6c62bfc67",
582
582
  "title": "eventNames()",
583
583
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
584
584
  "file": "/test/device-events.ts",
@@ -589,35 +589,35 @@
589
589
  "title": "should work",
590
590
  "fullTitle": "NodePyATVDeviceEvents eventNames() should work",
591
591
  "timedOut": false,
592
- "duration": 1,
592
+ "duration": 0,
593
593
  "state": "passed",
594
594
  "speed": "fast",
595
595
  "pass": true,
596
596
  "fail": false,
597
597
  "pending": false,
598
598
  "context": null,
599
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.eventNames(), ['test']);\ndevice.off('test', listener);",
599
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\ndevice.on('test', listener);\nassert.deepStrictEqual(device.eventNames(), ['test']);\ndevice.off('test', listener);",
600
600
  "err": {},
601
- "uuid": "47311782-0d01-4ef5-aee0-0ab9b11adea3",
602
- "parentUUID": "a9166a7a-7c8a-4384-b092-8c7f7d04fe47",
601
+ "uuid": "55d2587c-bc7f-459a-8294-24338108fa46",
602
+ "parentUUID": "0bef725a-bd32-417f-8dc6-e7d6c62bfc67",
603
603
  "isHook": false,
604
604
  "skipped": false
605
605
  }
606
606
  ],
607
607
  "suites": [],
608
608
  "passes": [
609
- "47311782-0d01-4ef5-aee0-0ab9b11adea3"
609
+ "55d2587c-bc7f-459a-8294-24338108fa46"
610
610
  ],
611
611
  "failures": [],
612
612
  "pending": [],
613
613
  "skipped": [],
614
- "duration": 1,
614
+ "duration": 0,
615
615
  "root": false,
616
616
  "rootEmpty": false,
617
617
  "_timeout": 2000
618
618
  },
619
619
  {
620
- "uuid": "0c29c18c-bb03-422c-aab9-3bc54891c517",
620
+ "uuid": "e2797a04-ca3c-416f-a86d-a9acfcda9fea",
621
621
  "title": "getMaxListeners()",
622
622
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
623
623
  "file": "/test/device-events.ts",
@@ -635,17 +635,17 @@
635
635
  "fail": false,
636
636
  "pending": false,
637
637
  "context": null,
638
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst result = device.getMaxListeners();\nassert_1.default.ok(typeof result, 'number');\nassert_1.default.ok(result >= 10);",
638
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst result = device.getMaxListeners();\nassert.ok(typeof result, 'number');\nassert.ok(result >= 10);",
639
639
  "err": {},
640
- "uuid": "0b53621e-5744-4c29-bd41-c9fe4b952166",
641
- "parentUUID": "0c29c18c-bb03-422c-aab9-3bc54891c517",
640
+ "uuid": "0a1eb2fb-7c74-4dd9-9632-df0f356a8e90",
641
+ "parentUUID": "e2797a04-ca3c-416f-a86d-a9acfcda9fea",
642
642
  "isHook": false,
643
643
  "skipped": false
644
644
  }
645
645
  ],
646
646
  "suites": [],
647
647
  "passes": [
648
- "0b53621e-5744-4c29-bd41-c9fe4b952166"
648
+ "0a1eb2fb-7c74-4dd9-9632-df0f356a8e90"
649
649
  ],
650
650
  "failures": [],
651
651
  "pending": [],
@@ -656,7 +656,7 @@
656
656
  "_timeout": 2000
657
657
  },
658
658
  {
659
- "uuid": "ac9937a7-a695-462a-aa4b-ac3dd2c55634",
659
+ "uuid": "b29ecbf5-09c8-43e5-93a2-d30ce731b2b4",
660
660
  "title": "listenerCount()",
661
661
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
662
662
  "file": "/test/device-events.ts",
@@ -674,17 +674,17 @@
674
674
  "fail": false,
675
675
  "pending": false,
676
676
  "context": null,
677
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.listenerCount('test'), 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.listenerCount('test'), 1);\ndevice.off('test', listener);",
677
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert.deepStrictEqual(device.listenerCount('test'), 0);\ndevice.on('test', listener);\nassert.deepStrictEqual(device.listenerCount('test'), 1);\ndevice.off('test', listener);",
678
678
  "err": {},
679
- "uuid": "516fe96e-b0cd-4ed2-a2ea-cfee040b9b36",
680
- "parentUUID": "ac9937a7-a695-462a-aa4b-ac3dd2c55634",
679
+ "uuid": "ca860ba4-508d-4e14-85f0-68ebf03a1ba7",
680
+ "parentUUID": "b29ecbf5-09c8-43e5-93a2-d30ce731b2b4",
681
681
  "isHook": false,
682
682
  "skipped": false
683
683
  }
684
684
  ],
685
685
  "suites": [],
686
686
  "passes": [
687
- "516fe96e-b0cd-4ed2-a2ea-cfee040b9b36"
687
+ "ca860ba4-508d-4e14-85f0-68ebf03a1ba7"
688
688
  ],
689
689
  "failures": [],
690
690
  "pending": [],
@@ -695,7 +695,7 @@
695
695
  "_timeout": 2000
696
696
  },
697
697
  {
698
- "uuid": "6b9284df-2bb0-4710-aa17-817e0e7206f4",
698
+ "uuid": "c4026188-be6f-43c9-b6c5-bf10c4e7716d",
699
699
  "title": "listeners()",
700
700
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
701
701
  "file": "/test/device-events.ts",
@@ -713,17 +713,17 @@
713
713
  "fail": false,
714
714
  "pending": false,
715
715
  "context": null,
716
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.listeners('test').length, 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.listeners('test').length, 1);\nassert_1.default.deepStrictEqual(device.listeners('test')[0], listener);\ndevice.off('test', listener);",
716
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert.deepStrictEqual(device.listeners('test').length, 0);\ndevice.on('test', listener);\nassert.deepStrictEqual(device.listeners('test').length, 1);\nassert.deepStrictEqual(device.listeners('test')[0], listener);\ndevice.off('test', listener);",
717
717
  "err": {},
718
- "uuid": "7296e013-0b46-4689-852d-4fe913cb621d",
719
- "parentUUID": "6b9284df-2bb0-4710-aa17-817e0e7206f4",
718
+ "uuid": "82f99c68-eee8-4c2f-8b58-2f88c2e02ec1",
719
+ "parentUUID": "c4026188-be6f-43c9-b6c5-bf10c4e7716d",
720
720
  "isHook": false,
721
721
  "skipped": false
722
722
  }
723
723
  ],
724
724
  "suites": [],
725
725
  "passes": [
726
- "7296e013-0b46-4689-852d-4fe913cb621d"
726
+ "82f99c68-eee8-4c2f-8b58-2f88c2e02ec1"
727
727
  ],
728
728
  "failures": [],
729
729
  "pending": [],
@@ -734,7 +734,7 @@
734
734
  "_timeout": 2000
735
735
  },
736
736
  {
737
- "uuid": "bb6f5e63-e803-4ab6-b776-bbcf4055dfa5",
737
+ "uuid": "0e9220f0-2f26-4a28-b1cf-14526c506638",
738
738
  "title": "prependListener()",
739
739
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
740
740
  "file": "/test/device-events.ts",
@@ -752,17 +752,17 @@
752
752
  "fail": false,
753
753
  "pending": false,
754
754
  "context": null,
755
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\nconst listener = () => {\n device.removeAllListeners('update');\n done();\n};\ndevice.prependListener('update', listener);",
755
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\nconst listener = () => {\n device.removeAllListeners('update');\n done();\n};\ndevice.prependListener('update', listener);",
756
756
  "err": {},
757
- "uuid": "74a08ac0-40f3-4cf2-b52e-315d774614f2",
758
- "parentUUID": "bb6f5e63-e803-4ab6-b776-bbcf4055dfa5",
757
+ "uuid": "adf826b4-e197-4885-804f-3a38ffbcffe5",
758
+ "parentUUID": "0e9220f0-2f26-4a28-b1cf-14526c506638",
759
759
  "isHook": false,
760
760
  "skipped": false
761
761
  }
762
762
  ],
763
763
  "suites": [],
764
764
  "passes": [
765
- "74a08ac0-40f3-4cf2-b52e-315d774614f2"
765
+ "adf826b4-e197-4885-804f-3a38ffbcffe5"
766
766
  ],
767
767
  "failures": [],
768
768
  "pending": [],
@@ -773,7 +773,7 @@
773
773
  "_timeout": 2000
774
774
  },
775
775
  {
776
- "uuid": "3da0c5bc-20a3-40f4-b2c3-31f1db677740",
776
+ "uuid": "47d0eca7-3345-4692-ba52-e3a120693e8b",
777
777
  "title": "prependOnceListener()",
778
778
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
779
779
  "file": "/test/device-events.ts",
@@ -784,35 +784,35 @@
784
784
  "title": "should work",
785
785
  "fullTitle": "NodePyATVDeviceEvents prependOnceListener() should work",
786
786
  "timedOut": false,
787
- "duration": 1,
787
+ "duration": 0,
788
788
  "state": "passed",
789
789
  "speed": "fast",
790
790
  "pass": true,
791
791
  "fail": false,
792
792
  "pending": false,
793
793
  "context": null,
794
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\ndevice.prependOnceListener('update', () => done());",
794
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\ndevice.prependOnceListener('update', () => done());",
795
795
  "err": {},
796
- "uuid": "8bce9b29-4767-404e-bf66-addf43f2bd13",
797
- "parentUUID": "3da0c5bc-20a3-40f4-b2c3-31f1db677740",
796
+ "uuid": "52ee3ea7-5878-40eb-b860-4bc0197c39de",
797
+ "parentUUID": "47d0eca7-3345-4692-ba52-e3a120693e8b",
798
798
  "isHook": false,
799
799
  "skipped": false
800
800
  }
801
801
  ],
802
802
  "suites": [],
803
803
  "passes": [
804
- "8bce9b29-4767-404e-bf66-addf43f2bd13"
804
+ "52ee3ea7-5878-40eb-b860-4bc0197c39de"
805
805
  ],
806
806
  "failures": [],
807
807
  "pending": [],
808
808
  "skipped": [],
809
- "duration": 1,
809
+ "duration": 0,
810
810
  "root": false,
811
811
  "rootEmpty": false,
812
812
  "_timeout": 2000
813
813
  },
814
814
  {
815
- "uuid": "827c91a4-62ac-40a7-a102-b0e0c0e23155",
815
+ "uuid": "f918c6e3-80fd-4ee0-bb2f-cb67422d15e3",
816
816
  "title": "rawListeners()",
817
817
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
818
818
  "file": "/test/device-events.ts",
@@ -830,17 +830,17 @@
830
830
  "fail": false,
831
831
  "pending": false,
832
832
  "context": null,
833
- "code": "const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.rawListeners('test').length, 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.rawListeners('test').length, 1);\nassert_1.default.deepStrictEqual(device.rawListeners('test')[0], listener);\ndevice.off('test', listener);",
833
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert.deepStrictEqual(device.rawListeners('test').length, 0);\ndevice.on('test', listener);\nassert.deepStrictEqual(device.rawListeners('test').length, 1);\nassert.deepStrictEqual(device.rawListeners('test')[0], listener);\ndevice.off('test', listener);",
834
834
  "err": {},
835
- "uuid": "986678a1-b8c7-4fac-a050-92c1be370d49",
836
- "parentUUID": "827c91a4-62ac-40a7-a102-b0e0c0e23155",
835
+ "uuid": "149b2b85-8db1-4ec8-ba0f-700b11c1900c",
836
+ "parentUUID": "f918c6e3-80fd-4ee0-bb2f-cb67422d15e3",
837
837
  "isHook": false,
838
838
  "skipped": false
839
839
  }
840
840
  ],
841
841
  "suites": [],
842
842
  "passes": [
843
- "986678a1-b8c7-4fac-a050-92c1be370d49"
843
+ "149b2b85-8db1-4ec8-ba0f-700b11c1900c"
844
844
  ],
845
845
  "failures": [],
846
846
  "pending": [],
@@ -851,7 +851,7 @@
851
851
  "_timeout": 2000
852
852
  },
853
853
  {
854
- "uuid": "5b83c9cf-cadc-4479-bc22-6aaadff71bbc",
854
+ "uuid": "ceffe928-1e0a-4a2b-b3cf-1615c4ac873c",
855
855
  "title": "removeListener()",
856
856
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts",
857
857
  "file": "/test/device-events.ts",
@@ -869,17 +869,17 @@
869
869
  "fail": false,
870
870
  "pending": false,
871
871
  "context": null,
872
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n assert_1.default.deepStrictEqual(device.listenerCount('update'), 1);\n device.removeListener('update', listener);\n assert_1.default.deepStrictEqual(device.listenerCount('update'), 0);\n});",
872
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n assert.deepStrictEqual(device.listenerCount('update'), 1);\n device.removeListener('update', listener);\n assert.deepStrictEqual(device.listenerCount('update'), 0);\n});",
873
873
  "err": {},
874
- "uuid": "3da23de6-1b29-4473-befc-d89233bf937d",
875
- "parentUUID": "5b83c9cf-cadc-4479-bc22-6aaadff71bbc",
874
+ "uuid": "b85e76f3-fcaa-4757-9265-7cfbb489a9f3",
875
+ "parentUUID": "ceffe928-1e0a-4a2b-b3cf-1615c4ac873c",
876
876
  "isHook": false,
877
877
  "skipped": false
878
878
  }
879
879
  ],
880
880
  "suites": [],
881
881
  "passes": [
882
- "3da23de6-1b29-4473-befc-d89233bf937d"
882
+ "b85e76f3-fcaa-4757-9265-7cfbb489a9f3"
883
883
  ],
884
884
  "failures": [],
885
885
  "pending": [],
@@ -900,7 +900,7 @@
900
900
  "_timeout": 2000
901
901
  },
902
902
  {
903
- "uuid": "b596869a-0e30-4bb6-9fb0-8c4098995d1e",
903
+ "uuid": "f4094e12-45c6-4658-a69b-e35067f1f69f",
904
904
  "title": "NodePyATVDevice",
905
905
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
906
906
  "file": "/test/device.ts",
@@ -909,7 +909,7 @@
909
909
  "tests": [],
910
910
  "suites": [
911
911
  {
912
- "uuid": "1b87a02b-2453-4e0f-a223-a716d0e53a56",
912
+ "uuid": "ded76159-e029-49c7-8944-bdff244d59c4",
913
913
  "title": "get name()",
914
914
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
915
915
  "file": "/test/device.ts",
@@ -927,17 +927,17 @@
927
927
  "fail": false,
928
928
  "pending": false,
929
929
  "context": null,
930
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.name, 'My Testdevice');",
930
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert.strictEqual(device.name, 'My Testdevice');",
931
931
  "err": {},
932
- "uuid": "76ac4cdd-7e9c-4eb7-833a-71061a75bbd3",
933
- "parentUUID": "1b87a02b-2453-4e0f-a223-a716d0e53a56",
932
+ "uuid": "3a4117c4-27ee-4867-9c52-89ea6c4282e7",
933
+ "parentUUID": "ded76159-e029-49c7-8944-bdff244d59c4",
934
934
  "isHook": false,
935
935
  "skipped": false
936
936
  }
937
937
  ],
938
938
  "suites": [],
939
939
  "passes": [
940
- "76ac4cdd-7e9c-4eb7-833a-71061a75bbd3"
940
+ "3a4117c4-27ee-4867-9c52-89ea6c4282e7"
941
941
  ],
942
942
  "failures": [],
943
943
  "pending": [],
@@ -948,7 +948,7 @@
948
948
  "_timeout": 2000
949
949
  },
950
950
  {
951
- "uuid": "e9676d4d-281a-41bf-be8d-f2ccdc67f96b",
951
+ "uuid": "27307faf-2636-41af-b87b-3f2a1fc9ef8d",
952
952
  "title": "get host()",
953
953
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
954
954
  "file": "/test/device.ts",
@@ -966,17 +966,17 @@
966
966
  "fail": false,
967
967
  "pending": false,
968
968
  "context": null,
969
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.host, '192.168.178.2');",
969
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert.strictEqual(device.host, '192.168.178.2');",
970
970
  "err": {},
971
- "uuid": "f74e9a82-82b3-4fc3-ae30-baf22bc263f0",
972
- "parentUUID": "e9676d4d-281a-41bf-be8d-f2ccdc67f96b",
971
+ "uuid": "d65a45c3-531f-45fa-89fd-4c626a8c99d0",
972
+ "parentUUID": "27307faf-2636-41af-b87b-3f2a1fc9ef8d",
973
973
  "isHook": false,
974
974
  "skipped": false
975
975
  }
976
976
  ],
977
977
  "suites": [],
978
978
  "passes": [
979
- "f74e9a82-82b3-4fc3-ae30-baf22bc263f0"
979
+ "d65a45c3-531f-45fa-89fd-4c626a8c99d0"
980
980
  ],
981
981
  "failures": [],
982
982
  "pending": [],
@@ -987,7 +987,7 @@
987
987
  "_timeout": 2000
988
988
  },
989
989
  {
990
- "uuid": "fdadd8d7-915d-49ff-b9fb-cc205eb62a52",
990
+ "uuid": "7c11d259-3882-4166-b51c-1c01a2ad66f2",
991
991
  "title": "get id()",
992
992
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
993
993
  "file": "/test/device.ts",
@@ -998,35 +998,35 @@
998
998
  "title": "should return the id",
999
999
  "fullTitle": "NodePyATVDevice get id() should return the id",
1000
1000
  "timedOut": false,
1001
- "duration": 0,
1001
+ "duration": 1,
1002
1002
  "state": "passed",
1003
1003
  "speed": "fast",
1004
1004
  "pass": true,
1005
1005
  "fail": false,
1006
1006
  "pending": false,
1007
1007
  "context": null,
1008
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****'\n});\nassert_1.default.strictEqual(device.id, '*****');",
1008
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****'\n});\nassert.strictEqual(device.id, '*****');",
1009
1009
  "err": {},
1010
- "uuid": "956b2fec-e9f1-49e6-9d4d-5fc859aeaa75",
1011
- "parentUUID": "fdadd8d7-915d-49ff-b9fb-cc205eb62a52",
1010
+ "uuid": "6f05b623-409b-4455-98fd-3de398ff74d3",
1011
+ "parentUUID": "7c11d259-3882-4166-b51c-1c01a2ad66f2",
1012
1012
  "isHook": false,
1013
1013
  "skipped": false
1014
1014
  }
1015
1015
  ],
1016
1016
  "suites": [],
1017
1017
  "passes": [
1018
- "956b2fec-e9f1-49e6-9d4d-5fc859aeaa75"
1018
+ "6f05b623-409b-4455-98fd-3de398ff74d3"
1019
1019
  ],
1020
1020
  "failures": [],
1021
1021
  "pending": [],
1022
1022
  "skipped": [],
1023
- "duration": 0,
1023
+ "duration": 1,
1024
1024
  "root": false,
1025
1025
  "rootEmpty": false,
1026
1026
  "_timeout": 2000
1027
1027
  },
1028
1028
  {
1029
- "uuid": "152ffa81-1357-4d5a-afb9-a73cbc11e2b0",
1029
+ "uuid": "f90bba2b-7b32-4b1c-9a8e-0f7338da2c83",
1030
1030
  "title": "get protocol()",
1031
1031
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1032
1032
  "file": "/test/device.ts",
@@ -1037,35 +1037,35 @@
1037
1037
  "title": "should return the protocol",
1038
1038
  "fullTitle": "NodePyATVDevice get protocol() should return the protocol",
1039
1039
  "timedOut": false,
1040
- "duration": 1,
1040
+ "duration": 0,
1041
1041
  "state": "passed",
1042
1042
  "speed": "fast",
1043
1043
  "pass": true,
1044
1044
  "fail": false,
1045
1045
  "pending": false,
1046
1046
  "context": null,
1047
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n protocol: types_1.NodePyATVProtocol.airplay\n});\nassert_1.default.strictEqual(device.protocol, types_1.NodePyATVProtocol.airplay);",
1047
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n protocol: NodePyATVProtocol.airplay\n});\nassert.strictEqual(device.protocol, NodePyATVProtocol.airplay);",
1048
1048
  "err": {},
1049
- "uuid": "d9b43955-6188-4240-9f38-8db6c07e6f01",
1050
- "parentUUID": "152ffa81-1357-4d5a-afb9-a73cbc11e2b0",
1049
+ "uuid": "3974e5ec-5412-4c0c-b350-9c36058a8c29",
1050
+ "parentUUID": "f90bba2b-7b32-4b1c-9a8e-0f7338da2c83",
1051
1051
  "isHook": false,
1052
1052
  "skipped": false
1053
1053
  }
1054
1054
  ],
1055
1055
  "suites": [],
1056
1056
  "passes": [
1057
- "d9b43955-6188-4240-9f38-8db6c07e6f01"
1057
+ "3974e5ec-5412-4c0c-b350-9c36058a8c29"
1058
1058
  ],
1059
1059
  "failures": [],
1060
1060
  "pending": [],
1061
1061
  "skipped": [],
1062
- "duration": 1,
1062
+ "duration": 0,
1063
1063
  "root": false,
1064
1064
  "rootEmpty": false,
1065
1065
  "_timeout": 2000
1066
1066
  },
1067
1067
  {
1068
- "uuid": "e515fdf7-c6df-4ec8-88e5-44316c493c19",
1068
+ "uuid": "b71c84e8-8486-4819-8596-588d280ae067",
1069
1069
  "title": "get debug()",
1070
1070
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1071
1071
  "file": "/test/device.ts",
@@ -1083,10 +1083,10 @@
1083
1083
  "fail": false,
1084
1084
  "pending": false,
1085
1085
  "context": null,
1086
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);",
1086
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert.strictEqual(device.debug, true);",
1087
1087
  "err": {},
1088
- "uuid": "9e688855-4aaf-4c10-8fc2-b47c95ff2c6b",
1089
- "parentUUID": "e515fdf7-c6df-4ec8-88e5-44316c493c19",
1088
+ "uuid": "dcb875cf-04c5-4668-81fa-faf6bfe2c785",
1089
+ "parentUUID": "b71c84e8-8486-4819-8596-588d280ae067",
1090
1090
  "isHook": false,
1091
1091
  "skipped": false
1092
1092
  },
@@ -1101,10 +1101,10 @@
1101
1101
  "fail": false,
1102
1102
  "pending": false,
1103
1103
  "context": null,
1104
- "code": "// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nconst device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: fn\n});\nassert_1.default.strictEqual(device.debug, fn);",
1104
+ "code": "// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nconst device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: fn\n});\nassert.strictEqual(device.debug, fn);",
1105
1105
  "err": {},
1106
- "uuid": "8b0e204d-90d0-447e-9d4f-c3ca336ded1f",
1107
- "parentUUID": "e515fdf7-c6df-4ec8-88e5-44316c493c19",
1106
+ "uuid": "fe66d414-d0a5-49b7-a6c1-a1bfb6931da1",
1107
+ "parentUUID": "b71c84e8-8486-4819-8596-588d280ae067",
1108
1108
  "isHook": false,
1109
1109
  "skipped": false
1110
1110
  },
@@ -1119,19 +1119,19 @@
1119
1119
  "fail": false,
1120
1120
  "pending": false,
1121
1121
  "context": null,
1122
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.debug, undefined);",
1122
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert.strictEqual(device.debug, undefined);",
1123
1123
  "err": {},
1124
- "uuid": "2d622ab3-c76b-419a-9fb8-82b393af2b71",
1125
- "parentUUID": "e515fdf7-c6df-4ec8-88e5-44316c493c19",
1124
+ "uuid": "32c0ca7b-f124-4d99-a7cd-108d385ed09b",
1125
+ "parentUUID": "b71c84e8-8486-4819-8596-588d280ae067",
1126
1126
  "isHook": false,
1127
1127
  "skipped": false
1128
1128
  }
1129
1129
  ],
1130
1130
  "suites": [],
1131
1131
  "passes": [
1132
- "9e688855-4aaf-4c10-8fc2-b47c95ff2c6b",
1133
- "8b0e204d-90d0-447e-9d4f-c3ca336ded1f",
1134
- "2d622ab3-c76b-419a-9fb8-82b393af2b71"
1132
+ "dcb875cf-04c5-4668-81fa-faf6bfe2c785",
1133
+ "fe66d414-d0a5-49b7-a6c1-a1bfb6931da1",
1134
+ "32c0ca7b-f124-4d99-a7cd-108d385ed09b"
1135
1135
  ],
1136
1136
  "failures": [],
1137
1137
  "pending": [],
@@ -1142,7 +1142,7 @@
1142
1142
  "_timeout": 2000
1143
1143
  },
1144
1144
  {
1145
- "uuid": "903dbb90-374e-4c96-a60f-95198d2418b6",
1145
+ "uuid": "8b8d6c3a-a3ce-4305-bc1e-b1830ce480b4",
1146
1146
  "title": "set debug()",
1147
1147
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1148
1148
  "file": "/test/device.ts",
@@ -1153,17 +1153,17 @@
1153
1153
  "title": "should work for debug = true",
1154
1154
  "fullTitle": "NodePyATVDevice set debug() should work for debug = true",
1155
1155
  "timedOut": false,
1156
- "duration": 1,
1156
+ "duration": 0,
1157
1157
  "state": "passed",
1158
1158
  "speed": "fast",
1159
1159
  "pass": true,
1160
1160
  "fail": false,
1161
1161
  "pending": false,
1162
1162
  "context": null,
1163
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.debug, undefined);\ndevice.debug = true;\nassert_1.default.strictEqual(device.debug, true);",
1163
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert.strictEqual(device.debug, undefined);\ndevice.debug = true;\nassert.strictEqual(device.debug, true);",
1164
1164
  "err": {},
1165
- "uuid": "453fd6f3-5f55-4110-bdf0-bc854cf1f73a",
1166
- "parentUUID": "903dbb90-374e-4c96-a60f-95198d2418b6",
1165
+ "uuid": "3efa7c07-28ba-4df2-a6e1-5582f04f1846",
1166
+ "parentUUID": "8b8d6c3a-a3ce-4305-bc1e-b1830ce480b4",
1167
1167
  "isHook": false,
1168
1168
  "skipped": false
1169
1169
  },
@@ -1178,10 +1178,10 @@
1178
1178
  "fail": false,
1179
1179
  "pending": false,
1180
1180
  "context": null,
1181
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert_1.default.strictEqual(device.debug, undefined);",
1181
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert.strictEqual(device.debug, undefined);",
1182
1182
  "err": {},
1183
- "uuid": "a030d1b6-4b85-437a-a67b-3868f27f0be1",
1184
- "parentUUID": "903dbb90-374e-4c96-a60f-95198d2418b6",
1183
+ "uuid": "aee7b885-bc5a-4281-818b-d59c512277da",
1184
+ "parentUUID": "8b8d6c3a-a3ce-4305-bc1e-b1830ce480b4",
1185
1185
  "isHook": false,
1186
1186
  "skipped": false
1187
1187
  },
@@ -1189,17 +1189,17 @@
1189
1189
  "title": "should work for debug = undefined",
1190
1190
  "fullTitle": "NodePyATVDevice set debug() should work for debug = undefined",
1191
1191
  "timedOut": false,
1192
- "duration": 0,
1192
+ "duration": 1,
1193
1193
  "state": "passed",
1194
1194
  "speed": "fast",
1195
1195
  "pass": true,
1196
1196
  "fail": false,
1197
1197
  "pending": false,
1198
1198
  "context": null,
1199
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert_1.default.strictEqual(device.debug, undefined);",
1199
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert.strictEqual(device.debug, undefined);",
1200
1200
  "err": {},
1201
- "uuid": "cbe1eb94-5607-4df5-9101-dc4ec8e861bd",
1202
- "parentUUID": "903dbb90-374e-4c96-a60f-95198d2418b6",
1201
+ "uuid": "d44366bf-d5d6-4e3b-b983-2284a7a2270a",
1202
+ "parentUUID": "8b8d6c3a-a3ce-4305-bc1e-b1830ce480b4",
1203
1203
  "isHook": false,
1204
1204
  "skipped": false
1205
1205
  },
@@ -1214,20 +1214,20 @@
1214
1214
  "fail": false,
1215
1215
  "pending": false,
1216
1216
  "context": null,
1217
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nassert_1.default.strictEqual(device.debug, undefined);\ndevice.debug = fn;\nassert_1.default.strictEqual(device.debug, fn);",
1217
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nassert.strictEqual(device.debug, undefined);\ndevice.debug = fn;\nassert.strictEqual(device.debug, fn);",
1218
1218
  "err": {},
1219
- "uuid": "b3131ce5-a3c5-470c-b377-d85fa60e56f2",
1220
- "parentUUID": "903dbb90-374e-4c96-a60f-95198d2418b6",
1219
+ "uuid": "cf0edc15-f327-4152-a411-209d9041c8d8",
1220
+ "parentUUID": "8b8d6c3a-a3ce-4305-bc1e-b1830ce480b4",
1221
1221
  "isHook": false,
1222
1222
  "skipped": false
1223
1223
  }
1224
1224
  ],
1225
1225
  "suites": [],
1226
1226
  "passes": [
1227
- "453fd6f3-5f55-4110-bdf0-bc854cf1f73a",
1228
- "a030d1b6-4b85-437a-a67b-3868f27f0be1",
1229
- "cbe1eb94-5607-4df5-9101-dc4ec8e861bd",
1230
- "b3131ce5-a3c5-470c-b377-d85fa60e56f2"
1227
+ "3efa7c07-28ba-4df2-a6e1-5582f04f1846",
1228
+ "aee7b885-bc5a-4281-818b-d59c512277da",
1229
+ "d44366bf-d5d6-4e3b-b983-2284a7a2270a",
1230
+ "cf0edc15-f327-4152-a411-209d9041c8d8"
1231
1231
  ],
1232
1232
  "failures": [],
1233
1233
  "pending": [],
@@ -1238,7 +1238,7 @@
1238
1238
  "_timeout": 2000
1239
1239
  },
1240
1240
  {
1241
- "uuid": "7b7b3494-be46-4ecb-8f5c-f77bbf6f13fe",
1241
+ "uuid": "a226ad37-d68b-4396-a942-9b5af2468a47",
1242
1242
  "title": "toJSON()",
1243
1243
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1244
1244
  "file": "/test/device.ts",
@@ -1256,10 +1256,10 @@
1256
1256
  "fail": false,
1257
1257
  "pending": false,
1258
1258
  "context": null,
1259
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n});\nassert_1.default.deepEqual(device.toJSON(), {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n});",
1259
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: NodePyATVProtocol.airplay\n});\nassert.deepEqual(device.toJSON(), {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: NodePyATVProtocol.airplay\n});",
1260
1260
  "err": {},
1261
- "uuid": "886a8362-3f70-468b-963e-a313f0511c81",
1262
- "parentUUID": "7b7b3494-be46-4ecb-8f5c-f77bbf6f13fe",
1261
+ "uuid": "b2f76aa5-f77b-4c46-baa4-430e9becd544",
1262
+ "parentUUID": "a226ad37-d68b-4396-a942-9b5af2468a47",
1263
1263
  "isHook": false,
1264
1264
  "skipped": false
1265
1265
  },
@@ -1274,18 +1274,18 @@
1274
1274
  "fail": false,
1275
1275
  "pending": false,
1276
1276
  "context": null,
1277
- "code": "const config = {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n};\nconst deviceA = new device_1.default(config);\nconst deviceB = new device_1.default(deviceA.toJSON());\nassert_1.default.deepEqual(deviceB.toJSON(), config);",
1277
+ "code": "const config = {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: NodePyATVProtocol.airplay\n};\nconst deviceA = new NodePyATVDevice(config);\nconst deviceB = new NodePyATVDevice(deviceA.toJSON());\nassert.deepEqual(deviceB.toJSON(), config);",
1278
1278
  "err": {},
1279
- "uuid": "0a8e5c28-241b-4819-9913-b93270fea488",
1280
- "parentUUID": "7b7b3494-be46-4ecb-8f5c-f77bbf6f13fe",
1279
+ "uuid": "94c35ec0-677f-4845-89c8-7598cccd6683",
1280
+ "parentUUID": "a226ad37-d68b-4396-a942-9b5af2468a47",
1281
1281
  "isHook": false,
1282
1282
  "skipped": false
1283
1283
  }
1284
1284
  ],
1285
1285
  "suites": [],
1286
1286
  "passes": [
1287
- "886a8362-3f70-468b-963e-a313f0511c81",
1288
- "0a8e5c28-241b-4819-9913-b93270fea488"
1287
+ "b2f76aa5-f77b-4c46-baa4-430e9becd544",
1288
+ "94c35ec0-677f-4845-89c8-7598cccd6683"
1289
1289
  ],
1290
1290
  "failures": [],
1291
1291
  "pending": [],
@@ -1296,7 +1296,7 @@
1296
1296
  "_timeout": 2000
1297
1297
  },
1298
1298
  {
1299
- "uuid": "4b746418-b1ef-4985-9eaa-a68e4c2df2f7",
1299
+ "uuid": "8b325847-c85a-41f4-859f-4d1342775f66",
1300
1300
  "title": "toString()",
1301
1301
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1302
1302
  "file": "/test/device.ts",
@@ -1314,17 +1314,17 @@
1314
1314
  "fail": false,
1315
1315
  "pending": false,
1316
1316
  "context": null,
1317
- "code": "const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.toString(), 'NodePyATVDevice(My Testdevice, 192.168.178.2)');",
1317
+ "code": "const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert.strictEqual(device.toString(), 'NodePyATVDevice(My Testdevice, 192.168.178.2)');",
1318
1318
  "err": {},
1319
- "uuid": "5ebf4cad-bc60-4961-80d5-f6672af1789e",
1320
- "parentUUID": "4b746418-b1ef-4985-9eaa-a68e4c2df2f7",
1319
+ "uuid": "ba8a4cbb-90e6-4175-bb40-79bc2726acc9",
1320
+ "parentUUID": "8b325847-c85a-41f4-859f-4d1342775f66",
1321
1321
  "isHook": false,
1322
1322
  "skipped": false
1323
1323
  }
1324
1324
  ],
1325
1325
  "suites": [],
1326
1326
  "passes": [
1327
- "5ebf4cad-bc60-4961-80d5-f6672af1789e"
1327
+ "ba8a4cbb-90e6-4175-bb40-79bc2726acc9"
1328
1328
  ],
1329
1329
  "failures": [],
1330
1330
  "pending": [],
@@ -1335,7 +1335,7 @@
1335
1335
  "_timeout": 2000
1336
1336
  },
1337
1337
  {
1338
- "uuid": "7e9aea33-9d23-418c-8177-9137805b04a2",
1338
+ "uuid": "40f52dd2-7762-4e39-a06e-d61affdefb7c",
1339
1339
  "title": "getState()",
1340
1340
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1341
1341
  "file": "/test/device.ts",
@@ -1355,8 +1355,8 @@
1355
1355
  "context": null,
1356
1356
  "code": "",
1357
1357
  "err": {},
1358
- "uuid": "8ec47d0c-4455-4193-9e95-ac04a8c19948",
1359
- "parentUUID": "7e9aea33-9d23-418c-8177-9137805b04a2",
1358
+ "uuid": "0f823f49-daa3-44bd-b996-c5040d6b3679",
1359
+ "parentUUID": "40f52dd2-7762-4e39-a06e-d61affdefb7c",
1360
1360
  "isHook": false,
1361
1361
  "skipped": false
1362
1362
  },
@@ -1371,10 +1371,10 @@
1371
1371
  "fail": false,
1372
1372
  "pending": false,
1373
1373
  "context": null,
1374
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const result = yield device.getState();\n assert_1.default.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: types_1.NodePyATVMediaType.video,\n deviceState: types_1.NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: types_1.NodePyATVShuffleState.off,\n repeat: types_1.NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n });\n});",
1374
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const result = yield device.getState();\n assert.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: NodePyATVMediaType.video,\n deviceState: NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: NodePyATVShuffleState.off,\n repeat: NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n });\n});",
1375
1375
  "err": {},
1376
- "uuid": "236051ff-c1f6-4079-94ec-4c1a8b1b6651",
1377
- "parentUUID": "7e9aea33-9d23-418c-8177-9137805b04a2",
1376
+ "uuid": "0ff949d6-b65c-4bcf-9210-ab5388c7de28",
1377
+ "parentUUID": "40f52dd2-7762-4e39-a06e-d61affdefb7c",
1378
1378
  "isHook": false,
1379
1379
  "skipped": false
1380
1380
  },
@@ -1389,10 +1389,10 @@
1389
1389
  "fail": false,
1390
1390
  "pending": false,
1391
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});",
1392
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n });\n })\n });\n assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield device.getState();\n }), /Got pyatv Error: invalid credentials: 321/);\n});",
1393
1393
  "err": {},
1394
- "uuid": "117ee609-d84f-47a7-b800-4d8c1afb7f94",
1395
- "parentUUID": "7e9aea33-9d23-418c-8177-9137805b04a2",
1394
+ "uuid": "9aefae98-7165-4b7b-8fb5-7f921ecb566b",
1395
+ "parentUUID": "40f52dd2-7762-4e39-a06e-d61affdefb7c",
1396
1396
  "isHook": false,
1397
1397
  "skipped": false
1398
1398
  },
@@ -1407,10 +1407,10 @@
1407
1407
  "fail": false,
1408
1408
  "pending": false,
1409
1409
  "context": null,
1410
- "code": "return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: new Date().toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n const secondResult = yield device.getState();\n assert_1.default.strictEqual(firstResult.dateTime, secondResult.dateTime);\n assert_1.default.strictEqual(executions, 1);\n});",
1410
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: new Date().toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n const secondResult = yield device.getState();\n assert.strictEqual(firstResult.dateTime, secondResult.dateTime);\n assert.strictEqual(executions, 1);\n});",
1411
1411
  "err": {},
1412
- "uuid": "4e2f3563-3c76-40d2-88fa-e20dfe7ff38e",
1413
- "parentUUID": "7e9aea33-9d23-418c-8177-9137805b04a2",
1412
+ "uuid": "abbc5ead-fc66-4d38-8e5f-acd679c4fcf8",
1413
+ "parentUUID": "40f52dd2-7762-4e39-a06e-d61affdefb7c",
1414
1414
  "isHook": false,
1415
1415
  "skipped": false
1416
1416
  },
@@ -1425,24 +1425,24 @@
1425
1425
  "fail": false,
1426
1426
  "pending": false,
1427
1427
  "context": null,
1428
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: new Date(new Date().getTime() - 1000).toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n assert_1.default.strictEqual(firstResult.position, 27);\n const secondResult = yield device.getState();\n assert_1.default.ok(secondResult.position);\n assert_1.default.ok(secondResult.position > 27, `Position should be > 27, was ${secondResult.position}`);\n assert_1.default.ok(secondResult.position < 30, `Position should be > 27, was ${secondResult.position}`);\n});",
1428
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n datetime: new Date(new Date().getTime() - 1000).toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n assert.strictEqual(firstResult.position, 27);\n const secondResult = yield device.getState();\n assert.ok(secondResult.position);\n assert.ok(secondResult.position > 27, `Position should be > 27, was ${secondResult.position}`);\n assert.ok(secondResult.position < 30, `Position should be > 27, was ${secondResult.position}`);\n});",
1429
1429
  "err": {},
1430
- "uuid": "c65227d1-3c87-4306-b813-c6fb6f7e94f1",
1431
- "parentUUID": "7e9aea33-9d23-418c-8177-9137805b04a2",
1430
+ "uuid": "ed4eac82-56c3-413e-8440-660d2830844b",
1431
+ "parentUUID": "40f52dd2-7762-4e39-a06e-d61affdefb7c",
1432
1432
  "isHook": false,
1433
1433
  "skipped": false
1434
1434
  }
1435
1435
  ],
1436
1436
  "suites": [],
1437
1437
  "passes": [
1438
- "236051ff-c1f6-4079-94ec-4c1a8b1b6651",
1439
- "117ee609-d84f-47a7-b800-4d8c1afb7f94",
1440
- "4e2f3563-3c76-40d2-88fa-e20dfe7ff38e",
1441
- "c65227d1-3c87-4306-b813-c6fb6f7e94f1"
1438
+ "0ff949d6-b65c-4bcf-9210-ab5388c7de28",
1439
+ "9aefae98-7165-4b7b-8fb5-7f921ecb566b",
1440
+ "abbc5ead-fc66-4d38-8e5f-acd679c4fcf8",
1441
+ "ed4eac82-56c3-413e-8440-660d2830844b"
1442
1442
  ],
1443
1443
  "failures": [],
1444
1444
  "pending": [
1445
- "8ec47d0c-4455-4193-9e95-ac04a8c19948"
1445
+ "0f823f49-daa3-44bd-b996-c5040d6b3679"
1446
1446
  ],
1447
1447
  "skipped": [],
1448
1448
  "duration": 6,
@@ -1451,7 +1451,7 @@
1451
1451
  "_timeout": 2000
1452
1452
  },
1453
1453
  {
1454
- "uuid": "4a340893-a334-4b54-9853-456101c911e2",
1454
+ "uuid": "ce003997-c0f1-4168-9686-46f24d7efc85",
1455
1455
  "title": "clearState()",
1456
1456
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1457
1457
  "file": "/test/device.ts",
@@ -1469,17 +1469,17 @@
1469
1469
  "fail": false,
1470
1470
  "pending": false,
1471
1471
  "context": null,
1472
- "code": "return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n title: 'Solo: A Star Wars Story'\n });\n })\n });\n assert_1.default.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n device.clearState();\n assert_1.default.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n assert_1.default.strictEqual(executions, 2);\n});",
1472
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n title: 'Solo: A Star Wars Story'\n });\n })\n });\n assert.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n device.clearState();\n assert.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n assert.strictEqual(executions, 2);\n});",
1473
1473
  "err": {},
1474
- "uuid": "12fe6595-7b2a-4a2e-bb03-2420ad65357e",
1475
- "parentUUID": "4a340893-a334-4b54-9853-456101c911e2",
1474
+ "uuid": "1640259e-fdf6-404b-84a0-cd6e4bb59d23",
1475
+ "parentUUID": "ce003997-c0f1-4168-9686-46f24d7efc85",
1476
1476
  "isHook": false,
1477
1477
  "skipped": false
1478
1478
  }
1479
1479
  ],
1480
1480
  "suites": [],
1481
1481
  "passes": [
1482
- "12fe6595-7b2a-4a2e-bb03-2420ad65357e"
1482
+ "1640259e-fdf6-404b-84a0-cd6e4bb59d23"
1483
1483
  ],
1484
1484
  "failures": [],
1485
1485
  "pending": [],
@@ -1490,7 +1490,7 @@
1490
1490
  "_timeout": 2000
1491
1491
  },
1492
1492
  {
1493
- "uuid": "61d1f1a0-1795-4ff1-be06-8dc29a385d28",
1493
+ "uuid": "e41fa58f-7bb2-4438-84f1-967b599f726d",
1494
1494
  "title": "getDateTime()",
1495
1495
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1496
1496
  "file": "/test/device.ts",
@@ -1501,35 +1501,35 @@
1501
1501
  "title": "should work",
1502
1502
  "fullTitle": "NodePyATVDevice getDateTime() should work",
1503
1503
  "timedOut": false,
1504
- "duration": 2,
1504
+ "duration": 1,
1505
1505
  "state": "passed",
1506
1506
  "speed": "fast",
1507
1507
  "pass": true,
1508
1508
  "fail": false,
1509
1509
  "pending": false,
1510
1510
  "context": null,
1511
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: new Date().toJSON()\n });\n })\n });\n const result = yield device.getDateTime();\n assert_1.default.ok(result instanceof Date);\n});",
1511
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n datetime: new Date().toJSON()\n });\n })\n });\n const result = yield device.getDateTime();\n assert.ok(result instanceof Date);\n});",
1512
1512
  "err": {},
1513
- "uuid": "2298dada-0314-4cfe-b80d-75f640456c8c",
1514
- "parentUUID": "61d1f1a0-1795-4ff1-be06-8dc29a385d28",
1513
+ "uuid": "4601664c-99eb-424c-bac1-f498b2a84283",
1514
+ "parentUUID": "e41fa58f-7bb2-4438-84f1-967b599f726d",
1515
1515
  "isHook": false,
1516
1516
  "skipped": false
1517
1517
  }
1518
1518
  ],
1519
1519
  "suites": [],
1520
1520
  "passes": [
1521
- "2298dada-0314-4cfe-b80d-75f640456c8c"
1521
+ "4601664c-99eb-424c-bac1-f498b2a84283"
1522
1522
  ],
1523
1523
  "failures": [],
1524
1524
  "pending": [],
1525
1525
  "skipped": [],
1526
- "duration": 2,
1526
+ "duration": 1,
1527
1527
  "root": false,
1528
1528
  "rootEmpty": false,
1529
1529
  "_timeout": 2000
1530
1530
  },
1531
1531
  {
1532
- "uuid": "20d8e428-2e50-4727-9ea7-ff357c4a7581",
1532
+ "uuid": "37144f6c-914b-41f1-963d-4e00c89a895f",
1533
1533
  "title": "getHash()",
1534
1534
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1535
1535
  "file": "/test/device.ts",
@@ -1540,35 +1540,35 @@
1540
1540
  "title": "should work",
1541
1541
  "fullTitle": "NodePyATVDevice getHash() should work",
1542
1542
  "timedOut": false,
1543
- "duration": 2,
1543
+ "duration": 1,
1544
1544
  "state": "passed",
1545
1545
  "speed": "fast",
1546
1546
  "pass": true,
1547
1547
  "fail": false,
1548
1548
  "pending": false,
1549
1549
  "context": null,
1550
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n hash: '12345'\n });\n })\n });\n const result = yield device.getHash();\n assert_1.default.strictEqual(result, '12345');\n});",
1550
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n hash: '12345'\n });\n })\n });\n const result = yield device.getHash();\n assert.strictEqual(result, '12345');\n});",
1551
1551
  "err": {},
1552
- "uuid": "9c2d9b48-da9e-405a-ad11-f717c6213db2",
1553
- "parentUUID": "20d8e428-2e50-4727-9ea7-ff357c4a7581",
1552
+ "uuid": "aea889ca-1c6a-4706-a99f-e194ccfa3dd5",
1553
+ "parentUUID": "37144f6c-914b-41f1-963d-4e00c89a895f",
1554
1554
  "isHook": false,
1555
1555
  "skipped": false
1556
1556
  }
1557
1557
  ],
1558
1558
  "suites": [],
1559
1559
  "passes": [
1560
- "9c2d9b48-da9e-405a-ad11-f717c6213db2"
1560
+ "aea889ca-1c6a-4706-a99f-e194ccfa3dd5"
1561
1561
  ],
1562
1562
  "failures": [],
1563
1563
  "pending": [],
1564
1564
  "skipped": [],
1565
- "duration": 2,
1565
+ "duration": 1,
1566
1566
  "root": false,
1567
1567
  "rootEmpty": false,
1568
1568
  "_timeout": 2000
1569
1569
  },
1570
1570
  {
1571
- "uuid": "bab1c740-c4c0-4877-9624-c19c0df192b5",
1571
+ "uuid": "e7d4b94e-411d-4ea2-b545-0e518093b199",
1572
1572
  "title": "getMediaType()",
1573
1573
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1574
1574
  "file": "/test/device.ts",
@@ -1579,35 +1579,35 @@
1579
1579
  "title": "should work",
1580
1580
  "fullTitle": "NodePyATVDevice getMediaType() should work",
1581
1581
  "timedOut": false,
1582
- "duration": 2,
1582
+ "duration": 1,
1583
1583
  "state": "passed",
1584
1584
  "speed": "fast",
1585
1585
  "pass": true,
1586
1586
  "fail": false,
1587
1587
  "pending": false,
1588
1588
  "context": null,
1589
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n media_type: 'video'\n });\n })\n });\n const result = yield device.getMediaType();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVMediaType.video);\n assert_1.default.deepStrictEqual(result, 'video');\n});",
1589
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n media_type: 'video'\n });\n })\n });\n const result = yield device.getMediaType();\n assert.deepStrictEqual(result, NodePyATVMediaType.video);\n assert.deepStrictEqual(result, 'video');\n});",
1590
1590
  "err": {},
1591
- "uuid": "c211add0-6352-4a26-b73f-05a862e91736",
1592
- "parentUUID": "bab1c740-c4c0-4877-9624-c19c0df192b5",
1591
+ "uuid": "181eaca1-f540-4ba3-9265-aa6083fcc410",
1592
+ "parentUUID": "e7d4b94e-411d-4ea2-b545-0e518093b199",
1593
1593
  "isHook": false,
1594
1594
  "skipped": false
1595
1595
  }
1596
1596
  ],
1597
1597
  "suites": [],
1598
1598
  "passes": [
1599
- "c211add0-6352-4a26-b73f-05a862e91736"
1599
+ "181eaca1-f540-4ba3-9265-aa6083fcc410"
1600
1600
  ],
1601
1601
  "failures": [],
1602
1602
  "pending": [],
1603
1603
  "skipped": [],
1604
- "duration": 2,
1604
+ "duration": 1,
1605
1605
  "root": false,
1606
1606
  "rootEmpty": false,
1607
1607
  "_timeout": 2000
1608
1608
  },
1609
1609
  {
1610
- "uuid": "cbe83c0e-92ea-4163-a4b7-2e4bd5091f6d",
1610
+ "uuid": "421840d1-8639-4508-9fd9-acbc2f10cf27",
1611
1611
  "title": "getDeviceState()",
1612
1612
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1613
1613
  "file": "/test/device.ts",
@@ -1625,17 +1625,17 @@
1625
1625
  "fail": false,
1626
1626
  "pending": false,
1627
1627
  "context": null,
1628
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n device_state: 'seeking'\n });\n })\n });\n const result = yield device.getDeviceState();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVDeviceState.seeking);\n assert_1.default.deepStrictEqual(result, 'seeking');\n});",
1628
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n device_state: 'seeking'\n });\n })\n });\n const result = yield device.getDeviceState();\n assert.deepStrictEqual(result, NodePyATVDeviceState.seeking);\n assert.deepStrictEqual(result, 'seeking');\n});",
1629
1629
  "err": {},
1630
- "uuid": "f09ed954-ebf1-4b5d-ad46-02d48a7b7ad4",
1631
- "parentUUID": "cbe83c0e-92ea-4163-a4b7-2e4bd5091f6d",
1630
+ "uuid": "dee1a7a9-2450-44e1-ba01-564cc2da5e13",
1631
+ "parentUUID": "421840d1-8639-4508-9fd9-acbc2f10cf27",
1632
1632
  "isHook": false,
1633
1633
  "skipped": false
1634
1634
  }
1635
1635
  ],
1636
1636
  "suites": [],
1637
1637
  "passes": [
1638
- "f09ed954-ebf1-4b5d-ad46-02d48a7b7ad4"
1638
+ "dee1a7a9-2450-44e1-ba01-564cc2da5e13"
1639
1639
  ],
1640
1640
  "failures": [],
1641
1641
  "pending": [],
@@ -1646,7 +1646,7 @@
1646
1646
  "_timeout": 2000
1647
1647
  },
1648
1648
  {
1649
- "uuid": "ebab9060-740b-4800-a3d1-ab26dc2e3c21",
1649
+ "uuid": "20211105-0b51-4da0-93bd-73f5141e9287",
1650
1650
  "title": "getTitle()",
1651
1651
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1652
1652
  "file": "/test/device.ts",
@@ -1664,17 +1664,17 @@
1664
1664
  "fail": false,
1665
1665
  "pending": false,
1666
1666
  "context": null,
1667
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const result = yield device.getTitle();\n assert_1.default.strictEqual(result, 'My Movie');\n});",
1667
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const result = yield device.getTitle();\n assert.strictEqual(result, 'My Movie');\n});",
1668
1668
  "err": {},
1669
- "uuid": "2ca02977-4167-4701-8c27-db7b5da56ef9",
1670
- "parentUUID": "ebab9060-740b-4800-a3d1-ab26dc2e3c21",
1669
+ "uuid": "fc12c7f2-2be4-4205-8c27-c72f4ea5341c",
1670
+ "parentUUID": "20211105-0b51-4da0-93bd-73f5141e9287",
1671
1671
  "isHook": false,
1672
1672
  "skipped": false
1673
1673
  }
1674
1674
  ],
1675
1675
  "suites": [],
1676
1676
  "passes": [
1677
- "2ca02977-4167-4701-8c27-db7b5da56ef9"
1677
+ "fc12c7f2-2be4-4205-8c27-c72f4ea5341c"
1678
1678
  ],
1679
1679
  "failures": [],
1680
1680
  "pending": [],
@@ -1685,7 +1685,7 @@
1685
1685
  "_timeout": 2000
1686
1686
  },
1687
1687
  {
1688
- "uuid": "de7f4830-1ab8-4fb0-9d08-8707b9487e3d",
1688
+ "uuid": "f33d8973-d3af-4136-abac-79ccce02f369",
1689
1689
  "title": "getArtist()",
1690
1690
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1691
1691
  "file": "/test/device.ts",
@@ -1696,35 +1696,35 @@
1696
1696
  "title": "should work",
1697
1697
  "fullTitle": "NodePyATVDevice getArtist() should work",
1698
1698
  "timedOut": false,
1699
- "duration": 2,
1699
+ "duration": 1,
1700
1700
  "state": "passed",
1701
1701
  "speed": "fast",
1702
1702
  "pass": true,
1703
1703
  "fail": false,
1704
1704
  "pending": false,
1705
1705
  "context": null,
1706
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n artist: 'My Artist'\n });\n })\n });\n const result = yield device.getArtist();\n assert_1.default.strictEqual(result, 'My Artist');\n});",
1706
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n artist: 'My Artist'\n });\n })\n });\n const result = yield device.getArtist();\n assert.strictEqual(result, 'My Artist');\n});",
1707
1707
  "err": {},
1708
- "uuid": "9e3f4ecf-6e95-43f9-bcfa-50684cf103af",
1709
- "parentUUID": "de7f4830-1ab8-4fb0-9d08-8707b9487e3d",
1708
+ "uuid": "6884e45b-10a0-4644-b38e-34ccf42526ac",
1709
+ "parentUUID": "f33d8973-d3af-4136-abac-79ccce02f369",
1710
1710
  "isHook": false,
1711
1711
  "skipped": false
1712
1712
  }
1713
1713
  ],
1714
1714
  "suites": [],
1715
1715
  "passes": [
1716
- "9e3f4ecf-6e95-43f9-bcfa-50684cf103af"
1716
+ "6884e45b-10a0-4644-b38e-34ccf42526ac"
1717
1717
  ],
1718
1718
  "failures": [],
1719
1719
  "pending": [],
1720
1720
  "skipped": [],
1721
- "duration": 2,
1721
+ "duration": 1,
1722
1722
  "root": false,
1723
1723
  "rootEmpty": false,
1724
1724
  "_timeout": 2000
1725
1725
  },
1726
1726
  {
1727
- "uuid": "5e480820-9ebe-460c-bf62-45d505914006",
1727
+ "uuid": "60c9f8f8-15b4-459f-b6d1-e2f0a3014ed9",
1728
1728
  "title": "getAlbum()",
1729
1729
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1730
1730
  "file": "/test/device.ts",
@@ -1742,17 +1742,17 @@
1742
1742
  "fail": false,
1743
1743
  "pending": false,
1744
1744
  "context": null,
1745
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n album: 'My ALbum'\n });\n })\n });\n const result = yield device.getAlbum();\n assert_1.default.strictEqual(result, 'My ALbum');\n});",
1745
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n album: 'My ALbum'\n });\n })\n });\n const result = yield device.getAlbum();\n assert.strictEqual(result, 'My ALbum');\n});",
1746
1746
  "err": {},
1747
- "uuid": "1ad1dc46-ad66-4841-a5c2-819e981504b2",
1748
- "parentUUID": "5e480820-9ebe-460c-bf62-45d505914006",
1747
+ "uuid": "7bb3cc9c-ac60-4901-9601-f3a5108b53fd",
1748
+ "parentUUID": "60c9f8f8-15b4-459f-b6d1-e2f0a3014ed9",
1749
1749
  "isHook": false,
1750
1750
  "skipped": false
1751
1751
  }
1752
1752
  ],
1753
1753
  "suites": [],
1754
1754
  "passes": [
1755
- "1ad1dc46-ad66-4841-a5c2-819e981504b2"
1755
+ "7bb3cc9c-ac60-4901-9601-f3a5108b53fd"
1756
1756
  ],
1757
1757
  "failures": [],
1758
1758
  "pending": [],
@@ -1763,7 +1763,7 @@
1763
1763
  "_timeout": 2000
1764
1764
  },
1765
1765
  {
1766
- "uuid": "fb8745e6-6781-4eb0-9cc9-4ba3480503b9",
1766
+ "uuid": "50c5b95d-9c98-415f-93d0-5b57499b84d2",
1767
1767
  "title": "getGenre()",
1768
1768
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1769
1769
  "file": "/test/device.ts",
@@ -1774,35 +1774,35 @@
1774
1774
  "title": "should work",
1775
1775
  "fullTitle": "NodePyATVDevice getGenre() should work",
1776
1776
  "timedOut": false,
1777
- "duration": 2,
1777
+ "duration": 1,
1778
1778
  "state": "passed",
1779
1779
  "speed": "fast",
1780
1780
  "pass": true,
1781
1781
  "fail": false,
1782
1782
  "pending": false,
1783
1783
  "context": null,
1784
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n genre: 'My Genre'\n });\n })\n });\n const result = yield device.getGenre();\n assert_1.default.strictEqual(result, 'My Genre');\n});",
1784
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n genre: 'My Genre'\n });\n })\n });\n const result = yield device.getGenre();\n assert.strictEqual(result, 'My Genre');\n});",
1785
1785
  "err": {},
1786
- "uuid": "3b2143a3-423b-4cea-a466-3804dd7218d4",
1787
- "parentUUID": "fb8745e6-6781-4eb0-9cc9-4ba3480503b9",
1786
+ "uuid": "1f903f73-19dc-4ba9-834d-1204bee31b81",
1787
+ "parentUUID": "50c5b95d-9c98-415f-93d0-5b57499b84d2",
1788
1788
  "isHook": false,
1789
1789
  "skipped": false
1790
1790
  }
1791
1791
  ],
1792
1792
  "suites": [],
1793
1793
  "passes": [
1794
- "3b2143a3-423b-4cea-a466-3804dd7218d4"
1794
+ "1f903f73-19dc-4ba9-834d-1204bee31b81"
1795
1795
  ],
1796
1796
  "failures": [],
1797
1797
  "pending": [],
1798
1798
  "skipped": [],
1799
- "duration": 2,
1799
+ "duration": 1,
1800
1800
  "root": false,
1801
1801
  "rootEmpty": false,
1802
1802
  "_timeout": 2000
1803
1803
  },
1804
1804
  {
1805
- "uuid": "b4ab54c8-eb5a-4c27-b0a9-684581c8a689",
1805
+ "uuid": "a4b1902c-171e-43ac-8662-ed66f816693f",
1806
1806
  "title": "getTotalTime()",
1807
1807
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1808
1808
  "file": "/test/device.ts",
@@ -1813,35 +1813,35 @@
1813
1813
  "title": "should work",
1814
1814
  "fullTitle": "NodePyATVDevice getTotalTime() should work",
1815
1815
  "timedOut": false,
1816
- "duration": 2,
1816
+ "duration": 0,
1817
1817
  "state": "passed",
1818
1818
  "speed": "fast",
1819
1819
  "pass": true,
1820
1820
  "fail": false,
1821
1821
  "pending": false,
1822
1822
  "context": null,
1823
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n total_time: 45\n });\n })\n });\n const result = yield device.getTotalTime();\n assert_1.default.strictEqual(result, 45);\n});",
1823
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n total_time: 45\n });\n })\n });\n const result = yield device.getTotalTime();\n assert.strictEqual(result, 45);\n});",
1824
1824
  "err": {},
1825
- "uuid": "6f390023-c389-4f88-8f8e-c08da60ef397",
1826
- "parentUUID": "b4ab54c8-eb5a-4c27-b0a9-684581c8a689",
1825
+ "uuid": "665d1d50-c44c-4226-9259-0976ca5b649b",
1826
+ "parentUUID": "a4b1902c-171e-43ac-8662-ed66f816693f",
1827
1827
  "isHook": false,
1828
1828
  "skipped": false
1829
1829
  }
1830
1830
  ],
1831
1831
  "suites": [],
1832
1832
  "passes": [
1833
- "6f390023-c389-4f88-8f8e-c08da60ef397"
1833
+ "665d1d50-c44c-4226-9259-0976ca5b649b"
1834
1834
  ],
1835
1835
  "failures": [],
1836
1836
  "pending": [],
1837
1837
  "skipped": [],
1838
- "duration": 2,
1838
+ "duration": 0,
1839
1839
  "root": false,
1840
1840
  "rootEmpty": false,
1841
1841
  "_timeout": 2000
1842
1842
  },
1843
1843
  {
1844
- "uuid": "9be1e77e-0437-43a7-a8f8-483d62bc0eda",
1844
+ "uuid": "6bae371f-4724-4f0e-90ed-5d14a01827f8",
1845
1845
  "title": "getPosition()",
1846
1846
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1847
1847
  "file": "/test/device.ts",
@@ -1852,35 +1852,35 @@
1852
1852
  "title": "should work",
1853
1853
  "fullTitle": "NodePyATVDevice getPosition() should work",
1854
1854
  "timedOut": false,
1855
- "duration": 2,
1855
+ "duration": 0,
1856
1856
  "state": "passed",
1857
1857
  "speed": "fast",
1858
1858
  "pass": true,
1859
1859
  "fail": false,
1860
1860
  "pending": false,
1861
1861
  "context": null,
1862
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n position: 30\n });\n })\n });\n const result = yield device.getPosition();\n assert_1.default.strictEqual(result, 30);\n});",
1862
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n position: 30\n });\n })\n });\n const result = yield device.getPosition();\n assert.strictEqual(result, 30);\n});",
1863
1863
  "err": {},
1864
- "uuid": "9e212174-df3f-4e14-b7b6-14af626a1e53",
1865
- "parentUUID": "9be1e77e-0437-43a7-a8f8-483d62bc0eda",
1864
+ "uuid": "4635de02-dad3-4e9b-b2e8-281b5303661c",
1865
+ "parentUUID": "6bae371f-4724-4f0e-90ed-5d14a01827f8",
1866
1866
  "isHook": false,
1867
1867
  "skipped": false
1868
1868
  }
1869
1869
  ],
1870
1870
  "suites": [],
1871
1871
  "passes": [
1872
- "9e212174-df3f-4e14-b7b6-14af626a1e53"
1872
+ "4635de02-dad3-4e9b-b2e8-281b5303661c"
1873
1873
  ],
1874
1874
  "failures": [],
1875
1875
  "pending": [],
1876
1876
  "skipped": [],
1877
- "duration": 2,
1877
+ "duration": 0,
1878
1878
  "root": false,
1879
1879
  "rootEmpty": false,
1880
1880
  "_timeout": 2000
1881
1881
  },
1882
1882
  {
1883
- "uuid": "79c740f9-7ff6-479c-9dbe-64f96d0a0485",
1883
+ "uuid": "eb6ee3bb-3576-4bcb-8388-f31efc3f28d3",
1884
1884
  "title": "getShuffle()",
1885
1885
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1886
1886
  "file": "/test/device.ts",
@@ -1898,17 +1898,17 @@
1898
1898
  "fail": false,
1899
1899
  "pending": false,
1900
1900
  "context": null,
1901
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n shuffle: 'songs'\n });\n })\n });\n const result = yield device.getShuffle();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVShuffleState.songs);\n assert_1.default.deepStrictEqual(result, 'songs');\n});",
1901
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n shuffle: 'songs'\n });\n })\n });\n const result = yield device.getShuffle();\n assert.deepStrictEqual(result, NodePyATVShuffleState.songs);\n assert.deepStrictEqual(result, 'songs');\n});",
1902
1902
  "err": {},
1903
- "uuid": "8461a332-8818-424d-b4a9-f2d8cccefe43",
1904
- "parentUUID": "79c740f9-7ff6-479c-9dbe-64f96d0a0485",
1903
+ "uuid": "bb820044-4ed5-4967-9a3f-ae5152946480",
1904
+ "parentUUID": "eb6ee3bb-3576-4bcb-8388-f31efc3f28d3",
1905
1905
  "isHook": false,
1906
1906
  "skipped": false
1907
1907
  }
1908
1908
  ],
1909
1909
  "suites": [],
1910
1910
  "passes": [
1911
- "8461a332-8818-424d-b4a9-f2d8cccefe43"
1911
+ "bb820044-4ed5-4967-9a3f-ae5152946480"
1912
1912
  ],
1913
1913
  "failures": [],
1914
1914
  "pending": [],
@@ -1919,7 +1919,7 @@
1919
1919
  "_timeout": 2000
1920
1920
  },
1921
1921
  {
1922
- "uuid": "d5c22420-87cf-4055-bca9-e8a701648060",
1922
+ "uuid": "b68e0a14-7cf2-4158-b690-05fc11905498",
1923
1923
  "title": "getRepeat()",
1924
1924
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1925
1925
  "file": "/test/device.ts",
@@ -1937,17 +1937,17 @@
1937
1937
  "fail": false,
1938
1938
  "pending": false,
1939
1939
  "context": null,
1940
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n repeat: 'all'\n });\n })\n });\n const result = yield device.getRepeat();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVRepeatState.all);\n assert_1.default.deepStrictEqual(result, 'all');\n});",
1940
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n repeat: 'all'\n });\n })\n });\n const result = yield device.getRepeat();\n assert.deepStrictEqual(result, NodePyATVRepeatState.all);\n assert.deepStrictEqual(result, 'all');\n});",
1941
1941
  "err": {},
1942
- "uuid": "d0aa110f-0657-4d31-9692-bc9a1ca091a4",
1943
- "parentUUID": "d5c22420-87cf-4055-bca9-e8a701648060",
1942
+ "uuid": "38d8f4ae-700f-466b-a23a-24729490c213",
1943
+ "parentUUID": "b68e0a14-7cf2-4158-b690-05fc11905498",
1944
1944
  "isHook": false,
1945
1945
  "skipped": false
1946
1946
  }
1947
1947
  ],
1948
1948
  "suites": [],
1949
1949
  "passes": [
1950
- "d0aa110f-0657-4d31-9692-bc9a1ca091a4"
1950
+ "38d8f4ae-700f-466b-a23a-24729490c213"
1951
1951
  ],
1952
1952
  "failures": [],
1953
1953
  "pending": [],
@@ -1958,7 +1958,7 @@
1958
1958
  "_timeout": 2000
1959
1959
  },
1960
1960
  {
1961
- "uuid": "0807de1e-fcd0-422c-9d7a-5e3ec30bc861",
1961
+ "uuid": "91fb5aa1-d4be-446d-a2a2-06097bfda498",
1962
1962
  "title": "getApp()",
1963
1963
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
1964
1964
  "file": "/test/device.ts",
@@ -1976,17 +1976,17 @@
1976
1976
  "fail": false,
1977
1977
  "pending": false,
1978
1978
  "context": null,
1979
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n app: 'My App'\n });\n })\n });\n const result = yield device.getApp();\n assert_1.default.strictEqual(result, 'My App');\n});",
1979
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n app: 'My App'\n });\n })\n });\n const result = yield device.getApp();\n assert.strictEqual(result, 'My App');\n});",
1980
1980
  "err": {},
1981
- "uuid": "e0b9728f-d829-4a81-a4f3-ce594a6a78be",
1982
- "parentUUID": "0807de1e-fcd0-422c-9d7a-5e3ec30bc861",
1981
+ "uuid": "25a318bb-dd24-48fc-b69e-018e74e43d75",
1982
+ "parentUUID": "91fb5aa1-d4be-446d-a2a2-06097bfda498",
1983
1983
  "isHook": false,
1984
1984
  "skipped": false
1985
1985
  }
1986
1986
  ],
1987
1987
  "suites": [],
1988
1988
  "passes": [
1989
- "e0b9728f-d829-4a81-a4f3-ce594a6a78be"
1989
+ "25a318bb-dd24-48fc-b69e-018e74e43d75"
1990
1990
  ],
1991
1991
  "failures": [],
1992
1992
  "pending": [],
@@ -1997,7 +1997,7 @@
1997
1997
  "_timeout": 2000
1998
1998
  },
1999
1999
  {
2000
- "uuid": "b7b56184-f269-4ef2-9b4c-8d36473b2958",
2000
+ "uuid": "7e126e75-62ab-4caa-beb6-118278b92ce8",
2001
2001
  "title": "getAppId()",
2002
2002
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2003
2003
  "file": "/test/device.ts",
@@ -2008,35 +2008,35 @@
2008
2008
  "title": "should work",
2009
2009
  "fullTitle": "NodePyATVDevice getAppId() should work",
2010
2010
  "timedOut": false,
2011
- "duration": 2,
2011
+ "duration": 1,
2012
2012
  "state": "passed",
2013
2013
  "speed": "fast",
2014
2014
  "pass": true,
2015
2015
  "fail": false,
2016
2016
  "pending": false,
2017
2017
  "context": null,
2018
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n app_id: 'app.example.com'\n });\n })\n });\n const result = yield device.getAppId();\n assert_1.default.strictEqual(result, 'app.example.com');\n});",
2018
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end({\n result: 'success',\n app_id: 'app.example.com'\n });\n })\n });\n const result = yield device.getAppId();\n assert.strictEqual(result, 'app.example.com');\n});",
2019
2019
  "err": {},
2020
- "uuid": "6c93917e-0ca1-4ae9-bf65-7c03dda9b866",
2021
- "parentUUID": "b7b56184-f269-4ef2-9b4c-8d36473b2958",
2020
+ "uuid": "56775df8-53da-4bd9-ad00-b6f196681aef",
2021
+ "parentUUID": "7e126e75-62ab-4caa-beb6-118278b92ce8",
2022
2022
  "isHook": false,
2023
2023
  "skipped": false
2024
2024
  }
2025
2025
  ],
2026
2026
  "suites": [],
2027
2027
  "passes": [
2028
- "6c93917e-0ca1-4ae9-bf65-7c03dda9b866"
2028
+ "56775df8-53da-4bd9-ad00-b6f196681aef"
2029
2029
  ],
2030
2030
  "failures": [],
2031
2031
  "pending": [],
2032
2032
  "skipped": [],
2033
- "duration": 2,
2033
+ "duration": 1,
2034
2034
  "root": false,
2035
2035
  "rootEmpty": false,
2036
2036
  "_timeout": 2000
2037
2037
  },
2038
2038
  {
2039
- "uuid": "7866ce28-20ab-40f5-b400-66200568e51b",
2039
+ "uuid": "8ee61ee0-0153-4941-95ad-108931d838d4",
2040
2040
  "title": "pressKey()",
2041
2041
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2042
2042
  "file": "/test/device.ts",
@@ -2054,10 +2054,10 @@
2054
2054
  "fail": false,
2055
2055
  "pending": false,
2056
2056
  "context": null,
2057
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n yield device.pressKey(types_1.NodePyATVKeys.home);\n});",
2057
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n yield device.pressKey(NodePyATVKeys.home);\n});",
2058
2058
  "err": {},
2059
- "uuid": "ca3cb6c3-9160-44fe-ad46-ae985515e621",
2060
- "parentUUID": "7866ce28-20ab-40f5-b400-66200568e51b",
2059
+ "uuid": "88306b09-499c-4bbc-a543-d00b4b87ad4f",
2060
+ "parentUUID": "8ee61ee0-0153-4941-95ad-108931d838d4",
2061
2061
  "isHook": false,
2062
2062
  "skipped": false
2063
2063
  },
@@ -2072,10 +2072,10 @@
2072
2072
  "fail": false,
2073
2073
  "pending": false,
2074
2074
  "context": null,
2075
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n // @ts-ignore\n yield device.pressKey('foo');\n }), /Unsupported key value foo/);\n});",
2075
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2'\n });\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n // @ts-ignore\n yield device.pressKey('foo');\n }), /Unsupported key value foo/);\n});",
2076
2076
  "err": {},
2077
- "uuid": "a0a1ba6f-f19a-492a-b2a8-89470965707c",
2078
- "parentUUID": "7866ce28-20ab-40f5-b400-66200568e51b",
2077
+ "uuid": "132d3fec-a5d5-4b66-ae2f-eb3f07923ad5",
2078
+ "parentUUID": "8ee61ee0-0153-4941-95ad-108931d838d4",
2079
2079
  "isHook": false,
2080
2080
  "skipped": false
2081
2081
  },
@@ -2090,19 +2090,19 @@
2090
2090
  "fail": false,
2091
2091
  "pending": false,
2092
2092
  "context": null,
2093
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"failure\"}');\n })\n });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield device.pressKey(types_1.NodePyATVKeys.home);\n }), /Unable to parse pyatv response/);\n});",
2093
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"failure\"}');\n })\n });\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield device.pressKey(NodePyATVKeys.home);\n }), /Unable to parse pyatv response/);\n});",
2094
2094
  "err": {},
2095
- "uuid": "733186be-6425-47e0-b680-da18307679e5",
2096
- "parentUUID": "7866ce28-20ab-40f5-b400-66200568e51b",
2095
+ "uuid": "aa61d126-29ec-4750-8ffc-f7901a1540cf",
2096
+ "parentUUID": "8ee61ee0-0153-4941-95ad-108931d838d4",
2097
2097
  "isHook": false,
2098
2098
  "skipped": false
2099
2099
  }
2100
2100
  ],
2101
2101
  "suites": [],
2102
2102
  "passes": [
2103
- "ca3cb6c3-9160-44fe-ad46-ae985515e621",
2104
- "a0a1ba6f-f19a-492a-b2a8-89470965707c",
2105
- "733186be-6425-47e0-b680-da18307679e5"
2103
+ "88306b09-499c-4bbc-a543-d00b4b87ad4f",
2104
+ "132d3fec-a5d5-4b66-ae2f-eb3f07923ad5",
2105
+ "aa61d126-29ec-4750-8ffc-f7901a1540cf"
2106
2106
  ],
2107
2107
  "failures": [],
2108
2108
  "pending": [],
@@ -2113,7 +2113,7 @@
2113
2113
  "_timeout": 2000
2114
2114
  },
2115
2115
  {
2116
- "uuid": "604ccb47-9e6b-4de8-93c6-644d20bb0acd",
2116
+ "uuid": "b030ddc7-50e4-4674-92c2-1c9e94a65cc8",
2117
2117
  "title": "down()",
2118
2118
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2119
2119
  "file": "/test/device.ts",
@@ -2124,35 +2124,35 @@
2124
2124
  "title": "should work",
2125
2125
  "fullTitle": "NodePyATVDevice down() should work",
2126
2126
  "timedOut": false,
2127
- "duration": 1,
2127
+ "duration": 2,
2128
2128
  "state": "passed",
2129
2129
  "speed": "fast",
2130
2130
  "pass": true,
2131
2131
  "fail": false,
2132
2132
  "pending": false,
2133
2133
  "context": null,
2134
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2134
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2135
2135
  "err": {},
2136
- "uuid": "6618148b-e742-4b04-a27a-d2a80885ff90",
2137
- "parentUUID": "604ccb47-9e6b-4de8-93c6-644d20bb0acd",
2136
+ "uuid": "61c047c1-8c0d-4d1e-88ae-3fba5fdc827b",
2137
+ "parentUUID": "b030ddc7-50e4-4674-92c2-1c9e94a65cc8",
2138
2138
  "isHook": false,
2139
2139
  "skipped": false
2140
2140
  }
2141
2141
  ],
2142
2142
  "suites": [],
2143
2143
  "passes": [
2144
- "6618148b-e742-4b04-a27a-d2a80885ff90"
2144
+ "61c047c1-8c0d-4d1e-88ae-3fba5fdc827b"
2145
2145
  ],
2146
2146
  "failures": [],
2147
2147
  "pending": [],
2148
2148
  "skipped": [],
2149
- "duration": 1,
2149
+ "duration": 2,
2150
2150
  "root": false,
2151
2151
  "rootEmpty": false,
2152
2152
  "_timeout": 2000
2153
2153
  },
2154
2154
  {
2155
- "uuid": "697a851f-e7ae-490f-bd01-3791a913a450",
2155
+ "uuid": "5fb0f1fe-4e12-4ae4-bf3c-6b447f7b6cda",
2156
2156
  "title": "home()",
2157
2157
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2158
2158
  "file": "/test/device.ts",
@@ -2163,35 +2163,35 @@
2163
2163
  "title": "should work",
2164
2164
  "fullTitle": "NodePyATVDevice home() should work",
2165
2165
  "timedOut": false,
2166
- "duration": 1,
2166
+ "duration": 2,
2167
2167
  "state": "passed",
2168
2168
  "speed": "fast",
2169
2169
  "pass": true,
2170
2170
  "fail": false,
2171
2171
  "pending": false,
2172
2172
  "context": null,
2173
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2173
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2174
2174
  "err": {},
2175
- "uuid": "f5a6e8f3-e62f-4e12-af83-b89d80511467",
2176
- "parentUUID": "697a851f-e7ae-490f-bd01-3791a913a450",
2175
+ "uuid": "b5119016-00fe-4cc2-9ead-30e4db8961ec",
2176
+ "parentUUID": "5fb0f1fe-4e12-4ae4-bf3c-6b447f7b6cda",
2177
2177
  "isHook": false,
2178
2178
  "skipped": false
2179
2179
  }
2180
2180
  ],
2181
2181
  "suites": [],
2182
2182
  "passes": [
2183
- "f5a6e8f3-e62f-4e12-af83-b89d80511467"
2183
+ "b5119016-00fe-4cc2-9ead-30e4db8961ec"
2184
2184
  ],
2185
2185
  "failures": [],
2186
2186
  "pending": [],
2187
2187
  "skipped": [],
2188
- "duration": 1,
2188
+ "duration": 2,
2189
2189
  "root": false,
2190
2190
  "rootEmpty": false,
2191
2191
  "_timeout": 2000
2192
2192
  },
2193
2193
  {
2194
- "uuid": "d8bf5cd5-8e99-436f-aa0c-65f70b799ce3",
2194
+ "uuid": "0bf0d2df-9f9a-49a0-8745-fd2d54b38619",
2195
2195
  "title": "homeHold()",
2196
2196
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2197
2197
  "file": "/test/device.ts",
@@ -2209,17 +2209,17 @@
2209
2209
  "fail": false,
2210
2210
  "pending": false,
2211
2211
  "context": null,
2212
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2212
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2213
2213
  "err": {},
2214
- "uuid": "1d4169c0-d0cc-4455-8d2d-46a1ae9a0a38",
2215
- "parentUUID": "d8bf5cd5-8e99-436f-aa0c-65f70b799ce3",
2214
+ "uuid": "4637d6c9-5fd3-447c-aaa2-46c2d14380e0",
2215
+ "parentUUID": "0bf0d2df-9f9a-49a0-8745-fd2d54b38619",
2216
2216
  "isHook": false,
2217
2217
  "skipped": false
2218
2218
  }
2219
2219
  ],
2220
2220
  "suites": [],
2221
2221
  "passes": [
2222
- "1d4169c0-d0cc-4455-8d2d-46a1ae9a0a38"
2222
+ "4637d6c9-5fd3-447c-aaa2-46c2d14380e0"
2223
2223
  ],
2224
2224
  "failures": [],
2225
2225
  "pending": [],
@@ -2230,7 +2230,7 @@
2230
2230
  "_timeout": 2000
2231
2231
  },
2232
2232
  {
2233
- "uuid": "24eaa2f6-1bc5-4008-a0a9-5cdbc9c37997",
2233
+ "uuid": "2269d42d-d13b-46c2-80e6-24e04b53a76e",
2234
2234
  "title": "left()",
2235
2235
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2236
2236
  "file": "/test/device.ts",
@@ -2248,17 +2248,17 @@
2248
2248
  "fail": false,
2249
2249
  "pending": false,
2250
2250
  "context": null,
2251
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2251
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2252
2252
  "err": {},
2253
- "uuid": "2ae9159c-41d2-42c5-b6b7-ceed3e14c12c",
2254
- "parentUUID": "24eaa2f6-1bc5-4008-a0a9-5cdbc9c37997",
2253
+ "uuid": "b64a65c0-02e5-4c42-b98d-60210b4e215c",
2254
+ "parentUUID": "2269d42d-d13b-46c2-80e6-24e04b53a76e",
2255
2255
  "isHook": false,
2256
2256
  "skipped": false
2257
2257
  }
2258
2258
  ],
2259
2259
  "suites": [],
2260
2260
  "passes": [
2261
- "2ae9159c-41d2-42c5-b6b7-ceed3e14c12c"
2261
+ "b64a65c0-02e5-4c42-b98d-60210b4e215c"
2262
2262
  ],
2263
2263
  "failures": [],
2264
2264
  "pending": [],
@@ -2269,7 +2269,7 @@
2269
2269
  "_timeout": 2000
2270
2270
  },
2271
2271
  {
2272
- "uuid": "0c6b8558-5da9-4b11-b006-6206b4bc3853",
2272
+ "uuid": "a826abaf-cbb6-47d6-bc20-b1064666cd84",
2273
2273
  "title": "menu()",
2274
2274
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2275
2275
  "file": "/test/device.ts",
@@ -2280,35 +2280,35 @@
2280
2280
  "title": "should work",
2281
2281
  "fullTitle": "NodePyATVDevice menu() should work",
2282
2282
  "timedOut": false,
2283
- "duration": 2,
2283
+ "duration": 1,
2284
2284
  "state": "passed",
2285
2285
  "speed": "fast",
2286
2286
  "pass": true,
2287
2287
  "fail": false,
2288
2288
  "pending": false,
2289
2289
  "context": null,
2290
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2290
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2291
2291
  "err": {},
2292
- "uuid": "510bf419-baa1-4d03-ad21-36f00edca9f1",
2293
- "parentUUID": "0c6b8558-5da9-4b11-b006-6206b4bc3853",
2292
+ "uuid": "f72358a9-d4a5-4625-a635-0fa3f9cbcf5e",
2293
+ "parentUUID": "a826abaf-cbb6-47d6-bc20-b1064666cd84",
2294
2294
  "isHook": false,
2295
2295
  "skipped": false
2296
2296
  }
2297
2297
  ],
2298
2298
  "suites": [],
2299
2299
  "passes": [
2300
- "510bf419-baa1-4d03-ad21-36f00edca9f1"
2300
+ "f72358a9-d4a5-4625-a635-0fa3f9cbcf5e"
2301
2301
  ],
2302
2302
  "failures": [],
2303
2303
  "pending": [],
2304
2304
  "skipped": [],
2305
- "duration": 2,
2305
+ "duration": 1,
2306
2306
  "root": false,
2307
2307
  "rootEmpty": false,
2308
2308
  "_timeout": 2000
2309
2309
  },
2310
2310
  {
2311
- "uuid": "862e3d95-24fd-4ee9-8045-869027bc3f4e",
2311
+ "uuid": "48718a16-28be-42d1-9723-ec4a99bd8543",
2312
2312
  "title": "next()",
2313
2313
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2314
2314
  "file": "/test/device.ts",
@@ -2326,17 +2326,17 @@
2326
2326
  "fail": false,
2327
2327
  "pending": false,
2328
2328
  "context": null,
2329
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2329
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2330
2330
  "err": {},
2331
- "uuid": "766d1d9b-928f-4d10-9f7b-7c3f538ebd29",
2332
- "parentUUID": "862e3d95-24fd-4ee9-8045-869027bc3f4e",
2331
+ "uuid": "6e622b58-0496-4025-8af3-e128d6fce34a",
2332
+ "parentUUID": "48718a16-28be-42d1-9723-ec4a99bd8543",
2333
2333
  "isHook": false,
2334
2334
  "skipped": false
2335
2335
  }
2336
2336
  ],
2337
2337
  "suites": [],
2338
2338
  "passes": [
2339
- "766d1d9b-928f-4d10-9f7b-7c3f538ebd29"
2339
+ "6e622b58-0496-4025-8af3-e128d6fce34a"
2340
2340
  ],
2341
2341
  "failures": [],
2342
2342
  "pending": [],
@@ -2347,7 +2347,7 @@
2347
2347
  "_timeout": 2000
2348
2348
  },
2349
2349
  {
2350
- "uuid": "4546d0d5-0649-41cb-8d4e-eb6c68c43aaa",
2350
+ "uuid": "a9b71845-0074-4dcf-b899-3bca2e98fb36",
2351
2351
  "title": "pause()",
2352
2352
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2353
2353
  "file": "/test/device.ts",
@@ -2365,17 +2365,17 @@
2365
2365
  "fail": false,
2366
2366
  "pending": false,
2367
2367
  "context": null,
2368
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2368
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2369
2369
  "err": {},
2370
- "uuid": "5feb7db0-c7e6-45fa-9fc4-7500558ac60d",
2371
- "parentUUID": "4546d0d5-0649-41cb-8d4e-eb6c68c43aaa",
2370
+ "uuid": "eacbde27-183a-4abc-b948-3fb9aa9156b8",
2371
+ "parentUUID": "a9b71845-0074-4dcf-b899-3bca2e98fb36",
2372
2372
  "isHook": false,
2373
2373
  "skipped": false
2374
2374
  }
2375
2375
  ],
2376
2376
  "suites": [],
2377
2377
  "passes": [
2378
- "5feb7db0-c7e6-45fa-9fc4-7500558ac60d"
2378
+ "eacbde27-183a-4abc-b948-3fb9aa9156b8"
2379
2379
  ],
2380
2380
  "failures": [],
2381
2381
  "pending": [],
@@ -2386,7 +2386,7 @@
2386
2386
  "_timeout": 2000
2387
2387
  },
2388
2388
  {
2389
- "uuid": "892bce4b-8194-4bdb-97de-d96585feed3c",
2389
+ "uuid": "86947f44-415b-41cf-8760-f2ecb085c391",
2390
2390
  "title": "play()",
2391
2391
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2392
2392
  "file": "/test/device.ts",
@@ -2404,17 +2404,17 @@
2404
2404
  "fail": false,
2405
2405
  "pending": false,
2406
2406
  "context": null,
2407
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2407
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2408
2408
  "err": {},
2409
- "uuid": "7fbbce23-e13b-4b06-8c38-50c66ad89e70",
2410
- "parentUUID": "892bce4b-8194-4bdb-97de-d96585feed3c",
2409
+ "uuid": "656d7e26-7b80-4dc4-b41c-69822c12fc63",
2410
+ "parentUUID": "86947f44-415b-41cf-8760-f2ecb085c391",
2411
2411
  "isHook": false,
2412
2412
  "skipped": false
2413
2413
  }
2414
2414
  ],
2415
2415
  "suites": [],
2416
2416
  "passes": [
2417
- "7fbbce23-e13b-4b06-8c38-50c66ad89e70"
2417
+ "656d7e26-7b80-4dc4-b41c-69822c12fc63"
2418
2418
  ],
2419
2419
  "failures": [],
2420
2420
  "pending": [],
@@ -2425,7 +2425,7 @@
2425
2425
  "_timeout": 2000
2426
2426
  },
2427
2427
  {
2428
- "uuid": "fca0bd79-53ae-4f2c-8959-653ca7df5695",
2428
+ "uuid": "508018a1-aa64-421e-9c29-8845478a02b4",
2429
2429
  "title": "playPause()",
2430
2430
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2431
2431
  "file": "/test/device.ts",
@@ -2436,35 +2436,35 @@
2436
2436
  "title": "should work",
2437
2437
  "fullTitle": "NodePyATVDevice playPause() should work",
2438
2438
  "timedOut": false,
2439
- "duration": 1,
2439
+ "duration": 2,
2440
2440
  "state": "passed",
2441
2441
  "speed": "fast",
2442
2442
  "pass": true,
2443
2443
  "fail": false,
2444
2444
  "pending": false,
2445
2445
  "context": null,
2446
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2446
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2447
2447
  "err": {},
2448
- "uuid": "0602f466-7844-4e9c-a416-0a1785dc686e",
2449
- "parentUUID": "fca0bd79-53ae-4f2c-8959-653ca7df5695",
2448
+ "uuid": "fdd5da7b-d45f-4dc0-9347-67998f8f4f3b",
2449
+ "parentUUID": "508018a1-aa64-421e-9c29-8845478a02b4",
2450
2450
  "isHook": false,
2451
2451
  "skipped": false
2452
2452
  }
2453
2453
  ],
2454
2454
  "suites": [],
2455
2455
  "passes": [
2456
- "0602f466-7844-4e9c-a416-0a1785dc686e"
2456
+ "fdd5da7b-d45f-4dc0-9347-67998f8f4f3b"
2457
2457
  ],
2458
2458
  "failures": [],
2459
2459
  "pending": [],
2460
2460
  "skipped": [],
2461
- "duration": 1,
2461
+ "duration": 2,
2462
2462
  "root": false,
2463
2463
  "rootEmpty": false,
2464
2464
  "_timeout": 2000
2465
2465
  },
2466
2466
  {
2467
- "uuid": "28d50d50-6904-4578-bdac-ab3e25b8154a",
2467
+ "uuid": "402a2885-d021-4c8c-acaa-44243d58a880",
2468
2468
  "title": "previous()",
2469
2469
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2470
2470
  "file": "/test/device.ts",
@@ -2482,17 +2482,17 @@
2482
2482
  "fail": false,
2483
2483
  "pending": false,
2484
2484
  "context": null,
2485
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2485
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2486
2486
  "err": {},
2487
- "uuid": "f8f35324-12bd-4df9-9591-aa319a07e92a",
2488
- "parentUUID": "28d50d50-6904-4578-bdac-ab3e25b8154a",
2487
+ "uuid": "e667bced-ea49-48bd-af88-a89b9b8b8e49",
2488
+ "parentUUID": "402a2885-d021-4c8c-acaa-44243d58a880",
2489
2489
  "isHook": false,
2490
2490
  "skipped": false
2491
2491
  }
2492
2492
  ],
2493
2493
  "suites": [],
2494
2494
  "passes": [
2495
- "f8f35324-12bd-4df9-9591-aa319a07e92a"
2495
+ "e667bced-ea49-48bd-af88-a89b9b8b8e49"
2496
2496
  ],
2497
2497
  "failures": [],
2498
2498
  "pending": [],
@@ -2503,7 +2503,7 @@
2503
2503
  "_timeout": 2000
2504
2504
  },
2505
2505
  {
2506
- "uuid": "a0459346-c6ef-4d54-b191-d025ac2f3197",
2506
+ "uuid": "9c5e4a3c-d1ce-4e66-a289-b3a3299f413a",
2507
2507
  "title": "right()",
2508
2508
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2509
2509
  "file": "/test/device.ts",
@@ -2514,35 +2514,35 @@
2514
2514
  "title": "should work",
2515
2515
  "fullTitle": "NodePyATVDevice right() should work",
2516
2516
  "timedOut": false,
2517
- "duration": 1,
2517
+ "duration": 0,
2518
2518
  "state": "passed",
2519
2519
  "speed": "fast",
2520
2520
  "pass": true,
2521
2521
  "fail": false,
2522
2522
  "pending": false,
2523
2523
  "context": null,
2524
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2524
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2525
2525
  "err": {},
2526
- "uuid": "e2c8ea5e-0d1b-49ce-81a8-23e3e76803a1",
2527
- "parentUUID": "a0459346-c6ef-4d54-b191-d025ac2f3197",
2526
+ "uuid": "e13c647d-c066-4936-b761-c05843d249f6",
2527
+ "parentUUID": "9c5e4a3c-d1ce-4e66-a289-b3a3299f413a",
2528
2528
  "isHook": false,
2529
2529
  "skipped": false
2530
2530
  }
2531
2531
  ],
2532
2532
  "suites": [],
2533
2533
  "passes": [
2534
- "e2c8ea5e-0d1b-49ce-81a8-23e3e76803a1"
2534
+ "e13c647d-c066-4936-b761-c05843d249f6"
2535
2535
  ],
2536
2536
  "failures": [],
2537
2537
  "pending": [],
2538
2538
  "skipped": [],
2539
- "duration": 1,
2539
+ "duration": 0,
2540
2540
  "root": false,
2541
2541
  "rootEmpty": false,
2542
2542
  "_timeout": 2000
2543
2543
  },
2544
2544
  {
2545
- "uuid": "456ab263-1c5b-47e3-b864-d5724b281205",
2545
+ "uuid": "745865c3-4da4-4432-a675-435bf53e1f8d",
2546
2546
  "title": "select()",
2547
2547
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2548
2548
  "file": "/test/device.ts",
@@ -2560,17 +2560,17 @@
2560
2560
  "fail": false,
2561
2561
  "pending": false,
2562
2562
  "context": null,
2563
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2563
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2564
2564
  "err": {},
2565
- "uuid": "6772d628-97ba-4cfb-ac72-42b083f2dbb4",
2566
- "parentUUID": "456ab263-1c5b-47e3-b864-d5724b281205",
2565
+ "uuid": "c3df8683-a9b9-4c8b-a15a-fa1b4294564e",
2566
+ "parentUUID": "745865c3-4da4-4432-a675-435bf53e1f8d",
2567
2567
  "isHook": false,
2568
2568
  "skipped": false
2569
2569
  }
2570
2570
  ],
2571
2571
  "suites": [],
2572
2572
  "passes": [
2573
- "6772d628-97ba-4cfb-ac72-42b083f2dbb4"
2573
+ "c3df8683-a9b9-4c8b-a15a-fa1b4294564e"
2574
2574
  ],
2575
2575
  "failures": [],
2576
2576
  "pending": [],
@@ -2581,7 +2581,7 @@
2581
2581
  "_timeout": 2000
2582
2582
  },
2583
2583
  {
2584
- "uuid": "d4c68e6f-af1a-4fff-a95e-fd0f1faaea62",
2584
+ "uuid": "8baacd39-c741-4ea3-b83f-fbc3ee7b0ee6",
2585
2585
  "title": "skipBackward()",
2586
2586
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2587
2587
  "file": "/test/device.ts",
@@ -2592,35 +2592,35 @@
2592
2592
  "title": "should work",
2593
2593
  "fullTitle": "NodePyATVDevice skipBackward() should work",
2594
2594
  "timedOut": false,
2595
- "duration": 2,
2595
+ "duration": 1,
2596
2596
  "state": "passed",
2597
2597
  "speed": "fast",
2598
2598
  "pass": true,
2599
2599
  "fail": false,
2600
2600
  "pending": false,
2601
2601
  "context": null,
2602
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2602
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2603
2603
  "err": {},
2604
- "uuid": "a9c500e9-7532-4f38-9b05-6d7495d4de0e",
2605
- "parentUUID": "d4c68e6f-af1a-4fff-a95e-fd0f1faaea62",
2604
+ "uuid": "988ec041-22b4-4621-a51f-092bed6ff6a3",
2605
+ "parentUUID": "8baacd39-c741-4ea3-b83f-fbc3ee7b0ee6",
2606
2606
  "isHook": false,
2607
2607
  "skipped": false
2608
2608
  }
2609
2609
  ],
2610
2610
  "suites": [],
2611
2611
  "passes": [
2612
- "a9c500e9-7532-4f38-9b05-6d7495d4de0e"
2612
+ "988ec041-22b4-4621-a51f-092bed6ff6a3"
2613
2613
  ],
2614
2614
  "failures": [],
2615
2615
  "pending": [],
2616
2616
  "skipped": [],
2617
- "duration": 2,
2617
+ "duration": 1,
2618
2618
  "root": false,
2619
2619
  "rootEmpty": false,
2620
2620
  "_timeout": 2000
2621
2621
  },
2622
2622
  {
2623
- "uuid": "c26b2430-f7bd-44ae-b6a4-0850579548a6",
2623
+ "uuid": "7b55928c-3f79-41ac-a419-653b8a8f29b2",
2624
2624
  "title": "skipForward()",
2625
2625
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2626
2626
  "file": "/test/device.ts",
@@ -2638,17 +2638,17 @@
2638
2638
  "fail": false,
2639
2639
  "pending": false,
2640
2640
  "context": null,
2641
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2641
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2642
2642
  "err": {},
2643
- "uuid": "f725952b-2a74-437f-a01b-639e677d5ce9",
2644
- "parentUUID": "c26b2430-f7bd-44ae-b6a4-0850579548a6",
2643
+ "uuid": "de218702-2418-4277-bfa1-0f67202e8877",
2644
+ "parentUUID": "7b55928c-3f79-41ac-a419-653b8a8f29b2",
2645
2645
  "isHook": false,
2646
2646
  "skipped": false
2647
2647
  }
2648
2648
  ],
2649
2649
  "suites": [],
2650
2650
  "passes": [
2651
- "f725952b-2a74-437f-a01b-639e677d5ce9"
2651
+ "de218702-2418-4277-bfa1-0f67202e8877"
2652
2652
  ],
2653
2653
  "failures": [],
2654
2654
  "pending": [],
@@ -2659,7 +2659,7 @@
2659
2659
  "_timeout": 2000
2660
2660
  },
2661
2661
  {
2662
- "uuid": "edbe63e7-25db-4288-9b54-90fd4df84612",
2662
+ "uuid": "39f55e93-9a0a-4cee-ab8e-fc8b580690bc",
2663
2663
  "title": "stop()",
2664
2664
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2665
2665
  "file": "/test/device.ts",
@@ -2677,17 +2677,17 @@
2677
2677
  "fail": false,
2678
2678
  "pending": false,
2679
2679
  "context": null,
2680
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2680
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2681
2681
  "err": {},
2682
- "uuid": "16592325-f36d-468f-b239-66a9ada88069",
2683
- "parentUUID": "edbe63e7-25db-4288-9b54-90fd4df84612",
2682
+ "uuid": "e366bb2d-70bf-4402-8993-3bf6323ddbb4",
2683
+ "parentUUID": "39f55e93-9a0a-4cee-ab8e-fc8b580690bc",
2684
2684
  "isHook": false,
2685
2685
  "skipped": false
2686
2686
  }
2687
2687
  ],
2688
2688
  "suites": [],
2689
2689
  "passes": [
2690
- "16592325-f36d-468f-b239-66a9ada88069"
2690
+ "e366bb2d-70bf-4402-8993-3bf6323ddbb4"
2691
2691
  ],
2692
2692
  "failures": [],
2693
2693
  "pending": [],
@@ -2698,7 +2698,7 @@
2698
2698
  "_timeout": 2000
2699
2699
  },
2700
2700
  {
2701
- "uuid": "8b8ac36b-9b8f-44d2-aeac-4b96086cd8da",
2701
+ "uuid": "d38a2eef-b0c0-4956-b400-392778910b6c",
2702
2702
  "title": "suspend()",
2703
2703
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2704
2704
  "file": "/test/device.ts",
@@ -2716,17 +2716,17 @@
2716
2716
  "fail": false,
2717
2717
  "pending": false,
2718
2718
  "context": null,
2719
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2719
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2720
2720
  "err": {},
2721
- "uuid": "5caaa0a4-aa89-4cde-8d1e-aa4d23de56a1",
2722
- "parentUUID": "8b8ac36b-9b8f-44d2-aeac-4b96086cd8da",
2721
+ "uuid": "3b96b47f-729e-4713-a809-61e5038d0eae",
2722
+ "parentUUID": "d38a2eef-b0c0-4956-b400-392778910b6c",
2723
2723
  "isHook": false,
2724
2724
  "skipped": false
2725
2725
  }
2726
2726
  ],
2727
2727
  "suites": [],
2728
2728
  "passes": [
2729
- "5caaa0a4-aa89-4cde-8d1e-aa4d23de56a1"
2729
+ "3b96b47f-729e-4713-a809-61e5038d0eae"
2730
2730
  ],
2731
2731
  "failures": [],
2732
2732
  "pending": [],
@@ -2737,7 +2737,7 @@
2737
2737
  "_timeout": 2000
2738
2738
  },
2739
2739
  {
2740
- "uuid": "0322eb49-e1b7-49df-a4f8-70482f9cc9c5",
2740
+ "uuid": "d281cadf-fcb6-45f4-ad48-b2c0c812b1b7",
2741
2741
  "title": "topMenu()",
2742
2742
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2743
2743
  "file": "/test/device.ts",
@@ -2755,17 +2755,17 @@
2755
2755
  "fail": false,
2756
2756
  "pending": false,
2757
2757
  "context": null,
2758
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2758
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2759
2759
  "err": {},
2760
- "uuid": "c6c61edd-8283-4ab9-be16-06628116d709",
2761
- "parentUUID": "0322eb49-e1b7-49df-a4f8-70482f9cc9c5",
2760
+ "uuid": "6e91ec51-ee90-4a12-a812-c7c44f98dc69",
2761
+ "parentUUID": "d281cadf-fcb6-45f4-ad48-b2c0c812b1b7",
2762
2762
  "isHook": false,
2763
2763
  "skipped": false
2764
2764
  }
2765
2765
  ],
2766
2766
  "suites": [],
2767
2767
  "passes": [
2768
- "c6c61edd-8283-4ab9-be16-06628116d709"
2768
+ "6e91ec51-ee90-4a12-a812-c7c44f98dc69"
2769
2769
  ],
2770
2770
  "failures": [],
2771
2771
  "pending": [],
@@ -2776,7 +2776,7 @@
2776
2776
  "_timeout": 2000
2777
2777
  },
2778
2778
  {
2779
- "uuid": "d42ecea6-b3d8-4b83-8ef1-446bf5a19ba6",
2779
+ "uuid": "e0b77d25-00fe-44d5-9afa-8e2580468131",
2780
2780
  "title": "up()",
2781
2781
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2782
2782
  "file": "/test/device.ts",
@@ -2787,35 +2787,35 @@
2787
2787
  "title": "should work",
2788
2788
  "fullTitle": "NodePyATVDevice up() should work",
2789
2789
  "timedOut": false,
2790
- "duration": 2,
2790
+ "duration": 1,
2791
2791
  "state": "passed",
2792
2792
  "speed": "fast",
2793
2793
  "pass": true,
2794
2794
  "fail": false,
2795
2795
  "pending": false,
2796
2796
  "context": null,
2797
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2797
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2798
2798
  "err": {},
2799
- "uuid": "007d8de7-ffa9-432b-ba03-41d4f831c275",
2800
- "parentUUID": "d42ecea6-b3d8-4b83-8ef1-446bf5a19ba6",
2799
+ "uuid": "bf4a7baf-3361-4f47-8431-31b3158a444b",
2800
+ "parentUUID": "e0b77d25-00fe-44d5-9afa-8e2580468131",
2801
2801
  "isHook": false,
2802
2802
  "skipped": false
2803
2803
  }
2804
2804
  ],
2805
2805
  "suites": [],
2806
2806
  "passes": [
2807
- "007d8de7-ffa9-432b-ba03-41d4f831c275"
2807
+ "bf4a7baf-3361-4f47-8431-31b3158a444b"
2808
2808
  ],
2809
2809
  "failures": [],
2810
2810
  "pending": [],
2811
2811
  "skipped": [],
2812
- "duration": 2,
2812
+ "duration": 1,
2813
2813
  "root": false,
2814
2814
  "rootEmpty": false,
2815
2815
  "_timeout": 2000
2816
2816
  },
2817
2817
  {
2818
- "uuid": "c1ecf229-5b7b-4e4e-a27e-3e6600fc2d86",
2818
+ "uuid": "c9a3b06c-9908-4887-b2c5-071ed18e150f",
2819
2819
  "title": "volumeDown()",
2820
2820
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2821
2821
  "file": "/test/device.ts",
@@ -2833,17 +2833,17 @@
2833
2833
  "fail": false,
2834
2834
  "pending": false,
2835
2835
  "context": null,
2836
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2836
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2837
2837
  "err": {},
2838
- "uuid": "20cb9368-877c-4354-965e-8f099a8a2019",
2839
- "parentUUID": "c1ecf229-5b7b-4e4e-a27e-3e6600fc2d86",
2838
+ "uuid": "a849b8b3-88f6-42dd-827d-1ec7d08167b3",
2839
+ "parentUUID": "c9a3b06c-9908-4887-b2c5-071ed18e150f",
2840
2840
  "isHook": false,
2841
2841
  "skipped": false
2842
2842
  }
2843
2843
  ],
2844
2844
  "suites": [],
2845
2845
  "passes": [
2846
- "20cb9368-877c-4354-965e-8f099a8a2019"
2846
+ "a849b8b3-88f6-42dd-827d-1ec7d08167b3"
2847
2847
  ],
2848
2848
  "failures": [],
2849
2849
  "pending": [],
@@ -2854,7 +2854,7 @@
2854
2854
  "_timeout": 2000
2855
2855
  },
2856
2856
  {
2857
- "uuid": "0029c75d-1fcc-4631-affa-a68966da2c83",
2857
+ "uuid": "2f30fdd6-58ce-40bb-b509-f6bc0abe6390",
2858
2858
  "title": "volumeUp()",
2859
2859
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2860
2860
  "file": "/test/device.ts",
@@ -2865,35 +2865,35 @@
2865
2865
  "title": "should work",
2866
2866
  "fullTitle": "NodePyATVDevice volumeUp() should work",
2867
2867
  "timedOut": false,
2868
- "duration": 2,
2868
+ "duration": 1,
2869
2869
  "state": "passed",
2870
2870
  "speed": "fast",
2871
2871
  "pass": true,
2872
2872
  "fail": false,
2873
2873
  "pending": false,
2874
2874
  "context": null,
2875
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2875
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2876
2876
  "err": {},
2877
- "uuid": "17405519-d3be-44fc-8f37-742018065ee5",
2878
- "parentUUID": "0029c75d-1fcc-4631-affa-a68966da2c83",
2877
+ "uuid": "b52ef3a4-3299-4239-be08-e4e00ce3bb32",
2878
+ "parentUUID": "2f30fdd6-58ce-40bb-b509-f6bc0abe6390",
2879
2879
  "isHook": false,
2880
2880
  "skipped": false
2881
2881
  }
2882
2882
  ],
2883
2883
  "suites": [],
2884
2884
  "passes": [
2885
- "17405519-d3be-44fc-8f37-742018065ee5"
2885
+ "b52ef3a4-3299-4239-be08-e4e00ce3bb32"
2886
2886
  ],
2887
2887
  "failures": [],
2888
2888
  "pending": [],
2889
2889
  "skipped": [],
2890
- "duration": 2,
2890
+ "duration": 1,
2891
2891
  "root": false,
2892
2892
  "rootEmpty": false,
2893
2893
  "_timeout": 2000
2894
2894
  },
2895
2895
  {
2896
- "uuid": "d4a1efd8-734d-4a97-9157-d9fa2ea972c3",
2896
+ "uuid": "9dc73ddb-cbab-45cf-b226-0920031c1a21",
2897
2897
  "title": "wakeup()",
2898
2898
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2899
2899
  "file": "/test/device.ts",
@@ -2911,17 +2911,17 @@
2911
2911
  "fail": false,
2912
2912
  "pending": false,
2913
2913
  "context": null,
2914
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2914
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2915
2915
  "err": {},
2916
- "uuid": "2b65f78b-9593-47d2-b3cf-67e2640f6cdf",
2917
- "parentUUID": "d4a1efd8-734d-4a97-9157-d9fa2ea972c3",
2916
+ "uuid": "cf0a9877-320c-4e5e-99b7-ce4985b39298",
2917
+ "parentUUID": "9dc73ddb-cbab-45cf-b226-0920031c1a21",
2918
2918
  "isHook": false,
2919
2919
  "skipped": false
2920
2920
  }
2921
2921
  ],
2922
2922
  "suites": [],
2923
2923
  "passes": [
2924
- "2b65f78b-9593-47d2-b3cf-67e2640f6cdf"
2924
+ "cf0a9877-320c-4e5e-99b7-ce4985b39298"
2925
2925
  ],
2926
2926
  "failures": [],
2927
2927
  "pending": [],
@@ -2932,7 +2932,7 @@
2932
2932
  "_timeout": 2000
2933
2933
  },
2934
2934
  {
2935
- "uuid": "8da512e5-922f-4f34-924e-f8b42133a394",
2935
+ "uuid": "df9805b7-a332-497b-a06e-460ca55fd4f6",
2936
2936
  "title": "turnOff()",
2937
2937
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2938
2938
  "file": "/test/device.ts",
@@ -2950,17 +2950,17 @@
2950
2950
  "fail": false,
2951
2951
  "pending": false,
2952
2952
  "context": null,
2953
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2953
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2954
2954
  "err": {},
2955
- "uuid": "b4af5960-1cf7-4ce6-8ba3-c9732c326a2d",
2956
- "parentUUID": "8da512e5-922f-4f34-924e-f8b42133a394",
2955
+ "uuid": "5c87d3d0-0a59-42a3-8966-d8c5c7d9efe0",
2956
+ "parentUUID": "df9805b7-a332-497b-a06e-460ca55fd4f6",
2957
2957
  "isHook": false,
2958
2958
  "skipped": false
2959
2959
  }
2960
2960
  ],
2961
2961
  "suites": [],
2962
2962
  "passes": [
2963
- "b4af5960-1cf7-4ce6-8ba3-c9732c326a2d"
2963
+ "5c87d3d0-0a59-42a3-8966-d8c5c7d9efe0"
2964
2964
  ],
2965
2965
  "failures": [],
2966
2966
  "pending": [],
@@ -2971,7 +2971,7 @@
2971
2971
  "_timeout": 2000
2972
2972
  },
2973
2973
  {
2974
- "uuid": "a511a845-ba58-4b99-8314-8790f79151c9",
2974
+ "uuid": "64a617e5-5a15-4408-94de-276a1969363b",
2975
2975
  "title": "turnOn()",
2976
2976
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/device.ts",
2977
2977
  "file": "/test/device.ts",
@@ -2989,17 +2989,17 @@
2989
2989
  "fail": false,
2990
2990
  "pending": false,
2991
2991
  "context": null,
2992
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2992
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: createFakeSpawn(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});",
2993
2993
  "err": {},
2994
- "uuid": "f520bdc4-44c2-42e4-85e5-97fe4a752b67",
2995
- "parentUUID": "a511a845-ba58-4b99-8314-8790f79151c9",
2994
+ "uuid": "44293958-ce07-4593-bccb-374de2e16c41",
2995
+ "parentUUID": "64a617e5-5a15-4408-94de-276a1969363b",
2996
2996
  "isHook": false,
2997
2997
  "skipped": false
2998
2998
  }
2999
2999
  ],
3000
3000
  "suites": [],
3001
3001
  "passes": [
3002
- "f520bdc4-44c2-42e4-85e5-97fe4a752b67"
3002
+ "44293958-ce07-4593-bccb-374de2e16c41"
3003
3003
  ],
3004
3004
  "failures": [],
3005
3005
  "pending": [],
@@ -3020,7 +3020,7 @@
3020
3020
  "_timeout": 2000
3021
3021
  },
3022
3022
  {
3023
- "uuid": "82d88fa3-8ba5-4354-bb8d-1492f66f270c",
3023
+ "uuid": "f9200ee5-c175-470b-a030-72c38cb2e580",
3024
3024
  "title": "NodePyATVInstance",
3025
3025
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3026
3026
  "file": "/test/instance.ts",
@@ -3029,7 +3029,7 @@
3029
3029
  "tests": [],
3030
3030
  "suites": [
3031
3031
  {
3032
- "uuid": "ed6c9de1-a284-4ce2-8fda-6616d0699ebe",
3032
+ "uuid": "e9c39d19-769c-4b49-9040-0748323a7068",
3033
3033
  "title": "static version()",
3034
3034
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3035
3035
  "file": "/test/instance.ts",
@@ -3040,17 +3040,17 @@
3040
3040
  "title": "should work with pyatv [L]",
3041
3041
  "fullTitle": "NodePyATVInstance static version() should work with pyatv [L]",
3042
3042
  "timedOut": false,
3043
- "duration": 660,
3043
+ "duration": 784,
3044
3044
  "state": "passed",
3045
3045
  "speed": "slow",
3046
3046
  "pass": true,
3047
3047
  "fail": false,
3048
3048
  "pending": false,
3049
3049
  "context": null,
3050
- "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(4000);\n const result = yield index_1.default.version();\n if (result.pyatv === null) {\n throw new Error('No version found for pyatv. Is it installed in test environment?');\n }\n assert_1.default.equal(typeof result.pyatv, 'string', 'result.pyatv is a string');\n assert_1.default.ok(result.pyatv.length >= 5, 'result.pyatv has content');\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n assert_1.default.strictEqual(result.module, require(__dirname + '/../package.json').version || null);\n});",
3050
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(4000);\n const result = yield NodePyATVInstance.version();\n if (result.pyatv === null) {\n throw new Error('No version found for pyatv. Is it installed in test environment?');\n }\n assert.equal(typeof result.pyatv, 'string', 'result.pyatv is a string');\n assert.ok(result.pyatv.length >= 5, 'result.pyatv has content');\n assert.strictEqual(result.module, version);\n});",
3051
3051
  "err": {},
3052
- "uuid": "13a0ed3e-4ca3-42ba-997a-6bed17fcf813",
3053
- "parentUUID": "ed6c9de1-a284-4ce2-8fda-6616d0699ebe",
3052
+ "uuid": "f35d59a4-3999-44dc-b9d4-a6425e2de98c",
3053
+ "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3054
3054
  "isHook": false,
3055
3055
  "skipped": false
3056
3056
  },
@@ -3065,10 +3065,10 @@
3065
3065
  "fail": false,
3066
3066
  "pending": false,
3067
3067
  "context": null,
3068
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.code(1);\n cp.end('atvremote 0.7.4');\n })\n });\n assert_1.default.ok(result.pyatv);\n assert_1.default.strictEqual(result.pyatv, '0.7.4');\n});",
3068
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp => {\n cp.code(1);\n cp.end('atvremote 0.7.4');\n })\n });\n assert.ok(result.pyatv);\n assert.strictEqual(result.pyatv, '0.7.4');\n});",
3069
3069
  "err": {},
3070
- "uuid": "9ea9208c-66fe-4f62-86fd-ff3bf453cbac",
3071
- "parentUUID": "ed6c9de1-a284-4ce2-8fda-6616d0699ebe",
3070
+ "uuid": "6d2acfd9-8386-481e-95b3-014235131336",
3071
+ "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3072
3072
  "isHook": false,
3073
3073
  "skipped": false
3074
3074
  },
@@ -3083,10 +3083,10 @@
3083
3083
  "fail": false,
3084
3084
  "pending": false,
3085
3085
  "context": null,
3086
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n noColors: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n assert_1.default.strictEqual(result.module, require(__dirname + '/../package.json').version || null);\n});",
3086
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n noColors: true,\n spawn: createFakeSpawn(cp => cp.code(1).end())\n });\n assert.strictEqual(result.module, version);\n});",
3087
3087
  "err": {},
3088
- "uuid": "99626495-9c9c-41fe-9076-83456b75498c",
3089
- "parentUUID": "ed6c9de1-a284-4ce2-8fda-6616d0699ebe",
3088
+ "uuid": "4a4ee74f-972a-4f48-8694-47c0e4432081",
3089
+ "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3090
3090
  "isHook": false,
3091
3091
  "skipped": false
3092
3092
  },
@@ -3101,10 +3101,10 @@
3101
3101
  "fail": false,
3102
3102
  "pending": false,
3103
3103
  "context": null,
3104
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n atvremotePath: '/foo/bar',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), '/foo/bar');\n cp.code(1).end();\n })\n });\n});",
3104
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.version({\n atvremotePath: '/foo/bar',\n spawn: createFakeSpawn(cp => {\n assert.strictEqual(cp.cmd(), '/foo/bar');\n cp.code(1).end();\n })\n });\n});",
3105
3105
  "err": {},
3106
- "uuid": "1e7cb74f-c179-49a5-87ba-4c7f296b95ac",
3107
- "parentUUID": "ed6c9de1-a284-4ce2-8fda-6616d0699ebe",
3106
+ "uuid": "92be38ce-e586-4105-bcc6-c69b402c1227",
3107
+ "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3108
3108
  "isHook": false,
3109
3109
  "skipped": false
3110
3110
  },
@@ -3112,17 +3112,17 @@
3112
3112
  "title": "should work with option.debug = true",
3113
3113
  "fullTitle": "NodePyATVInstance static version() should work with option.debug = true",
3114
3114
  "timedOut": false,
3115
- "duration": 2,
3115
+ "duration": 1,
3116
3116
  "state": "passed",
3117
3117
  "speed": "fast",
3118
3118
  "pass": true,
3119
3119
  "fail": false,
3120
3120
  "pending": false,
3121
3121
  "context": null,
3122
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n debug: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n});",
3122
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.version({\n debug: true,\n spawn: createFakeSpawn(cp => cp.code(1).end())\n });\n});",
3123
3123
  "err": {},
3124
- "uuid": "89a6a04b-cadd-4a43-93f3-be1d100c2878",
3125
- "parentUUID": "ed6c9de1-a284-4ce2-8fda-6616d0699ebe",
3124
+ "uuid": "64c57a26-6dd7-49ef-90fb-c49cf47696b2",
3125
+ "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3126
3126
  "isHook": false,
3127
3127
  "skipped": false
3128
3128
  },
@@ -3130,17 +3130,17 @@
3130
3130
  "title": "should work with option.noColors",
3131
3131
  "fullTitle": "NodePyATVInstance static version() should work with option.noColors",
3132
3132
  "timedOut": false,
3133
- "duration": 2,
3133
+ "duration": 1,
3134
3134
  "state": "passed",
3135
3135
  "speed": "fast",
3136
3136
  "pass": true,
3137
3137
  "fail": false,
3138
3138
  "pending": false,
3139
3139
  "context": null,
3140
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n debug: () => { },\n noColors: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n});",
3140
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.version({\n debug: () => {\n // no debug log\n },\n noColors: true,\n spawn: createFakeSpawn(cp => cp.code(1).end())\n });\n});",
3141
3141
  "err": {},
3142
- "uuid": "11b24957-cd70-45db-ae80-0167c2561dd3",
3143
- "parentUUID": "ed6c9de1-a284-4ce2-8fda-6616d0699ebe",
3142
+ "uuid": "c0c84d63-4fc9-4971-930e-e70e95e6b380",
3143
+ "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3144
3144
  "isHook": false,
3145
3145
  "skipped": false
3146
3146
  },
@@ -3148,17 +3148,17 @@
3148
3148
  "title": "should return null on pyatv stderr output",
3149
3149
  "fullTitle": "NodePyATVInstance static version() should return null on pyatv stderr output",
3150
3150
  "timedOut": false,
3151
- "duration": 2,
3151
+ "duration": 1,
3152
3152
  "state": "passed",
3153
3153
  "speed": "fast",
3154
3154
  "pass": true,
3155
3155
  "fail": false,
3156
3156
  "pending": false,
3157
3157
  "context": null,
3158
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.stderr('Hello World!').code(123).end())\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});",
3158
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp => cp.stderr('Hello World!').code(123).end())\n });\n assert.strictEqual(result.pyatv, null);\n});",
3159
3159
  "err": {},
3160
- "uuid": "2a2e6962-0b48-4017-8e64-4ee540f5873c",
3161
- "parentUUID": "ed6c9de1-a284-4ce2-8fda-6616d0699ebe",
3160
+ "uuid": "01706946-bc92-49cd-b141-398fd52d54d8",
3161
+ "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3162
3162
  "isHook": false,
3163
3163
  "skipped": false
3164
3164
  },
@@ -3166,17 +3166,17 @@
3166
3166
  "title": "should return null on pyatv error",
3167
3167
  "fullTitle": "NodePyATVInstance static version() should return null on pyatv error",
3168
3168
  "timedOut": false,
3169
- "duration": 2,
3169
+ "duration": 1,
3170
3170
  "state": "passed",
3171
3171
  "speed": "fast",
3172
3172
  "pass": true,
3173
3173
  "fail": false,
3174
3174
  "pending": false,
3175
3175
  "context": null,
3176
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('Hello world!')).end();\n })\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});",
3176
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp => {\n cp.error(new Error('Hello world!')).end();\n })\n });\n assert.strictEqual(result.pyatv, null);\n});",
3177
3177
  "err": {},
3178
- "uuid": "693f3e92-038b-488a-bb00-9d3f252f0d08",
3179
- "parentUUID": "ed6c9de1-a284-4ce2-8fda-6616d0699ebe",
3178
+ "uuid": "0b7157c7-5bbe-4e26-ae80-09b9e235f2bc",
3179
+ "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3180
3180
  "isHook": false,
3181
3181
  "skipped": false
3182
3182
  },
@@ -3184,42 +3184,6 @@
3184
3184
  "title": "should return null on invalid pyatv version",
3185
3185
  "fullTitle": "NodePyATVInstance static version() should return null on invalid pyatv version",
3186
3186
  "timedOut": false,
3187
- "duration": 2,
3188
- "state": "passed",
3189
- "speed": "fast",
3190
- "pass": true,
3191
- "fail": false,
3192
- "pending": false,
3193
- "context": null,
3194
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 42').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});",
3195
- "err": {},
3196
- "uuid": "aee99b09-98db-4f83-b900-3816494ee798",
3197
- "parentUUID": "ed6c9de1-a284-4ce2-8fda-6616d0699ebe",
3198
- "isHook": false,
3199
- "skipped": false
3200
- },
3201
- {
3202
- "title": "should return null on empty module version",
3203
- "fullTitle": "NodePyATVInstance static version() should return null on empty module version",
3204
- "timedOut": false,
3205
- "duration": 1,
3206
- "state": "passed",
3207
- "speed": "fast",
3208
- "pass": true,
3209
- "fail": false,
3210
- "pending": false,
3211
- "context": null,
3212
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const path = require.resolve(__dirname + '/../package.json');\n require(path);\n const cache = require.cache[path];\n assert_1.default.ok(cache, 'package.json is in require cache');\n cache.exports = {};\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.7.4').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.module, null);\n});",
3213
- "err": {},
3214
- "uuid": "ecc0595e-b413-49a3-9b86-3b08afba1230",
3215
- "parentUUID": "ed6c9de1-a284-4ce2-8fda-6616d0699ebe",
3216
- "isHook": false,
3217
- "skipped": false
3218
- },
3219
- {
3220
- "title": "should return null on invalid module version",
3221
- "fullTitle": "NodePyATVInstance static version() should return null on invalid module version",
3222
- "timedOut": false,
3223
3187
  "duration": 1,
3224
3188
  "state": "passed",
3225
3189
  "speed": "fast",
@@ -3227,38 +3191,36 @@
3227
3191
  "fail": false,
3228
3192
  "pending": false,
3229
3193
  "context": null,
3230
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const path = require.resolve(__dirname + '/../package.json');\n require(path);\n const cache = require.cache[path];\n assert_1.default.ok(cache, 'package.json is in require cache');\n cache.exports = { version: 42 };\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.7.4').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.module, null);\n});",
3194
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp => {\n cp.stdout('atvremote 42').code(1).end();\n })\n });\n assert.strictEqual(result.pyatv, null);\n});",
3231
3195
  "err": {},
3232
- "uuid": "08667bb7-32d5-4039-8dda-272eb9cebf42",
3233
- "parentUUID": "ed6c9de1-a284-4ce2-8fda-6616d0699ebe",
3196
+ "uuid": "7b7c11b8-2de0-4383-aec9-7b8cec84986c",
3197
+ "parentUUID": "e9c39d19-769c-4b49-9040-0748323a7068",
3234
3198
  "isHook": false,
3235
3199
  "skipped": false
3236
3200
  }
3237
3201
  ],
3238
3202
  "suites": [],
3239
3203
  "passes": [
3240
- "13a0ed3e-4ca3-42ba-997a-6bed17fcf813",
3241
- "9ea9208c-66fe-4f62-86fd-ff3bf453cbac",
3242
- "99626495-9c9c-41fe-9076-83456b75498c",
3243
- "1e7cb74f-c179-49a5-87ba-4c7f296b95ac",
3244
- "89a6a04b-cadd-4a43-93f3-be1d100c2878",
3245
- "11b24957-cd70-45db-ae80-0167c2561dd3",
3246
- "2a2e6962-0b48-4017-8e64-4ee540f5873c",
3247
- "693f3e92-038b-488a-bb00-9d3f252f0d08",
3248
- "aee99b09-98db-4f83-b900-3816494ee798",
3249
- "ecc0595e-b413-49a3-9b86-3b08afba1230",
3250
- "08667bb7-32d5-4039-8dda-272eb9cebf42"
3204
+ "f35d59a4-3999-44dc-b9d4-a6425e2de98c",
3205
+ "6d2acfd9-8386-481e-95b3-014235131336",
3206
+ "4a4ee74f-972a-4f48-8694-47c0e4432081",
3207
+ "92be38ce-e586-4105-bcc6-c69b402c1227",
3208
+ "64c57a26-6dd7-49ef-90fb-c49cf47696b2",
3209
+ "c0c84d63-4fc9-4971-930e-e70e95e6b380",
3210
+ "01706946-bc92-49cd-b141-398fd52d54d8",
3211
+ "0b7157c7-5bbe-4e26-ae80-09b9e235f2bc",
3212
+ "7b7c11b8-2de0-4383-aec9-7b8cec84986c"
3251
3213
  ],
3252
3214
  "failures": [],
3253
3215
  "pending": [],
3254
3216
  "skipped": [],
3255
- "duration": 678,
3217
+ "duration": 795,
3256
3218
  "root": false,
3257
3219
  "rootEmpty": false,
3258
3220
  "_timeout": 2000
3259
3221
  },
3260
3222
  {
3261
- "uuid": "29a8df4d-2130-4dfd-8859-dbabdcfdea10",
3223
+ "uuid": "4c6dc800-8ee7-4ea7-8d33-a25e6f44dc8e",
3262
3224
  "title": "static check()",
3263
3225
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3264
3226
  "file": "/test/instance.ts",
@@ -3269,17 +3231,17 @@
3269
3231
  "title": "should resolve in test environment [L]",
3270
3232
  "fullTitle": "NodePyATVInstance static check() should resolve in test environment [L]",
3271
3233
  "timedOut": false,
3272
- "duration": 5876,
3234
+ "duration": 5919,
3273
3235
  "state": "passed",
3274
3236
  "speed": "slow",
3275
3237
  "pass": true,
3276
3238
  "fail": false,
3277
3239
  "pending": false,
3278
3240
  "context": null,
3279
- "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(12000);\n yield index_1.default.check();\n});",
3241
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(12000);\n yield NodePyATVInstance.check();\n});",
3280
3242
  "err": {},
3281
- "uuid": "8dfc7618-8fe6-49e7-8696-c73d795e9851",
3282
- "parentUUID": "29a8df4d-2130-4dfd-8859-dbabdcfdea10",
3243
+ "uuid": "f0e7a89c-88cf-4cbf-b920-56378740fb2c",
3244
+ "parentUUID": "4c6dc800-8ee7-4ea7-8d33-a25e6f44dc8e",
3283
3245
  "isHook": false,
3284
3246
  "skipped": false
3285
3247
  },
@@ -3287,17 +3249,17 @@
3287
3249
  "title": "should return nice error message if pyatv was not found",
3288
3250
  "fullTitle": "NodePyATVInstance static check() should return nice error message if pyatv was not found",
3289
3251
  "timedOut": false,
3290
- "duration": 2,
3252
+ "duration": 3,
3291
3253
  "state": "passed",
3292
3254
  "speed": "fast",
3293
3255
  "pass": true,
3294
3256
  "fail": false,
3295
3257
  "pending": false,
3296
3258
  "context": null,
3297
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});",
3259
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.check({\n spawn: createFakeSpawn(cp => {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});",
3298
3260
  "err": {},
3299
- "uuid": "242bf454-d125-43c6-9d8d-db5642e5f01b",
3300
- "parentUUID": "29a8df4d-2130-4dfd-8859-dbabdcfdea10",
3261
+ "uuid": "6ab3782e-a7fe-4369-8af3-ca1bcd08dc8f",
3262
+ "parentUUID": "4c6dc800-8ee7-4ea7-8d33-a25e6f44dc8e",
3301
3263
  "isHook": false,
3302
3264
  "skipped": false
3303
3265
  },
@@ -3305,17 +3267,17 @@
3305
3267
  "title": "should return nice error message if myatv is too old",
3306
3268
  "fullTitle": "NodePyATVInstance static check() should return nice error message if myatv is too old",
3307
3269
  "timedOut": false,
3308
- "duration": 1,
3270
+ "duration": 2,
3309
3271
  "state": "passed",
3310
3272
  "speed": "fast",
3311
3273
  "pass": true,
3312
3274
  "fail": false,
3313
3275
  "pending": false,
3314
3276
  "context": null,
3315
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.5.1').code(1).end();\n })\n });\n }), /Found pyatv, but unforunately it's too old. Please update pyatv./);\n});",
3277
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.check({\n spawn: createFakeSpawn(cp => {\n cp.stdout('atvremote 0.5.1').code(1).end();\n })\n });\n }), /Found pyatv, but unforunately it's too old. Please update pyatv./);\n});",
3316
3278
  "err": {},
3317
- "uuid": "a00ccef4-c881-4b7d-a145-d9e99e813d69",
3318
- "parentUUID": "29a8df4d-2130-4dfd-8859-dbabdcfdea10",
3279
+ "uuid": "fc358bcc-d55a-46b1-b3c5-e06828b962e3",
3280
+ "parentUUID": "4c6dc800-8ee7-4ea7-8d33-a25e6f44dc8e",
3319
3281
  "isHook": false,
3320
3282
  "skipped": false
3321
3283
  },
@@ -3323,38 +3285,38 @@
3323
3285
  "title": "should return nice error message if scan failed",
3324
3286
  "fullTitle": "NodePyATVInstance static check() should return nice error message if scan failed",
3325
3287
  "timedOut": false,
3326
- "duration": 2,
3288
+ "duration": 3,
3327
3289
  "state": "passed",
3328
3290
  "speed": "fast",
3329
3291
  "pass": true,
3330
3292
  "fail": false,
3331
3293
  "pending": false,
3332
3294
  "context": null,
3333
- "code": "return __awaiter(this, void 0, void 0, function* () {\n let i = 0;\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n if (i === 0) {\n cp.stdout('atvremote 0.7.0').code(1).end();\n i++;\n }\n else {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n }\n })\n });\n }), /Unable to scan for devices/);\n});",
3295
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n let i = 0;\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.check({\n spawn: createFakeSpawn(cp => {\n if (i === 0) {\n cp.stdout('atvremote 0.7.0').code(1).end();\n i++;\n }\n else {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n }\n })\n });\n }), /Unable to scan for devices/);\n});",
3334
3296
  "err": {},
3335
- "uuid": "7ec283bc-2728-4aae-8323-a1e15d738745",
3336
- "parentUUID": "29a8df4d-2130-4dfd-8859-dbabdcfdea10",
3297
+ "uuid": "0b0ce079-dab2-4734-b611-da1a38882df2",
3298
+ "parentUUID": "4c6dc800-8ee7-4ea7-8d33-a25e6f44dc8e",
3337
3299
  "isHook": false,
3338
3300
  "skipped": false
3339
3301
  }
3340
3302
  ],
3341
3303
  "suites": [],
3342
3304
  "passes": [
3343
- "8dfc7618-8fe6-49e7-8696-c73d795e9851",
3344
- "242bf454-d125-43c6-9d8d-db5642e5f01b",
3345
- "a00ccef4-c881-4b7d-a145-d9e99e813d69",
3346
- "7ec283bc-2728-4aae-8323-a1e15d738745"
3305
+ "f0e7a89c-88cf-4cbf-b920-56378740fb2c",
3306
+ "6ab3782e-a7fe-4369-8af3-ca1bcd08dc8f",
3307
+ "fc358bcc-d55a-46b1-b3c5-e06828b962e3",
3308
+ "0b0ce079-dab2-4734-b611-da1a38882df2"
3347
3309
  ],
3348
3310
  "failures": [],
3349
3311
  "pending": [],
3350
3312
  "skipped": [],
3351
- "duration": 5881,
3313
+ "duration": 5927,
3352
3314
  "root": false,
3353
3315
  "rootEmpty": false,
3354
3316
  "_timeout": 2000
3355
3317
  },
3356
3318
  {
3357
- "uuid": "be669eb9-9fe0-47de-a6e3-03352ea784a2",
3319
+ "uuid": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3358
3320
  "title": "static find()",
3359
3321
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3360
3322
  "file": "/test/instance.ts",
@@ -3365,17 +3327,17 @@
3365
3327
  "title": "should work [L]",
3366
3328
  "fullTitle": "NodePyATVInstance static find() should work [L]",
3367
3329
  "timedOut": false,
3368
- "duration": 5396,
3330
+ "duration": 5439,
3369
3331
  "state": "passed",
3370
3332
  "speed": "slow",
3371
3333
  "pass": true,
3372
3334
  "fail": false,
3373
3335
  "pending": false,
3374
3336
  "context": null,
3375
- "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(8000);\n const result = yield index_1.default.find();\n assert_1.default.ok(Array.isArray(result));\n});",
3337
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n this.timeout(8000);\n const result = yield NodePyATVInstance.find();\n assert.ok(Array.isArray(result));\n});",
3376
3338
  "err": {},
3377
- "uuid": "80265c05-5be0-45d0-9e61-8a84d45c23fa",
3378
- "parentUUID": "be669eb9-9fe0-47de-a6e3-03352ea784a2",
3339
+ "uuid": "871ba256-aeab-4ee9-ae03-ba48506220d0",
3340
+ "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3379
3341
  "isHook": false,
3380
3342
  "skipped": false
3381
3343
  },
@@ -3383,17 +3345,17 @@
3383
3345
  "title": "should handle option.atvscriptPath",
3384
3346
  "fullTitle": "NodePyATVInstance static find() should handle option.atvscriptPath",
3385
3347
  "timedOut": false,
3386
- "duration": 2,
3348
+ "duration": 1,
3387
3349
  "state": "passed",
3388
3350
  "speed": "fast",
3389
3351
  "pass": true,
3390
3352
  "fail": false,
3391
3353
  "pending": false,
3392
3354
  "context": null,
3393
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n atvscriptPath: '/foo/bar',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), '/foo/bar');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});",
3355
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n atvscriptPath: '/foo/bar',\n spawn: createFakeSpawn(cp => {\n assert.strictEqual(cp.cmd(), '/foo/bar');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});",
3394
3356
  "err": {},
3395
- "uuid": "5c3fd164-d4d6-44d2-96f0-cfa0c210aefe",
3396
- "parentUUID": "be669eb9-9fe0-47de-a6e3-03352ea784a2",
3357
+ "uuid": "ab7a7e9c-31e2-4928-a9e9-e3258fc67b8f",
3358
+ "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3397
3359
  "isHook": false,
3398
3360
  "skipped": false
3399
3361
  },
@@ -3401,17 +3363,17 @@
3401
3363
  "title": "should throw error on stderr output",
3402
3364
  "fullTitle": "NodePyATVInstance static find() should throw error on stderr output",
3403
3365
  "timedOut": false,
3404
- "duration": 1,
3366
+ "duration": 2,
3405
3367
  "state": "passed",
3406
3368
  "speed": "fast",
3407
3369
  "pass": true,
3408
3370
  "fail": false,
3409
3371
  "pending": false,
3410
3372
  "context": null,
3411
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stderr('Hello World!').code(1).end();\n })\n });\n }), /Unable to execute request/);\n});",
3373
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp => {\n cp.stderr('Hello World!').code(1).end();\n })\n });\n }), /Unable to execute request/);\n});",
3412
3374
  "err": {},
3413
- "uuid": "6148abb9-4699-4141-ac3c-2b44356ebae6",
3414
- "parentUUID": "be669eb9-9fe0-47de-a6e3-03352ea784a2",
3375
+ "uuid": "64a10e18-79bf-4865-9d74-c23c2689125e",
3376
+ "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3415
3377
  "isHook": false,
3416
3378
  "skipped": false
3417
3379
  },
@@ -3419,17 +3381,17 @@
3419
3381
  "title": "should throw error on error",
3420
3382
  "fullTitle": "NodePyATVInstance static find() should throw error on error",
3421
3383
  "timedOut": false,
3422
- "duration": 1,
3384
+ "duration": 2,
3423
3385
  "state": "passed",
3424
3386
  "speed": "fast",
3425
3387
  "pass": true,
3426
3388
  "fail": false,
3427
3389
  "pending": false,
3428
3390
  "context": null,
3429
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('Hello world!')).code(1).end();\n })\n });\n }), /Hello world!/);\n});",
3391
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp => {\n cp.error(new Error('Hello world!')).code(1).end();\n })\n });\n }), /Hello world!/);\n});",
3430
3392
  "err": {},
3431
- "uuid": "387db79d-8e23-45bd-aeea-8014f04f9153",
3432
- "parentUUID": "be669eb9-9fe0-47de-a6e3-03352ea784a2",
3393
+ "uuid": "b0000b9a-2d45-42ae-9b3c-c6fba21b1766",
3394
+ "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3433
3395
  "isHook": false,
3434
3396
  "skipped": false
3435
3397
  },
@@ -3437,17 +3399,17 @@
3437
3399
  "title": "should throw error if atvscript result is not valid json",
3438
3400
  "fullTitle": "NodePyATVInstance static find() should throw error if atvscript result is not valid json",
3439
3401
  "timedOut": false,
3440
- "duration": 2,
3402
+ "duration": 1,
3441
3403
  "state": "passed",
3442
3404
  "speed": "fast",
3443
3405
  "pass": true,
3444
3406
  "fail": false,
3445
3407
  "pending": false,
3446
3408
  "context": null,
3447
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout(JSON.stringify({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).substr(1)).end();\n })\n });\n }), /Unable to parse result/);\n});",
3409
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp => {\n cp.stdout(JSON.stringify({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).substr(1)).end();\n })\n });\n }), /Unable to parse result/);\n});",
3448
3410
  "err": {},
3449
- "uuid": "36f66ea3-a16d-42cd-a581-cf6b1a576863",
3450
- "parentUUID": "be669eb9-9fe0-47de-a6e3-03352ea784a2",
3411
+ "uuid": "084b77a9-f343-4cf6-8d48-1471f236d732",
3412
+ "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3451
3413
  "isHook": false,
3452
3414
  "skipped": false
3453
3415
  },
@@ -3455,17 +3417,17 @@
3455
3417
  "title": "should throw error if atvscript result is not successfull",
3456
3418
  "fullTitle": "NodePyATVInstance static find() should throw error if atvscript result is not successfull",
3457
3419
  "timedOut": false,
3458
- "duration": 1,
3420
+ "duration": 2,
3459
3421
  "state": "passed",
3460
3422
  "speed": "fast",
3461
3423
  "pass": true,
3462
3424
  "fail": false,
3463
3425
  "pending": false,
3464
3426
  "context": null,
3465
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout({\n result: 'error'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});",
3427
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp => {\n cp.stdout({\n result: 'error'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});",
3466
3428
  "err": {},
3467
- "uuid": "bededd42-21f6-4464-bacf-fc369265aaaa",
3468
- "parentUUID": "be669eb9-9fe0-47de-a6e3-03352ea784a2",
3429
+ "uuid": "822a4855-b6c5-4bc4-9065-52a3bedff7d2",
3430
+ "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3469
3431
  "isHook": false,
3470
3432
  "skipped": false
3471
3433
  },
@@ -3473,41 +3435,41 @@
3473
3435
  "title": "should throw error if atvscript result is without device array",
3474
3436
  "fullTitle": "NodePyATVInstance static find() should throw error if atvscript result is without device array",
3475
3437
  "timedOut": false,
3476
- "duration": 1,
3438
+ "duration": 0,
3477
3439
  "state": "passed",
3478
3440
  "speed": "fast",
3479
3441
  "pass": true,
3480
3442
  "fail": false,
3481
3443
  "pending": false,
3482
3444
  "context": null,
3483
- "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout({\n result: 'success'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});",
3445
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp => {\n cp.stdout({\n result: 'success'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});",
3484
3446
  "err": {},
3485
- "uuid": "56b55059-39a2-4932-9a18-01dc7eda6882",
3486
- "parentUUID": "be669eb9-9fe0-47de-a6e3-03352ea784a2",
3447
+ "uuid": "136c7589-409b-4b80-8fbb-bbe45ad33adc",
3448
+ "parentUUID": "365a4c53-e9ad-4b53-9328-21a5183baa54",
3487
3449
  "isHook": false,
3488
3450
  "skipped": false
3489
3451
  }
3490
3452
  ],
3491
3453
  "suites": [],
3492
3454
  "passes": [
3493
- "80265c05-5be0-45d0-9e61-8a84d45c23fa",
3494
- "5c3fd164-d4d6-44d2-96f0-cfa0c210aefe",
3495
- "6148abb9-4699-4141-ac3c-2b44356ebae6",
3496
- "387db79d-8e23-45bd-aeea-8014f04f9153",
3497
- "36f66ea3-a16d-42cd-a581-cf6b1a576863",
3498
- "bededd42-21f6-4464-bacf-fc369265aaaa",
3499
- "56b55059-39a2-4932-9a18-01dc7eda6882"
3455
+ "871ba256-aeab-4ee9-ae03-ba48506220d0",
3456
+ "ab7a7e9c-31e2-4928-a9e9-e3258fc67b8f",
3457
+ "64a10e18-79bf-4865-9d74-c23c2689125e",
3458
+ "b0000b9a-2d45-42ae-9b3c-c6fba21b1766",
3459
+ "084b77a9-f343-4cf6-8d48-1471f236d732",
3460
+ "822a4855-b6c5-4bc4-9065-52a3bedff7d2",
3461
+ "136c7589-409b-4b80-8fbb-bbe45ad33adc"
3500
3462
  ],
3501
3463
  "failures": [],
3502
3464
  "pending": [],
3503
3465
  "skipped": [],
3504
- "duration": 5404,
3466
+ "duration": 5447,
3505
3467
  "root": false,
3506
3468
  "rootEmpty": false,
3507
3469
  "_timeout": 2000
3508
3470
  },
3509
3471
  {
3510
- "uuid": "59812a89-7543-48ca-897b-4c007fadeacd",
3472
+ "uuid": "5ffef56b-03f3-4c46-8820-37d7cea792db",
3511
3473
  "title": "static device()",
3512
3474
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3513
3475
  "file": "/test/instance.ts",
@@ -3518,35 +3480,35 @@
3518
3480
  "title": "should pass options to constructor",
3519
3481
  "fullTitle": "NodePyATVInstance static device() should pass options to constructor",
3520
3482
  "timedOut": false,
3521
- "duration": 1,
3483
+ "duration": 0,
3522
3484
  "state": "passed",
3523
3485
  "speed": "fast",
3524
3486
  "pass": true,
3525
3487
  "fail": false,
3526
3488
  "pending": false,
3527
3489
  "context": null,
3528
- "code": "const device = index_1.default.device({ host: '192.168.178.6', name: 'My Testdevice' });\nassert_1.default.strictEqual(device.host, '192.168.178.6');\nassert_1.default.strictEqual(device.name, 'My Testdevice');",
3490
+ "code": "const device = NodePyATVInstance.device({ host: '192.168.178.6', name: 'My Testdevice' });\nassert.strictEqual(device.host, '192.168.178.6');\nassert.strictEqual(device.name, 'My Testdevice');",
3529
3491
  "err": {},
3530
- "uuid": "c53d0440-6555-4ffb-b962-0c418a93abc4",
3531
- "parentUUID": "59812a89-7543-48ca-897b-4c007fadeacd",
3492
+ "uuid": "b725b74f-7b80-4a5c-85b8-9fcfebd3fad5",
3493
+ "parentUUID": "5ffef56b-03f3-4c46-8820-37d7cea792db",
3532
3494
  "isHook": false,
3533
3495
  "skipped": false
3534
3496
  }
3535
3497
  ],
3536
3498
  "suites": [],
3537
3499
  "passes": [
3538
- "c53d0440-6555-4ffb-b962-0c418a93abc4"
3500
+ "b725b74f-7b80-4a5c-85b8-9fcfebd3fad5"
3539
3501
  ],
3540
3502
  "failures": [],
3541
3503
  "pending": [],
3542
3504
  "skipped": [],
3543
- "duration": 1,
3505
+ "duration": 0,
3544
3506
  "root": false,
3545
3507
  "rootEmpty": false,
3546
3508
  "_timeout": 2000
3547
3509
  },
3548
3510
  {
3549
- "uuid": "776c8d11-1b92-4dfb-a30e-7826adb7515e",
3511
+ "uuid": "23da45fc-6f18-4b6f-bc30-6165c380f048",
3550
3512
  "title": "version()",
3551
3513
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3552
3514
  "file": "/test/instance.ts",
@@ -3557,35 +3519,35 @@
3557
3519
  "title": "should merge options from constructor",
3558
3520
  "fullTitle": "NodePyATVInstance version() should merge options from constructor",
3559
3521
  "timedOut": false,
3560
- "duration": 1,
3522
+ "duration": 2,
3561
3523
  "state": "passed",
3562
3524
  "speed": "fast",
3563
3525
  "pass": true,
3564
3526
  "fail": false,
3565
3527
  "pending": false,
3566
3528
  "context": null,
3567
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvremotePath: 'test' });\n yield i.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.code(1).end();\n })\n });\n});",
3529
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ atvremotePath: 'test' });\n yield i.version({\n spawn: createFakeSpawn(cp => {\n assert.strictEqual(cp.cmd(), 'test');\n cp.code(1).end();\n })\n });\n});",
3568
3530
  "err": {},
3569
- "uuid": "70e43acc-873f-400e-9cfe-56650ee809bc",
3570
- "parentUUID": "776c8d11-1b92-4dfb-a30e-7826adb7515e",
3531
+ "uuid": "ebf4bb9e-db58-461a-8882-95734cf185c1",
3532
+ "parentUUID": "23da45fc-6f18-4b6f-bc30-6165c380f048",
3571
3533
  "isHook": false,
3572
3534
  "skipped": false
3573
3535
  }
3574
3536
  ],
3575
3537
  "suites": [],
3576
3538
  "passes": [
3577
- "70e43acc-873f-400e-9cfe-56650ee809bc"
3539
+ "ebf4bb9e-db58-461a-8882-95734cf185c1"
3578
3540
  ],
3579
3541
  "failures": [],
3580
3542
  "pending": [],
3581
3543
  "skipped": [],
3582
- "duration": 1,
3544
+ "duration": 2,
3583
3545
  "root": false,
3584
3546
  "rootEmpty": false,
3585
3547
  "_timeout": 2000
3586
3548
  },
3587
3549
  {
3588
- "uuid": "ab57a285-00b6-4bba-898b-7b782f6c92e5",
3550
+ "uuid": "8efe4569-9ebd-4324-b47d-ab2cf179d7e3",
3589
3551
  "title": "check()",
3590
3552
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3591
3553
  "file": "/test/instance.ts",
@@ -3603,17 +3565,17 @@
3603
3565
  "fail": false,
3604
3566
  "pending": false,
3605
3567
  "context": null,
3606
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvremotePath: 'test' });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield i.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});",
3568
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ atvremotePath: 'test' });\n yield assert.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield i.check({\n spawn: createFakeSpawn(cp => {\n assert.strictEqual(cp.cmd(), 'test');\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});",
3607
3569
  "err": {},
3608
- "uuid": "5acffb0c-7cad-48b5-8cef-9a31ef1d5ee9",
3609
- "parentUUID": "ab57a285-00b6-4bba-898b-7b782f6c92e5",
3570
+ "uuid": "03fbd701-1e87-434a-93c8-cd0b447d9a5d",
3571
+ "parentUUID": "8efe4569-9ebd-4324-b47d-ab2cf179d7e3",
3610
3572
  "isHook": false,
3611
3573
  "skipped": false
3612
3574
  }
3613
3575
  ],
3614
3576
  "suites": [],
3615
3577
  "passes": [
3616
- "5acffb0c-7cad-48b5-8cef-9a31ef1d5ee9"
3578
+ "03fbd701-1e87-434a-93c8-cd0b447d9a5d"
3617
3579
  ],
3618
3580
  "failures": [],
3619
3581
  "pending": [],
@@ -3624,7 +3586,7 @@
3624
3586
  "_timeout": 2000
3625
3587
  },
3626
3588
  {
3627
- "uuid": "a97adbc7-54be-4151-9d10-f933050e3010",
3589
+ "uuid": "08d47edd-d0ac-41ef-8d12-be394eb556de",
3628
3590
  "title": "find()",
3629
3591
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3630
3592
  "file": "/test/instance.ts",
@@ -3635,35 +3597,35 @@
3635
3597
  "title": "should merge options from constructor",
3636
3598
  "fullTitle": "NodePyATVInstance find() should merge options from constructor",
3637
3599
  "timedOut": false,
3638
- "duration": 2,
3600
+ "duration": 1,
3639
3601
  "state": "passed",
3640
3602
  "speed": "fast",
3641
3603
  "pass": true,
3642
3604
  "fail": false,
3643
3605
  "pending": false,
3644
3606
  "context": null,
3645
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvscriptPath: 'test' });\n yield i.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});",
3607
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ atvscriptPath: 'test' });\n yield i.find({\n spawn: createFakeSpawn(cp => {\n assert.strictEqual(cp.cmd(), 'test');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});",
3646
3608
  "err": {},
3647
- "uuid": "4d3f6541-c22b-4bd4-88e9-feec84d6dc3f",
3648
- "parentUUID": "a97adbc7-54be-4151-9d10-f933050e3010",
3609
+ "uuid": "65e54c7f-13fa-4a16-820a-312796793c73",
3610
+ "parentUUID": "08d47edd-d0ac-41ef-8d12-be394eb556de",
3649
3611
  "isHook": false,
3650
3612
  "skipped": false
3651
3613
  }
3652
3614
  ],
3653
3615
  "suites": [],
3654
3616
  "passes": [
3655
- "4d3f6541-c22b-4bd4-88e9-feec84d6dc3f"
3617
+ "65e54c7f-13fa-4a16-820a-312796793c73"
3656
3618
  ],
3657
3619
  "failures": [],
3658
3620
  "pending": [],
3659
3621
  "skipped": [],
3660
- "duration": 2,
3622
+ "duration": 1,
3661
3623
  "root": false,
3662
3624
  "rootEmpty": false,
3663
3625
  "_timeout": 2000
3664
3626
  },
3665
3627
  {
3666
- "uuid": "9ab03702-a6a5-4ab1-8e9f-0354baf159c7",
3628
+ "uuid": "dd2b7c93-465f-48a7-9765-6fdcbb68c8ed",
3667
3629
  "title": "device()",
3668
3630
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3669
3631
  "file": "/test/instance.ts",
@@ -3681,17 +3643,17 @@
3681
3643
  "fail": false,
3682
3644
  "pending": false,
3683
3645
  "context": null,
3684
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ debug: true });\n const d = i.device({ name: 'My Testdevice', host: '192.168.178.2' });\n assert_1.default.deepStrictEqual(d.debug, true);\n});",
3646
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ debug: true });\n const d = i.device({ name: 'My Testdevice', host: '192.168.178.2' });\n assert.deepStrictEqual(d.debug, true);\n});",
3685
3647
  "err": {},
3686
- "uuid": "298fd854-2d33-4734-b6e5-e1e5b1f779a4",
3687
- "parentUUID": "9ab03702-a6a5-4ab1-8e9f-0354baf159c7",
3648
+ "uuid": "980b11e4-02fe-4846-b2c5-1b5b5835139a",
3649
+ "parentUUID": "dd2b7c93-465f-48a7-9765-6fdcbb68c8ed",
3688
3650
  "isHook": false,
3689
3651
  "skipped": false
3690
3652
  }
3691
3653
  ],
3692
3654
  "suites": [],
3693
3655
  "passes": [
3694
- "298fd854-2d33-4734-b6e5-e1e5b1f779a4"
3656
+ "980b11e4-02fe-4846-b2c5-1b5b5835139a"
3695
3657
  ],
3696
3658
  "failures": [],
3697
3659
  "pending": [],
@@ -3702,7 +3664,7 @@
3702
3664
  "_timeout": 2000
3703
3665
  },
3704
3666
  {
3705
- "uuid": "297d3e00-6e25-4a89-a140-bda4524ccbe1",
3667
+ "uuid": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
3706
3668
  "title": "Type Exports",
3707
3669
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/instance.ts",
3708
3670
  "file": "/test/instance.ts",
@@ -3720,10 +3682,10 @@
3720
3682
  "fail": false,
3721
3683
  "pending": false,
3722
3684
  "context": null,
3723
- "code": "assert_1.default.ok(index_1.NodePyATVProtocol);",
3685
+ "code": "assert.ok(NodePyATVProtocol);",
3724
3686
  "err": {},
3725
- "uuid": "df3d9463-81fe-426a-9085-e78e7028a1dd",
3726
- "parentUUID": "297d3e00-6e25-4a89-a140-bda4524ccbe1",
3687
+ "uuid": "aedc1f97-1495-4ea8-8245-14dc8cc7551a",
3688
+ "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
3727
3689
  "isHook": false,
3728
3690
  "skipped": false
3729
3691
  },
@@ -3738,10 +3700,10 @@
3738
3700
  "fail": false,
3739
3701
  "pending": false,
3740
3702
  "context": null,
3741
- "code": "assert_1.default.ok(index_1.NodePyATVMediaType);",
3703
+ "code": "assert.ok(NodePyATVMediaType);",
3742
3704
  "err": {},
3743
- "uuid": "99b640d8-871f-4f08-afae-e2a30a4c6555",
3744
- "parentUUID": "297d3e00-6e25-4a89-a140-bda4524ccbe1",
3705
+ "uuid": "ef401fbc-d937-4dd1-bb98-9c00d251c59a",
3706
+ "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
3745
3707
  "isHook": false,
3746
3708
  "skipped": false
3747
3709
  },
@@ -3756,10 +3718,10 @@
3756
3718
  "fail": false,
3757
3719
  "pending": false,
3758
3720
  "context": null,
3759
- "code": "assert_1.default.ok(index_1.NodePyATVDeviceEvent);",
3721
+ "code": "assert.ok(NodePyATVDeviceEvent);",
3760
3722
  "err": {},
3761
- "uuid": "384c7fde-c6cc-4296-9b89-959692e4f948",
3762
- "parentUUID": "297d3e00-6e25-4a89-a140-bda4524ccbe1",
3723
+ "uuid": "afd2dc21-049d-4d72-907f-c32aed3a875a",
3724
+ "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
3763
3725
  "isHook": false,
3764
3726
  "skipped": false
3765
3727
  },
@@ -3774,10 +3736,10 @@
3774
3736
  "fail": false,
3775
3737
  "pending": false,
3776
3738
  "context": null,
3777
- "code": "assert_1.default.ok(index_1.NodePyATVDeviceState);",
3739
+ "code": "assert.ok(NodePyATVDeviceState);",
3778
3740
  "err": {},
3779
- "uuid": "f537c602-43cd-4c99-a099-0e4932769354",
3780
- "parentUUID": "297d3e00-6e25-4a89-a140-bda4524ccbe1",
3741
+ "uuid": "d42df1b1-68e1-49fa-a641-476e2a06d5df",
3742
+ "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
3781
3743
  "isHook": false,
3782
3744
  "skipped": false
3783
3745
  },
@@ -3792,10 +3754,10 @@
3792
3754
  "fail": false,
3793
3755
  "pending": false,
3794
3756
  "context": null,
3795
- "code": "assert_1.default.ok(index_1.NodePyATVRepeatState);",
3757
+ "code": "assert.ok(NodePyATVRepeatState);",
3796
3758
  "err": {},
3797
- "uuid": "5662a51f-b77b-4086-a781-8f0d79740b2e",
3798
- "parentUUID": "297d3e00-6e25-4a89-a140-bda4524ccbe1",
3759
+ "uuid": "fbd36b08-d9bc-4ca4-85ca-b75521ee2ea0",
3760
+ "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
3799
3761
  "isHook": false,
3800
3762
  "skipped": false
3801
3763
  },
@@ -3810,10 +3772,10 @@
3810
3772
  "fail": false,
3811
3773
  "pending": false,
3812
3774
  "context": null,
3813
- "code": "assert_1.default.ok(index_1.NodePyATVShuffleState);",
3775
+ "code": "assert.ok(NodePyATVShuffleState);",
3814
3776
  "err": {},
3815
- "uuid": "3d5209e2-e35c-4b5a-aa6c-e44eafec7071",
3816
- "parentUUID": "297d3e00-6e25-4a89-a140-bda4524ccbe1",
3777
+ "uuid": "c0668b92-575e-46ca-b493-253330cc57f4",
3778
+ "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
3817
3779
  "isHook": false,
3818
3780
  "skipped": false
3819
3781
  },
@@ -3828,10 +3790,10 @@
3828
3790
  "fail": false,
3829
3791
  "pending": false,
3830
3792
  "context": null,
3831
- "code": "assert_1.default.ok(index_1.NodePyATVKeys);",
3793
+ "code": "assert.ok(NodePyATVKeys);",
3832
3794
  "err": {},
3833
- "uuid": "2288eaa6-e100-47de-b778-a8a0adc758d5",
3834
- "parentUUID": "297d3e00-6e25-4a89-a140-bda4524ccbe1",
3795
+ "uuid": "3c300c3e-2015-4673-af61-7f4d3635aefd",
3796
+ "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
3835
3797
  "isHook": false,
3836
3798
  "skipped": false
3837
3799
  },
@@ -3839,17 +3801,17 @@
3839
3801
  "title": "Type NodePyATVInstanceOptions should be exported",
3840
3802
  "fullTitle": "NodePyATVInstance Type Exports Type NodePyATVInstanceOptions should be exported",
3841
3803
  "timedOut": false,
3842
- "duration": 0,
3804
+ "duration": 1,
3843
3805
  "state": "passed",
3844
3806
  "speed": "fast",
3845
3807
  "pass": true,
3846
3808
  "fail": false,
3847
3809
  "pending": false,
3848
3810
  "context": null,
3849
- "code": "assert_1.default.ok(index_1.NodePyATVListenerState);",
3811
+ "code": "assert.ok(NodePyATVListenerState);",
3850
3812
  "err": {},
3851
- "uuid": "96377020-4207-482b-818a-745d1ff259e0",
3852
- "parentUUID": "297d3e00-6e25-4a89-a140-bda4524ccbe1",
3813
+ "uuid": "b3689777-8721-4056-a50c-6ae30ea8e2b8",
3814
+ "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
3853
3815
  "isHook": false,
3854
3816
  "skipped": false
3855
3817
  },
@@ -3864,30 +3826,30 @@
3864
3826
  "fail": false,
3865
3827
  "pending": false,
3866
3828
  "context": null,
3867
- "code": "assert_1.default.ok(index_1.NodePyATVPowerState);",
3829
+ "code": "assert.ok(NodePyATVPowerState);",
3868
3830
  "err": {},
3869
- "uuid": "72293536-5c7b-4d0f-9ede-3353a4e373d5",
3870
- "parentUUID": "297d3e00-6e25-4a89-a140-bda4524ccbe1",
3831
+ "uuid": "6e4f5b98-41a9-433d-b749-8df15f74ae24",
3832
+ "parentUUID": "ac68770f-d4cc-4752-97a2-bf02eea9b8f8",
3871
3833
  "isHook": false,
3872
3834
  "skipped": false
3873
3835
  }
3874
3836
  ],
3875
3837
  "suites": [],
3876
3838
  "passes": [
3877
- "df3d9463-81fe-426a-9085-e78e7028a1dd",
3878
- "99b640d8-871f-4f08-afae-e2a30a4c6555",
3879
- "384c7fde-c6cc-4296-9b89-959692e4f948",
3880
- "f537c602-43cd-4c99-a099-0e4932769354",
3881
- "5662a51f-b77b-4086-a781-8f0d79740b2e",
3882
- "3d5209e2-e35c-4b5a-aa6c-e44eafec7071",
3883
- "2288eaa6-e100-47de-b778-a8a0adc758d5",
3884
- "96377020-4207-482b-818a-745d1ff259e0",
3885
- "72293536-5c7b-4d0f-9ede-3353a4e373d5"
3839
+ "aedc1f97-1495-4ea8-8245-14dc8cc7551a",
3840
+ "ef401fbc-d937-4dd1-bb98-9c00d251c59a",
3841
+ "afd2dc21-049d-4d72-907f-c32aed3a875a",
3842
+ "d42df1b1-68e1-49fa-a641-476e2a06d5df",
3843
+ "fbd36b08-d9bc-4ca4-85ca-b75521ee2ea0",
3844
+ "c0668b92-575e-46ca-b493-253330cc57f4",
3845
+ "3c300c3e-2015-4673-af61-7f4d3635aefd",
3846
+ "b3689777-8721-4056-a50c-6ae30ea8e2b8",
3847
+ "6e4f5b98-41a9-433d-b749-8df15f74ae24"
3886
3848
  ],
3887
3849
  "failures": [],
3888
3850
  "pending": [],
3889
3851
  "skipped": [],
3890
- "duration": 0,
3852
+ "duration": 1,
3891
3853
  "root": false,
3892
3854
  "rootEmpty": false,
3893
3855
  "_timeout": 2000
@@ -3903,7 +3865,7 @@
3903
3865
  "_timeout": 2000
3904
3866
  },
3905
3867
  {
3906
- "uuid": "8bafc2e4-043e-4290-a72e-d511e70c0bc9",
3868
+ "uuid": "586f9c71-4275-4867-830b-c76b91e948f3",
3907
3869
  "title": "Tools",
3908
3870
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
3909
3871
  "file": "/test/tools.ts",
@@ -3912,7 +3874,7 @@
3912
3874
  "tests": [],
3913
3875
  "suites": [
3914
3876
  {
3915
- "uuid": "05212a84-1dff-453d-8de2-88a23c443db6",
3877
+ "uuid": "40c89ef4-5e57-4e9c-96b5-08a8cf01bf6c",
3916
3878
  "title": "addRequestId() / removeRequestId()",
3917
3879
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
3918
3880
  "file": "/test/tools.ts",
@@ -3930,10 +3892,10 @@
3930
3892
  "fail": false,
3931
3893
  "pending": false,
3932
3894
  "context": null,
3933
- "code": "const id = (0, tools_1.addRequestId)();\nassert_1.default.strictEqual(typeof id, 'string');\n(0, tools_1.removeRequestId)(id);",
3895
+ "code": "const id = addRequestId();\nassert.strictEqual(typeof id, 'string');\nremoveRequestId(id);",
3934
3896
  "err": {},
3935
- "uuid": "e2dd00d4-7b13-4e4a-b2bd-9d38c8730280",
3936
- "parentUUID": "05212a84-1dff-453d-8de2-88a23c443db6",
3897
+ "uuid": "c53e0ab5-9b61-4c9d-b237-e3dad7e3acbc",
3898
+ "parentUUID": "40c89ef4-5e57-4e9c-96b5-08a8cf01bf6c",
3937
3899
  "isHook": false,
3938
3900
  "skipped": false
3939
3901
  },
@@ -3948,18 +3910,18 @@
3948
3910
  "fail": false,
3949
3911
  "pending": false,
3950
3912
  "context": null,
3951
- "code": "(0, tools_1.removeRequestId)('FOO');",
3913
+ "code": "removeRequestId('FOO');",
3952
3914
  "err": {},
3953
- "uuid": "21410e67-88dd-49cd-994f-a2a22fb3a88f",
3954
- "parentUUID": "05212a84-1dff-453d-8de2-88a23c443db6",
3915
+ "uuid": "21f32a1b-f5b4-498c-9208-35b6ba4ff6b0",
3916
+ "parentUUID": "40c89ef4-5e57-4e9c-96b5-08a8cf01bf6c",
3955
3917
  "isHook": false,
3956
3918
  "skipped": false
3957
3919
  }
3958
3920
  ],
3959
3921
  "suites": [],
3960
3922
  "passes": [
3961
- "e2dd00d4-7b13-4e4a-b2bd-9d38c8730280",
3962
- "21410e67-88dd-49cd-994f-a2a22fb3a88f"
3923
+ "c53e0ab5-9b61-4c9d-b237-e3dad7e3acbc",
3924
+ "21f32a1b-f5b4-498c-9208-35b6ba4ff6b0"
3963
3925
  ],
3964
3926
  "failures": [],
3965
3927
  "pending": [],
@@ -3970,7 +3932,7 @@
3970
3932
  "_timeout": 2000
3971
3933
  },
3972
3934
  {
3973
- "uuid": "cfce0232-7969-448f-bcda-c8a304724e95",
3935
+ "uuid": "4a225b60-12c5-4efa-939f-a6652e90d8e4",
3974
3936
  "title": "debug()",
3975
3937
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
3976
3938
  "file": "/test/tools.ts",
@@ -3988,10 +3950,10 @@
3988
3950
  "fail": false,
3989
3951
  "pending": false,
3990
3952
  "context": null,
3991
- "code": "(0, tools_1.debug)('TEST', 'Hello World.', {});",
3953
+ "code": "debug('TEST', 'Hello World.', {});",
3992
3954
  "err": {},
3993
- "uuid": "f4d711e9-3bda-4c30-b9a3-b2a0435d40b9",
3994
- "parentUUID": "cfce0232-7969-448f-bcda-c8a304724e95",
3955
+ "uuid": "228d1ac5-96b8-4405-8456-1bdc13012fe3",
3956
+ "parentUUID": "4a225b60-12c5-4efa-939f-a6652e90d8e4",
3995
3957
  "isHook": false,
3996
3958
  "skipped": false
3997
3959
  },
@@ -4006,10 +3968,10 @@
4006
3968
  "fail": false,
4007
3969
  "pending": false,
4008
3970
  "context": null,
4009
- "code": "(0, tools_1.debug)('TEST', 'Hello World.', { debug: true });",
3971
+ "code": "debug('TEST', 'Hello World.', { debug: true });",
4010
3972
  "err": {},
4011
- "uuid": "5e322d81-b3b4-428a-8796-089550d5955b",
4012
- "parentUUID": "cfce0232-7969-448f-bcda-c8a304724e95",
3973
+ "uuid": "a6860a86-eb2c-4b27-8579-0abaeba1b54f",
3974
+ "parentUUID": "4a225b60-12c5-4efa-939f-a6652e90d8e4",
4013
3975
  "isHook": false,
4014
3976
  "skipped": false
4015
3977
  },
@@ -4024,10 +3986,10 @@
4024
3986
  "fail": false,
4025
3987
  "pending": false,
4026
3988
  "context": null,
4027
- "code": "(0, tools_1.debug)('TEST', 'Hello World.', {\n debug: function (msg) {\n assert_1.default.strictEqual(this, null);\n assert_1.default.ok(msg.includes('Hello World'));\n }\n});",
3989
+ "code": "debug('TEST', 'Hello World.', {\n debug: function (msg) {\n assert.strictEqual(this, null);\n assert.ok(msg.includes('Hello World'));\n }\n});",
4028
3990
  "err": {},
4029
- "uuid": "cb956f2b-cd82-4fa5-8731-149b3ac9d88d",
4030
- "parentUUID": "cfce0232-7969-448f-bcda-c8a304724e95",
3991
+ "uuid": "347b88b9-37d6-4bc9-b33d-20b44b988047",
3992
+ "parentUUID": "4a225b60-12c5-4efa-939f-a6652e90d8e4",
4031
3993
  "isHook": false,
4032
3994
  "skipped": false
4033
3995
  },
@@ -4042,10 +4004,10 @@
4042
4004
  "fail": false,
4043
4005
  "pending": false,
4044
4006
  "context": null,
4045
- "code": "(0, tools_1.debug)('TEST', 'Hello World.', { noColors: true });",
4007
+ "code": "debug('TEST', 'Hello World.', { noColors: true });",
4046
4008
  "err": {},
4047
- "uuid": "d3c9f18c-9fd1-4229-a916-ca7ccb0721bb",
4048
- "parentUUID": "cfce0232-7969-448f-bcda-c8a304724e95",
4009
+ "uuid": "28d25d3a-99a4-41ff-ac23-bdd45c83f5f1",
4010
+ "parentUUID": "4a225b60-12c5-4efa-939f-a6652e90d8e4",
4049
4011
  "isHook": false,
4050
4012
  "skipped": false
4051
4013
  },
@@ -4060,21 +4022,21 @@
4060
4022
  "fail": false,
4061
4023
  "pending": false,
4062
4024
  "context": null,
4063
- "code": "(0, tools_1.debug)('TEST', 'Hello World.', {\n noColors: true,\n debug: function (msg) {\n assert_1.default.strictEqual(this, null);\n assert_1.default.strictEqual(msg, '[node-pyatv][TEST] Hello World.');\n }\n});",
4025
+ "code": "debug('TEST', 'Hello World.', {\n noColors: true,\n debug: function (msg) {\n assert.strictEqual(this, null);\n assert.strictEqual(msg, '[node-pyatv][TEST] Hello World.');\n }\n});",
4064
4026
  "err": {},
4065
- "uuid": "9df8bb92-386d-45b6-a0d1-ab9282d2f989",
4066
- "parentUUID": "cfce0232-7969-448f-bcda-c8a304724e95",
4027
+ "uuid": "8e76c99e-c979-490a-a1fe-6ddb0c65e4fb",
4028
+ "parentUUID": "4a225b60-12c5-4efa-939f-a6652e90d8e4",
4067
4029
  "isHook": false,
4068
4030
  "skipped": false
4069
4031
  }
4070
4032
  ],
4071
4033
  "suites": [],
4072
4034
  "passes": [
4073
- "f4d711e9-3bda-4c30-b9a3-b2a0435d40b9",
4074
- "5e322d81-b3b4-428a-8796-089550d5955b",
4075
- "cb956f2b-cd82-4fa5-8731-149b3ac9d88d",
4076
- "d3c9f18c-9fd1-4229-a916-ca7ccb0721bb",
4077
- "9df8bb92-386d-45b6-a0d1-ab9282d2f989"
4035
+ "228d1ac5-96b8-4405-8456-1bdc13012fe3",
4036
+ "a6860a86-eb2c-4b27-8579-0abaeba1b54f",
4037
+ "347b88b9-37d6-4bc9-b33d-20b44b988047",
4038
+ "28d25d3a-99a4-41ff-ac23-bdd45c83f5f1",
4039
+ "8e76c99e-c979-490a-a1fe-6ddb0c65e4fb"
4078
4040
  ],
4079
4041
  "failures": [],
4080
4042
  "pending": [],
@@ -4085,7 +4047,7 @@
4085
4047
  "_timeout": 2000
4086
4048
  },
4087
4049
  {
4088
- "uuid": "3cd8346c-f0f6-4aef-a250-f24019275847",
4050
+ "uuid": "8af5cad0-f38b-4d95-9754-830b81fdd1a6",
4089
4051
  "title": "getExecutable()",
4090
4052
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
4091
4053
  "file": "/test/tools.ts",
@@ -4103,10 +4065,10 @@
4103
4065
  "fail": false,
4104
4066
  "pending": false,
4105
4067
  "context": null,
4106
- "code": "const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvremote, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert_1.default.strictEqual(result, '/tmp/1');",
4068
+ "code": "const result = getExecutable(NodePyATVExecutableType.atvremote, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert.strictEqual(result, '/tmp/1');",
4107
4069
  "err": {},
4108
- "uuid": "90d83e8a-e936-4b79-ba7a-3304b75051c0",
4109
- "parentUUID": "3cd8346c-f0f6-4aef-a250-f24019275847",
4070
+ "uuid": "e79ce043-641d-455d-8744-55903082a14b",
4071
+ "parentUUID": "8af5cad0-f38b-4d95-9754-830b81fdd1a6",
4110
4072
  "isHook": false,
4111
4073
  "skipped": false
4112
4074
  },
@@ -4114,17 +4076,17 @@
4114
4076
  "title": "should handle atvscriptPath if set",
4115
4077
  "fullTitle": "Tools getExecutable() should handle atvscriptPath if set",
4116
4078
  "timedOut": false,
4117
- "duration": 0,
4079
+ "duration": 1,
4118
4080
  "state": "passed",
4119
4081
  "speed": "fast",
4120
4082
  "pass": true,
4121
4083
  "fail": false,
4122
4084
  "pending": false,
4123
4085
  "context": null,
4124
- "code": "const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert_1.default.strictEqual(result, '/tmp/2');",
4086
+ "code": "const result = getExecutable(NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert.strictEqual(result, '/tmp/2');",
4125
4087
  "err": {},
4126
- "uuid": "04d01a83-7ecb-4dce-8659-a20f540c697c",
4127
- "parentUUID": "3cd8346c-f0f6-4aef-a250-f24019275847",
4088
+ "uuid": "ad840fe8-c84f-44e6-9df0-e6aa77013630",
4089
+ "parentUUID": "8af5cad0-f38b-4d95-9754-830b81fdd1a6",
4128
4090
  "isHook": false,
4129
4091
  "skipped": false
4130
4092
  },
@@ -4139,10 +4101,10 @@
4139
4101
  "fail": false,
4140
4102
  "pending": false,
4141
4103
  "context": null,
4142
- "code": "const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvremote, {\n atvscriptPath: '/tmp'\n});\nassert_1.default.strictEqual(result, 'atvremote');",
4104
+ "code": "const result = getExecutable(NodePyATVExecutableType.atvremote, {\n atvscriptPath: '/tmp'\n});\nassert.strictEqual(result, 'atvremote');",
4143
4105
  "err": {},
4144
- "uuid": "10f84aca-bf92-48ed-a69b-135c9c9f8230",
4145
- "parentUUID": "3cd8346c-f0f6-4aef-a250-f24019275847",
4106
+ "uuid": "8d87c226-d104-40c3-b6f0-f8e1a378e684",
4107
+ "parentUUID": "8af5cad0-f38b-4d95-9754-830b81fdd1a6",
4146
4108
  "isHook": false,
4147
4109
  "skipped": false
4148
4110
  },
@@ -4157,31 +4119,31 @@
4157
4119
  "fail": false,
4158
4120
  "pending": false,
4159
4121
  "context": null,
4160
- "code": "const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp'\n});\nassert_1.default.strictEqual(result, 'atvscript');",
4122
+ "code": "const result = getExecutable(NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp'\n});\nassert.strictEqual(result, 'atvscript');",
4161
4123
  "err": {},
4162
- "uuid": "8219abfd-671d-478e-8f5f-5a54dca0ff95",
4163
- "parentUUID": "3cd8346c-f0f6-4aef-a250-f24019275847",
4124
+ "uuid": "87a9cb57-3f96-4780-adc0-fdaf1c9ae038",
4125
+ "parentUUID": "8af5cad0-f38b-4d95-9754-830b81fdd1a6",
4164
4126
  "isHook": false,
4165
4127
  "skipped": false
4166
4128
  }
4167
4129
  ],
4168
4130
  "suites": [],
4169
4131
  "passes": [
4170
- "90d83e8a-e936-4b79-ba7a-3304b75051c0",
4171
- "04d01a83-7ecb-4dce-8659-a20f540c697c",
4172
- "10f84aca-bf92-48ed-a69b-135c9c9f8230",
4173
- "8219abfd-671d-478e-8f5f-5a54dca0ff95"
4132
+ "e79ce043-641d-455d-8744-55903082a14b",
4133
+ "ad840fe8-c84f-44e6-9df0-e6aa77013630",
4134
+ "8d87c226-d104-40c3-b6f0-f8e1a378e684",
4135
+ "87a9cb57-3f96-4780-adc0-fdaf1c9ae038"
4174
4136
  ],
4175
4137
  "failures": [],
4176
4138
  "pending": [],
4177
4139
  "skipped": [],
4178
- "duration": 0,
4140
+ "duration": 1,
4179
4141
  "root": false,
4180
4142
  "rootEmpty": false,
4181
4143
  "_timeout": 2000
4182
4144
  },
4183
4145
  {
4184
- "uuid": "3fe5f82c-98dd-4a58-ba8a-2d2234f4cb71",
4146
+ "uuid": "f29233d4-3a81-40dd-8c77-4f0ac42dab54",
4185
4147
  "title": "getParameters()",
4186
4148
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
4187
4149
  "file": "/test/tools.ts",
@@ -4192,17 +4154,17 @@
4192
4154
  "title": "empty case",
4193
4155
  "fullTitle": "Tools getParameters() empty case",
4194
4156
  "timedOut": false,
4195
- "duration": 0,
4157
+ "duration": 1,
4196
4158
  "state": "passed",
4197
4159
  "speed": "fast",
4198
4160
  "pass": true,
4199
4161
  "fail": false,
4200
4162
  "pending": false,
4201
4163
  "context": null,
4202
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)();\n assert_1.default.deepEqual(result, []);\n});",
4164
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield getParamters();\n assert.deepEqual(result, []);\n});",
4203
4165
  "err": {},
4204
- "uuid": "1f34855e-7424-45ea-a341-f41cfd9452c1",
4205
- "parentUUID": "3fe5f82c-98dd-4a58-ba8a-2d2234f4cb71",
4166
+ "uuid": "e0b27445-aea5-4187-a525-05c12875f612",
4167
+ "parentUUID": "f29233d4-3a81-40dd-8c77-4f0ac42dab54",
4206
4168
  "isHook": false,
4207
4169
  "skipped": false
4208
4170
  },
@@ -4210,17 +4172,17 @@
4210
4172
  "title": "easy case",
4211
4173
  "fullTitle": "Tools getParameters() easy case",
4212
4174
  "timedOut": false,
4213
- "duration": 1,
4175
+ "duration": 0,
4214
4176
  "state": "passed",
4215
4177
  "speed": "fast",
4216
4178
  "pass": true,
4217
4179
  "fail": false,
4218
4180
  "pending": false,
4219
4181
  "context": null,
4220
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)({\n host: '192.168.178.2'\n });\n assert_1.default.deepEqual(result, ['-s', '192.168.178.2']);\n});",
4182
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield getParamters({\n host: '192.168.178.2'\n });\n assert.deepEqual(result, ['-s', '192.168.178.2']);\n});",
4221
4183
  "err": {},
4222
- "uuid": "a097a521-b384-4d28-ba17-8941c025f66f",
4223
- "parentUUID": "3fe5f82c-98dd-4a58-ba8a-2d2234f4cb71",
4184
+ "uuid": "60f3f4da-feab-4ca4-8c1d-428c82eaea0a",
4185
+ "parentUUID": "f29233d4-3a81-40dd-8c77-4f0ac42dab54",
4224
4186
  "isHook": false,
4225
4187
  "skipped": false
4226
4188
  },
@@ -4228,37 +4190,37 @@
4228
4190
  "title": "full case",
4229
4191
  "fullTitle": "Tools getParameters() full case",
4230
4192
  "timedOut": false,
4231
- "duration": 0,
4193
+ "duration": 1,
4232
4194
  "state": "passed",
4233
4195
  "speed": "fast",
4234
4196
  "pass": true,
4235
4197
  "fail": false,
4236
4198
  "pending": false,
4237
4199
  "context": null,
4238
- "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)({\n hosts: ['192.168.178.2', '192.168.178.3'],\n id: '****',\n protocol: types_1.NodePyATVProtocol.mrp,\n dmapCredentials: '****',\n mrpCredentials: '****',\n airplayCredentials: '****',\n companionCredentials: '1234',\n raopCredentials: '::foo:'\n });\n assert_1.default.deepEqual(result, [\n '-s', '192.168.178.2,192.168.178.3',\n '-i', '****',\n '--protocol', 'mrp',\n '--dmap-credentials', '****',\n '--mrp-credentials', '****',\n '--airplay-credentials', '****',\n '--companion-credentials', '1234',\n '--raop-credentials', '::foo:'\n ]);\n});",
4200
+ "code": "return __awaiter(this, void 0, void 0, function* () {\n const result = yield getParamters({\n hosts: ['192.168.178.2', '192.168.178.3'],\n id: '****',\n protocol: NodePyATVProtocol.mrp,\n dmapCredentials: '****',\n mrpCredentials: '****',\n airplayCredentials: '****',\n companionCredentials: '1234',\n raopCredentials: '::foo:'\n });\n assert.deepEqual(result, [\n '-s', '192.168.178.2,192.168.178.3',\n '-i', '****',\n '--protocol', 'mrp',\n '--dmap-credentials', '****',\n '--mrp-credentials', '****',\n '--airplay-credentials', '****',\n '--companion-credentials', '1234',\n '--raop-credentials', '::foo:'\n ]);\n});",
4239
4201
  "err": {},
4240
- "uuid": "d48f1856-756b-4734-b4cd-ad38ffd76da9",
4241
- "parentUUID": "3fe5f82c-98dd-4a58-ba8a-2d2234f4cb71",
4202
+ "uuid": "0841601c-c2fa-4b15-88e4-c790d5d35406",
4203
+ "parentUUID": "f29233d4-3a81-40dd-8c77-4f0ac42dab54",
4242
4204
  "isHook": false,
4243
4205
  "skipped": false
4244
4206
  }
4245
4207
  ],
4246
4208
  "suites": [],
4247
4209
  "passes": [
4248
- "1f34855e-7424-45ea-a341-f41cfd9452c1",
4249
- "a097a521-b384-4d28-ba17-8941c025f66f",
4250
- "d48f1856-756b-4734-b4cd-ad38ffd76da9"
4210
+ "e0b27445-aea5-4187-a525-05c12875f612",
4211
+ "60f3f4da-feab-4ca4-8c1d-428c82eaea0a",
4212
+ "0841601c-c2fa-4b15-88e4-c790d5d35406"
4251
4213
  ],
4252
4214
  "failures": [],
4253
4215
  "pending": [],
4254
4216
  "skipped": [],
4255
- "duration": 1,
4217
+ "duration": 2,
4256
4218
  "root": false,
4257
4219
  "rootEmpty": false,
4258
4220
  "_timeout": 2000
4259
4221
  },
4260
4222
  {
4261
- "uuid": "44834610-06fc-4ec5-84e8-a3f37718b451",
4223
+ "uuid": "41891573-72ad-4342-9f99-108980caed03",
4262
4224
  "title": "parseState()",
4263
4225
  "fullFile": "/home/runner/work/node-pyatv/node-pyatv/test/tools.ts",
4264
4226
  "file": "/test/tools.ts",
@@ -4276,10 +4238,10 @@
4276
4238
  "fail": false,
4277
4239
  "pending": false,
4278
4240
  "context": null,
4279
- "code": "const input = {};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4241
+ "code": "const input = {};\nconst result = parseState(input, '', {});\nassert.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4280
4242
  "err": {},
4281
- "uuid": "02601be3-b0a9-4204-90f5-a7150ec75f71",
4282
- "parentUUID": "44834610-06fc-4ec5-84e8-a3f37718b451",
4243
+ "uuid": "a4cdc770-d9db-42be-a4bf-0aa743e55987",
4244
+ "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4283
4245
  "isHook": false,
4284
4246
  "skipped": false
4285
4247
  },
@@ -4294,10 +4256,10 @@
4294
4256
  "fail": false,
4295
4257
  "pending": false,
4296
4258
  "context": null,
4297
- "code": "// @ts-ignore\nconst result = (0, tools_1.parseState)(null, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4259
+ "code": "// @ts-ignore\nconst result = parseState(null, '', {});\nassert.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4298
4260
  "err": {},
4299
- "uuid": "00a69a38-ce90-41cb-9d2f-8c3b68c72af4",
4300
- "parentUUID": "44834610-06fc-4ec5-84e8-a3f37718b451",
4261
+ "uuid": "35455a43-b353-4d63-91c6-4d5a2ac39385",
4262
+ "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4301
4263
  "isHook": false,
4302
4264
  "skipped": false
4303
4265
  },
@@ -4305,17 +4267,17 @@
4305
4267
  "title": "should work with example data",
4306
4268
  "fullTitle": "Tools parseState() should work with example data",
4307
4269
  "timedOut": false,
4308
- "duration": 1,
4270
+ "duration": 0,
4309
4271
  "state": "passed",
4310
4272
  "speed": "fast",
4311
4273
  "pass": true,
4312
4274
  "fail": false,
4313
4275
  "pending": false,
4314
4276
  "context": null,
4315
- "code": "const input = {\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus',\n powerState: null\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: types_1.NodePyATVMediaType.video,\n deviceState: types_1.NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: types_1.NodePyATVShuffleState.off,\n repeat: types_1.NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n});",
4277
+ "code": "const input = {\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus',\n powerState: null\n};\nconst result = parseState(input, '', {});\nassert.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: NodePyATVMediaType.video,\n deviceState: NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: NodePyATVShuffleState.off,\n repeat: NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n});",
4316
4278
  "err": {},
4317
- "uuid": "c2308189-a947-4b01-b52b-63c791bcbeab",
4318
- "parentUUID": "44834610-06fc-4ec5-84e8-a3f37718b451",
4279
+ "uuid": "cc0061b9-a747-445d-82da-684471991cec",
4280
+ "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4319
4281
  "isHook": false,
4320
4282
  "skipped": false
4321
4283
  },
@@ -4330,10 +4292,10 @@
4330
4292
  "fail": false,
4331
4293
  "pending": false,
4332
4294
  "context": null,
4333
- "code": "const input = {\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n};\nassert_1.default.throws(() => {\n (0, tools_1.parseState)(input, '', {});\n}, /Got pyatv Error: invalid credentials: 321/);",
4295
+ "code": "const input = {\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n};\nassert.throws(() => {\n parseState(input, '', {});\n}, /Got pyatv Error: invalid credentials: 321/);",
4334
4296
  "err": {},
4335
- "uuid": "d9ea713e-61ec-4b7e-a27f-e9c1d199eb73",
4336
- "parentUUID": "44834610-06fc-4ec5-84e8-a3f37718b451",
4297
+ "uuid": "5b32445e-ac1b-430f-908e-eb493e9dd091",
4298
+ "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4337
4299
  "isHook": false,
4338
4300
  "skipped": false
4339
4301
  },
@@ -4341,17 +4303,17 @@
4341
4303
  "title": "should ignore date if it's an invalid date",
4342
4304
  "fullTitle": "Tools parseState() should ignore date if it's an invalid date",
4343
4305
  "timedOut": false,
4344
- "duration": 0,
4306
+ "duration": 1,
4345
4307
  "state": "passed",
4346
4308
  "speed": "fast",
4347
4309
  "pass": true,
4348
4310
  "fail": false,
4349
4311
  "pending": false,
4350
4312
  "context": null,
4351
- "code": "const input = { datetime: 'today' };\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4313
+ "code": "const input = { datetime: 'today' };\nconst result = parseState(input, '', {});\nassert.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4352
4314
  "err": {},
4353
- "uuid": "8ef58873-c6e0-4c28-9113-e76500d5ad39",
4354
- "parentUUID": "44834610-06fc-4ec5-84e8-a3f37718b451",
4315
+ "uuid": "d5290047-610d-4b9d-8833-2bf9c57e5d6a",
4316
+ "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4355
4317
  "isHook": false,
4356
4318
  "skipped": false
4357
4319
  },
@@ -4366,10 +4328,10 @@
4366
4328
  "fail": false,
4367
4329
  "pending": false,
4368
4330
  "context": null,
4369
- "code": "const input = {\n result: 'success',\n datetime: true,\n hash: 1337,\n media_type: false,\n device_state: 43,\n title: undefined,\n artist: 90,\n album: Infinity,\n genre: Math.PI,\n total_time: '23min',\n position: '0:30.123',\n shuffle: false,\n repeat: true,\n app: 0,\n app_id: 891645381647289,\n powerState: null\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4331
+ "code": "const input = {\n result: 'success',\n datetime: true,\n hash: 1337,\n media_type: false,\n device_state: 43,\n title: undefined,\n artist: 90,\n album: Infinity,\n genre: Math.PI,\n total_time: '23min',\n position: '0:30.123',\n shuffle: false,\n repeat: true,\n app: 0,\n app_id: 891645381647289,\n powerState: null\n};\nconst result = parseState(input, '', {});\nassert.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4370
4332
  "err": {},
4371
- "uuid": "a129b28b-b28a-405f-ad6d-57ea6e3966f0",
4372
- "parentUUID": "44834610-06fc-4ec5-84e8-a3f37718b451",
4333
+ "uuid": "f65a5713-7186-4c4d-9fa6-7fd9c3073e0e",
4334
+ "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4373
4335
  "isHook": false,
4374
4336
  "skipped": false
4375
4337
  },
@@ -4384,23 +4346,23 @@
4384
4346
  "fail": false,
4385
4347
  "pending": false,
4386
4348
  "context": null,
4387
- "code": "const input = {\n media_type: '3d-experience',\n device_state: 'initiating',\n shuffle: 'everything',\n repeat: 'nothing'\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4349
+ "code": "const input = {\n media_type: '3d-experience',\n device_state: 'initiating',\n shuffle: 'everything',\n repeat: 'nothing'\n};\nconst result = parseState(input, '', {});\nassert.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});",
4388
4350
  "err": {},
4389
- "uuid": "67326826-0720-4c84-9f2c-f04390717f1a",
4390
- "parentUUID": "44834610-06fc-4ec5-84e8-a3f37718b451",
4351
+ "uuid": "28d9d121-903e-492b-8a95-f6cdd1b12d81",
4352
+ "parentUUID": "41891573-72ad-4342-9f99-108980caed03",
4391
4353
  "isHook": false,
4392
4354
  "skipped": false
4393
4355
  }
4394
4356
  ],
4395
4357
  "suites": [],
4396
4358
  "passes": [
4397
- "02601be3-b0a9-4204-90f5-a7150ec75f71",
4398
- "00a69a38-ce90-41cb-9d2f-8c3b68c72af4",
4399
- "c2308189-a947-4b01-b52b-63c791bcbeab",
4400
- "d9ea713e-61ec-4b7e-a27f-e9c1d199eb73",
4401
- "8ef58873-c6e0-4c28-9113-e76500d5ad39",
4402
- "a129b28b-b28a-405f-ad6d-57ea6e3966f0",
4403
- "67326826-0720-4c84-9f2c-f04390717f1a"
4359
+ "a4cdc770-d9db-42be-a4bf-0aa743e55987",
4360
+ "35455a43-b353-4d63-91c6-4d5a2ac39385",
4361
+ "cc0061b9-a747-445d-82da-684471991cec",
4362
+ "5b32445e-ac1b-430f-908e-eb493e9dd091",
4363
+ "d5290047-610d-4b9d-8833-2bf9c57e5d6a",
4364
+ "f65a5713-7186-4c4d-9fa6-7fd9c3073e0e",
4365
+ "28d9d121-903e-492b-8a95-f6cdd1b12d81"
4404
4366
  ],
4405
4367
  "failures": [],
4406
4368
  "pending": [],