@sebbo2002/node-pyatv 5.1.2-develop.2 → 5.1.2-develop.3

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 (37) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/docs/coverage/cobertura-coverage.xml +4 -4
  3. package/docs/coverage/device-event.ts.html +1 -1
  4. package/docs/coverage/device-events.ts.html +1 -1
  5. package/docs/coverage/device.ts.html +1 -1
  6. package/docs/coverage/fake-spawn.ts.html +1 -1
  7. package/docs/coverage/index.html +1 -1
  8. package/docs/coverage/index.ts.html +1 -1
  9. package/docs/coverage/instance.ts.html +1 -1
  10. package/docs/coverage/tools.ts.html +4 -4
  11. package/docs/coverage/types.ts.html +1 -1
  12. package/docs/reference/classes/NodePyATVDevice.html +74 -74
  13. package/docs/reference/classes/NodePyATVDeviceEvent.html +10 -10
  14. package/docs/reference/classes/NodePyATVInstance.html +14 -14
  15. package/docs/reference/enums/NodePyATVDeviceState.html +11 -11
  16. package/docs/reference/enums/NodePyATVExecutableType.html +7 -7
  17. package/docs/reference/enums/NodePyATVKeys.html +28 -28
  18. package/docs/reference/enums/NodePyATVListenerState.html +9 -9
  19. package/docs/reference/enums/NodePyATVMediaType.html +9 -9
  20. package/docs/reference/enums/NodePyATVPowerState.html +7 -7
  21. package/docs/reference/enums/NodePyATVProtocol.html +9 -9
  22. package/docs/reference/enums/NodePyATVRepeatState.html +8 -8
  23. package/docs/reference/enums/NodePyATVShuffleState.html +8 -8
  24. package/docs/reference/index.html +4 -4
  25. package/docs/reference/interfaces/NodePyATVDeviceOptions.html +25 -25
  26. package/docs/reference/interfaces/NodePyATVFindAndInstanceOptions.html +19 -19
  27. package/docs/reference/interfaces/NodePyATVFindOptions.html +14 -14
  28. package/docs/reference/interfaces/NodePyATVGetStateOptions.html +6 -6
  29. package/docs/reference/interfaces/NodePyATVInstanceOptions.html +10 -10
  30. package/docs/reference/interfaces/NodePyATVService.html +7 -7
  31. package/docs/reference/interfaces/NodePyATVState.html +20 -20
  32. package/docs/reference/interfaces/NodePyATVVersionResponse.html +7 -7
  33. package/docs/reference/modules.html +4 -4
  34. package/docs/reference/types/NodePyATVEventValueType.html +5 -5
  35. package/docs/tests/index.html +1 -1
  36. package/docs/tests/mochawesome.json +666 -666
  37. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
1
  <!doctype html>
2
- <html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Mochawesome Report</title><link rel="stylesheet" href="assets/app.css"/></head><body data-raw="{&quot;stats&quot;:{&quot;suites&quot;:89,&quot;tests&quot;:153,&quot;passes&quot;:151,&quot;pending&quot;:2,&quot;failures&quot;:0,&quot;start&quot;:&quot;2022-12-04T20:31:00.008Z&quot;,&quot;end&quot;:&quot;2022-12-04T20:31:12.133Z&quot;,&quot;duration&quot;:12125,&quot;testsRegistered&quot;:153,&quot;passPercent&quot;:100,&quot;pendingPercent&quot;:1.3071895424836601,&quot;other&quot;:0,&quot;hasOther&quot;:false,&quot;skipped&quot;:0,&quot;hasSkipped&quot;:false},&quot;results&quot;:[{&quot;uuid&quot;:&quot;0117a60a-217e-4044-b3f7-6c131d095821&quot;,&quot;title&quot;:&quot;&quot;,&quot;fullFile&quot;:&quot;&quot;,&quot;file&quot;:&quot;&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[],&quot;suites&quot;:[{&quot;uuid&quot;:&quot;e7896a44-5b5a-4d37-a7a7-735ec167ebf7&quot;,&quot;title&quot;:&quot;NodePyATVDeviceEvent&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts&quot;,&quot;file&quot;:&quot;/test/device-event.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[],&quot;suites&quot;:[{&quot;uuid&quot;:&quot;d4101797-11ec-4c40-9f93-c76079ecf0ec&quot;,&quot;title&quot;:&quot;get key()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts&quot;,&quot;file&quot;:&quot;/test/device-event.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvent get key() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const event = new NodePyATVDeviceEvent({\n key: &#x27;genre&#x27;,\n old: &#x27;Jazz&#x27;,\n new: &#x27;Rock&#x27;,\n device: new NodePyATVDevice({\n host: &#x27;192.168.178.2&#x27;,\n name: &#x27;My Testinstance&#x27;\n })\n});\nassert.strictEqual(event.key, &#x27;genre&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;9b3ea757-a9b4-4794-98c6-2b7e758dd3d3&quot;,&quot;parentUUID&quot;:&quot;d4101797-11ec-4c40-9f93-c76079ecf0ec&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;9b3ea757-a9b4-4794-98c6-2b7e758dd3d3&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;f7ba29e5-b433-4d56-872d-cafbff9aacc0&quot;,&quot;title&quot;:&quot;get oldValue()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts&quot;,&quot;file&quot;:&quot;/test/device-event.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvent get oldValue() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const event = new NodePyATVDeviceEvent({\n key: &#x27;genre&#x27;,\n old: &#x27;Jazz&#x27;,\n new: &#x27;Rock&#x27;,\n device: new NodePyATVDevice({\n host: &#x27;192.168.178.2&#x27;,\n name: &#x27;My Testinstance&#x27;\n })\n});\nassert.strictEqual(event.oldValue, &#x27;Jazz&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;41bf9cc2-2419-4625-b98b-78222c5dc431&quot;,&quot;parentUUID&quot;:&quot;f7ba29e5-b433-4d56-872d-cafbff9aacc0&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;41bf9cc2-2419-4625-b98b-78222c5dc431&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;ca46d0df-fed3-4f05-b817-c185c21c6a11&quot;,&quot;title&quot;:&quot;get newValue()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts&quot;,&quot;file&quot;:&quot;/test/device-event.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvent get newValue() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const event = new NodePyATVDeviceEvent({\n key: &#x27;genre&#x27;,\n old: &#x27;Jazz&#x27;,\n new: &#x27;Rock&#x27;,\n device: new NodePyATVDevice({\n host: &#x27;192.168.178.2&#x27;,\n name: &#x27;My Testinstance&#x27;\n })\n});\nassert.strictEqual(event.newValue, &#x27;Rock&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;33d1a15e-92f8-42ad-acf4-3c3512d52ad2&quot;,&quot;parentUUID&quot;:&quot;ca46d0df-fed3-4f05-b817-c185c21c6a11&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;33d1a15e-92f8-42ad-acf4-3c3512d52ad2&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;33cd170b-87af-4fa6-b32a-3adb8fcd4f38&quot;,&quot;title&quot;:&quot;get value()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts&quot;,&quot;file&quot;:&quot;/test/device-event.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvent get value() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const event = new NodePyATVDeviceEvent({\n key: &#x27;genre&#x27;,\n old: &#x27;Jazz&#x27;,\n new: &#x27;Rock&#x27;,\n device: new NodePyATVDevice({\n host: &#x27;192.168.178.2&#x27;,\n name: &#x27;My Testinstance&#x27;\n })\n});\nassert.strictEqual(event.value, &#x27;Rock&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5b4a2ab1-138f-4b37-bdce-2459d75cc0d2&quot;,&quot;parentUUID&quot;:&quot;33cd170b-87af-4fa6-b32a-3adb8fcd4f38&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;5b4a2ab1-138f-4b37-bdce-2459d75cc0d2&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;85aebab5-d12e-4b5b-8f8a-089bdd798ef7&quot;,&quot;title&quot;:&quot;get device()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts&quot;,&quot;file&quot;:&quot;/test/device-event.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvent get device() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n host: &#x27;192.168.178.2&#x27;,\n name: &#x27;My Testinstance&#x27;\n});\nconst event = new NodePyATVDeviceEvent({\n key: &#x27;genre&#x27;,\n old: &#x27;Jazz&#x27;,\n new: &#x27;Rock&#x27;,\n device\n});\nassert.deepEqual(event.device, device);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;80d1baee-29f7-44a3-a440-46f86464c770&quot;,&quot;parentUUID&quot;:&quot;85aebab5-d12e-4b5b-8f8a-089bdd798ef7&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;80d1baee-29f7-44a3-a440-46f86464c770&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000}],&quot;passes&quot;:[],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;129d119e-4b95-46bc-97ba-6e261850b675&quot;,&quot;title&quot;:&quot;NodePyATVDeviceEvents&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[],&quot;suites&quot;:[{&quot;uuid&quot;:&quot;b3e3d868-3a84-4108-9185-bebb662c63dd&quot;,&quot;title&quot;:&quot;applyStateAndEmitEvents()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should emit update:key event&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update:key event&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:3,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n yield new Promise(cb =&gt; {\n device.once(&#x27;update:title&#x27;, event =&gt; {\n assert.ok(event instanceof NodePyATVDeviceEvent);\n assert.strictEqual(event.key, &#x27;title&#x27;);\n assert.strictEqual(event.oldValue, null);\n assert.strictEqual(event.newValue, &#x27;My Movie&#x27;);\n assert.strictEqual(event.value, &#x27;My Movie&#x27;);\n assert.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;53997fee-3344-4eca-a577-2a0b091a8766&quot;,&quot;parentUUID&quot;:&quot;b3e3d868-3a84-4108-9185-bebb662c63dd&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should emit update event&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update event&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n yield new Promise(cb =&gt; {\n device.once(&#x27;update&#x27;, event =&gt; {\n assert.ok(event instanceof NodePyATVDeviceEvent);\n assert.strictEqual(event.key, &#x27;title&#x27;);\n assert.strictEqual(event.oldValue, null);\n assert.strictEqual(event.newValue, &#x27;My Movie&#x27;);\n assert.strictEqual(event.value, &#x27;My Movie&#x27;);\n assert.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;92cc5e8e-8aac-4f58-a441-e9b202f363e4&quot;,&quot;parentUUID&quot;:&quot;b3e3d868-3a84-4108-9185-bebb662c63dd&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should emit update:key event before update&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update:key event before update&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:3,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n const sort = [];\n yield Promise.race([\n new Promise(cb =&gt; {\n device.once(&#x27;update&#x27;, () =&gt; {\n sort.push(&#x27;update&#x27;);\n cb(undefined);\n });\n }),\n new Promise(cb =&gt; {\n device.once(&#x27;update:title&#x27;, () =&gt; {\n sort.push(&#x27;update:title&#x27;);\n cb(undefined);\n });\n })\n ]);\n assert.deepStrictEqual(sort, [&#x27;update:title&#x27;, &#x27;update&#x27;]);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;53f1d7b0-d14e-42fa-a606-a87e449f60ab&quot;,&quot;parentUUID&quot;:&quot;b3e3d868-3a84-4108-9185-bebb662c63dd&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should emit error events on failures&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should emit error events on failures&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;failure&#x27;,\n datetime: &#x27;2021-11-24T21:13:36.424576+03:00&#x27;,\n exception: &#x27;invalid credentials: 321&#x27;,\n stacktrace: &#x27;Traceback (most recent call last):\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\&quot;, line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\&quot;, line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\&quot;, line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\&quot;, line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\&quot;, line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\&quot;, line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\&quot;invalid credentials: \\\&quot; + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n&#x27;\n });\n })\n });\n yield new Promise(cb =&gt; {\n device.once(&#x27;error&#x27;, error =&gt; {\n assert.ok(error instanceof Error);\n assert.ok(error.toString().includes(&#x27;invalid credentials: 321&#x27;));\n cb(undefined);\n });\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;c0380902-3200-4d8d-a233-532e6d807d9a&quot;,&quot;parentUUID&quot;:&quot;b3e3d868-3a84-4108-9185-bebb662c63dd&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should not emit an update if new value is same as old one&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should not emit an update if new value is same as old one&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:4,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n let spawnCounter = 0;\n let eventCounter = 0;\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n if (spawnCounter === 0) {\n cp.onStdIn(() =&gt; cp.end());\n }\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n spawnCounter++;\n if (spawnCounter &gt;= 2) {\n cp.end();\n }\n })\n });\n const listener = () =&gt; {\n eventCounter++;\n };\n device.on(&#x27;update&#x27;, listener);\n yield new Promise(cb =&gt; setTimeout(cb, 0));\n yield device.getState();\n device.off(&#x27;update&#x27;, listener);\n assert.strictEqual(spawnCounter, 2);\n assert.strictEqual(eventCounter, 1);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;b1b7bae8-6031-41cf-91bc-089022632a1f&quot;,&quot;parentUUID&quot;:&quot;b3e3d868-3a84-4108-9185-bebb662c63dd&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should emit error event if event listener throws an exception&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should emit error event if event listener throws an exception&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n let callCounter = 0;\n const error = new Error(&#x27;This is an error. Be nice.&#x27;);\n device.once(&#x27;error&#x27;, err =&gt; {\n assert.strictEqual(err, error);\n callCounter++;\n });\n const listener = () =&gt; {\n throw error;\n };\n device.on(&#x27;update&#x27;, listener);\n yield new Promise(cb =&gt; setTimeout(cb, 0));\n device.off(&#x27;update&#x27;, listener);\n assert.strictEqual(callCounter, 1);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;398d0c87-9b67-443f-8d41-4781020e26a7&quot;,&quot;parentUUID&quot;:&quot;b3e3d868-3a84-4108-9185-bebb662c63dd&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should also work with powerState&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should also work with powerState&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n datetime: new Date().toJSON(),\n power_state: &#x27;off&#x27;\n });\n })\n });\n yield new Promise(cb =&gt; {\n device.once(&#x27;update:powerState&#x27;, event =&gt; {\n assert.ok(event instanceof NodePyATVDeviceEvent);\n assert.strictEqual(event.key, &#x27;powerState&#x27;);\n assert.strictEqual(event.oldValue, null);\n assert.strictEqual(event.newValue, &#x27;off&#x27;);\n assert.strictEqual(event.newValue, NodePyATVPowerState.off);\n assert.strictEqual(event.value, &#x27;off&#x27;);\n assert.strictEqual(event.value, NodePyATVPowerState.off);\n assert.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;e153dd04-8966-4b68-bff8-6f5486f9b94a&quot;,&quot;parentUUID&quot;:&quot;b3e3d868-3a84-4108-9185-bebb662c63dd&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;53997fee-3344-4eca-a577-2a0b091a8766&quot;,&quot;92cc5e8e-8aac-4f58-a441-e9b202f363e4&quot;,&quot;53f1d7b0-d14e-42fa-a606-a87e449f60ab&quot;,&quot;c0380902-3200-4d8d-a233-532e6d807d9a&quot;,&quot;b1b7bae8-6031-41cf-91bc-089022632a1f&quot;,&quot;398d0c87-9b67-443f-8d41-4781020e26a7&quot;,&quot;e153dd04-8966-4b68-bff8-6f5486f9b94a&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:18,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;37ba14f9-2d31-4b46-b5c2-b2a2ca85e050&quot;,&quot;title&quot;:&quot;start|stopListening()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should emit error if spawn fails&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents start|stopListening() should emit error if spawn fails&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:3,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const error = new Error();\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.error(error).end();\n })\n });\n const listener = () =&gt; {\n // empty listener\n };\n device.on(&#x27;update&#x27;, listener);\n yield new Promise(cb =&gt; {\n device.once(&#x27;error&#x27;, err =&gt; {\n assert.strictEqual(err, error);\n cb(undefined);\n });\n });\n device.off(&#x27;update&#x27;, listener);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;6e9a29e3-1a56-46be-a625-8b695bae7b43&quot;,&quot;parentUUID&quot;:&quot;37ba14f9-2d31-4b46-b5c2-b2a2ca85e050&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should emit error on stderr data&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents start|stopListening() should emit error on stderr data&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.stderr(&#x27;Hello World!&#x27;).end();\n })\n });\n const listener = () =&gt; {\n // empty listener\n };\n device.on(&#x27;update&#x27;, listener);\n yield new Promise(cb =&gt; {\n device.once(&#x27;error&#x27;, err =&gt; {\n assert.ok(err instanceof Error);\n assert.ok(err.toString().includes(&#x27;Got stderr output from pyatv: Hello World!&#x27;));\n cb(undefined);\n });\n });\n device.off(&#x27;update&#x27;, listener);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d7ffa2b0-169a-4747-898e-91bda2e6f028&quot;,&quot;parentUUID&quot;:&quot;37ba14f9-2d31-4b46-b5c2-b2a2ca85e050&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should emit error if stdout is not valid json&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents start|stopListening() should emit error if stdout is not valid json&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout(&#x27;#&#x27;).end();\n })\n });\n const listener = () =&gt; {\n // empty listener\n };\n device.on(&#x27;update&#x27;, listener);\n yield new Promise(cb =&gt; {\n device.once(&#x27;error&#x27;, err =&gt; {\n assert.ok(err instanceof Error);\n assert.ok(err.toString().includes(&#x27;Unable to parse stdout json: SyntaxError: &#x27; +\n &#x27;Unexpected token # in JSON at position 0&#x27;));\n cb(undefined);\n });\n });\n device.off(&#x27;update&#x27;, listener);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;737e8930-2363-45d9-b6ce-59959ae0c914&quot;,&quot;parentUUID&quot;:&quot;37ba14f9-2d31-4b46-b5c2-b2a2ca85e050&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should restart the process if it gets killed&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents start|stopListening() should restart the process if it gets killed&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;pending&quot;,&quot;pass&quot;:false,&quot;fail&quot;:false,&quot;pending&quot;:true,&quot;code&quot;:&quot;&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;db2675a0-ac8d-4912-ad04-ef2f3bf6201f&quot;,&quot;parentUUID&quot;:&quot;37ba14f9-2d31-4b46-b5c2-b2a2ca85e050&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;6e9a29e3-1a56-46be-a625-8b695bae7b43&quot;,&quot;d7ffa2b0-169a-4747-898e-91bda2e6f028&quot;,&quot;737e8930-2363-45d9-b6ce-59959ae0c914&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[&quot;db2675a0-ac8d-4912-ad04-ef2f3bf6201f&quot;],&quot;skipped&quot;:[],&quot;duration&quot;:7,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;6bfd6e26-9169-4de4-a898-ab7f3f1bb36d&quot;,&quot;title&quot;:&quot;addListener() / removeAllListeners()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work without any exceptions&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents addListener() / removeAllListeners() should work without any exceptions&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n const listener = () =&gt; {\n // empty listener\n };\n device.addListener(&#x27;update&#x27;, listener);\n device.removeAllListeners(&#x27;update&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;eee8a055-fd8e-4946-b1f7-4b408a1bf728&quot;,&quot;parentUUID&quot;:&quot;6bfd6e26-9169-4de4-a898-ab7f3f1bb36d&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;eee8a055-fd8e-4946-b1f7-4b408a1bf728&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;dd82782c-afe3-406c-a232-eab44947f462&quot;,&quot;title&quot;:&quot;emit()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents emit() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n })\n});\nconst event = new NodePyATVDeviceEvent({\n key: &#x27;dateTime&#x27;,\n old: &#x27;foo&#x27;,\n new: &#x27;bar&#x27;,\n device\n});\nlet executions = 0;\ndevice.once(&#x27;test&#x27;, (e) =&gt; {\n executions++;\n assert.strictEqual(e, event);\n assert.strictEqual(executions, 1);\n done();\n});\ndevice.emit(&#x27;test&#x27;, event);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;abf02347-2a8a-4196-9ff9-ee367b3c3888&quot;,&quot;parentUUID&quot;:&quot;dd82782c-afe3-406c-a232-eab44947f462&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;abf02347-2a8a-4196-9ff9-ee367b3c3888&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;470583f8-8d3a-4631-ba27-04ad8e20693e&quot;,&quot;title&quot;:&quot;eventNames()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents eventNames() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n })\n});\nconst listener = () =&gt; {\n // ignore\n};\ndevice.on(&#x27;test&#x27;, listener);\nassert.deepStrictEqual(device.eventNames(), [&#x27;test&#x27;]);\ndevice.off(&#x27;test&#x27;, listener);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;3adcf0d7-7a5a-4650-ab28-e4b36d490c99&quot;,&quot;parentUUID&quot;:&quot;470583f8-8d3a-4631-ba27-04ad8e20693e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;3adcf0d7-7a5a-4650-ab28-e4b36d490c99&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;87895c1e-460e-49d1-be4a-2dbaad04d5e8&quot;,&quot;title&quot;:&quot;getMaxListeners()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents getMaxListeners() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n })\n});\nconst result = device.getMaxListeners();\nassert.ok(typeof result, &#x27;number&#x27;);\nassert.ok(result &gt;= 10);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;ad5ff744-91b7-4c54-905f-faed9c624250&quot;,&quot;parentUUID&quot;:&quot;87895c1e-460e-49d1-be4a-2dbaad04d5e8&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;ad5ff744-91b7-4c54-905f-faed9c624250&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;b47ac8af-fa2c-4656-8ae3-ba1ee520596d&quot;,&quot;title&quot;:&quot;listenerCount()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents listenerCount() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n })\n});\nconst listener = () =&gt; {\n // ignore\n};\nassert.deepStrictEqual(device.listenerCount(&#x27;test&#x27;), 0);\ndevice.on(&#x27;test&#x27;, listener);\nassert.deepStrictEqual(device.listenerCount(&#x27;test&#x27;), 1);\ndevice.off(&#x27;test&#x27;, listener);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;87c1ef26-f675-4452-8eda-e61d5c6b045b&quot;,&quot;parentUUID&quot;:&quot;b47ac8af-fa2c-4656-8ae3-ba1ee520596d&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;87c1ef26-f675-4452-8eda-e61d5c6b045b&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;8d85ae36-245a-4205-b11c-7b857e75c982&quot;,&quot;title&quot;:&quot;listeners()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents listeners() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n })\n});\nconst listener = () =&gt; {\n // ignore\n};\nassert.deepStrictEqual(device.listeners(&#x27;test&#x27;).length, 0);\ndevice.on(&#x27;test&#x27;, listener);\nassert.deepStrictEqual(device.listeners(&#x27;test&#x27;).length, 1);\nassert.deepStrictEqual(device.listeners(&#x27;test&#x27;)[0], listener);\ndevice.off(&#x27;test&#x27;, listener);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;ffe19b1c-a6dc-4328-ab63-17b5076c4694&quot;,&quot;parentUUID&quot;:&quot;8d85ae36-245a-4205-b11c-7b857e75c982&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;ffe19b1c-a6dc-4328-ab63-17b5076c4694&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;7999ecaa-01a3-4a18-80ba-2cb70b20300f&quot;,&quot;title&quot;:&quot;prependListener()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents prependListener() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n});\nconst listener = () =&gt; {\n device.removeAllListeners(&#x27;update&#x27;);\n done();\n};\ndevice.prependListener(&#x27;update&#x27;, listener);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;16cdb361-6b6f-49f6-bbd4-9a0019f58342&quot;,&quot;parentUUID&quot;:&quot;7999ecaa-01a3-4a18-80ba-2cb70b20300f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;16cdb361-6b6f-49f6-bbd4-9a0019f58342&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;d78de119-3b48-4504-bc99-00f3813e7425&quot;,&quot;title&quot;:&quot;prependOnceListener()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents prependOnceListener() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n});\ndevice.prependOnceListener(&#x27;update&#x27;, () =&gt; done());&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;aaa904e1-ec2d-4bb6-90d3-2f8d3c39f3a7&quot;,&quot;parentUUID&quot;:&quot;d78de119-3b48-4504-bc99-00f3813e7425&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;aaa904e1-ec2d-4bb6-90d3-2f8d3c39f3a7&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;c95facec-5a59-48f2-9919-d9a4aecd90be&quot;,&quot;title&quot;:&quot;rawListeners()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents rawListeners() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n })\n});\nconst listener = () =&gt; {\n // ignore\n};\nassert.deepStrictEqual(device.rawListeners(&#x27;test&#x27;).length, 0);\ndevice.on(&#x27;test&#x27;, listener);\nassert.deepStrictEqual(device.rawListeners(&#x27;test&#x27;).length, 1);\nassert.deepStrictEqual(device.rawListeners(&#x27;test&#x27;)[0], listener);\ndevice.off(&#x27;test&#x27;, listener);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d1cca319-0efb-4751-9a2b-9cb0a525176c&quot;,&quot;parentUUID&quot;:&quot;c95facec-5a59-48f2-9919-d9a4aecd90be&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;d1cca319-0efb-4751-9a2b-9cb0a525176c&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;1fe91263-3321-4846-b6e6-bcd180a1bc63&quot;,&quot;title&quot;:&quot;removeListener()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work without any exceptions&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents removeListener() should work without any exceptions&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n const listener = () =&gt; {\n // empty listener\n };\n device.addListener(&#x27;update&#x27;, listener);\n assert.deepStrictEqual(device.listenerCount(&#x27;update&#x27;), 1);\n device.removeListener(&#x27;update&#x27;, listener);\n assert.deepStrictEqual(device.listenerCount(&#x27;update&#x27;), 0);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;a9f4a19d-2c50-4876-8ad3-a9895c9b4e5c&quot;,&quot;parentUUID&quot;:&quot;1fe91263-3321-4846-b6e6-bcd180a1bc63&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;a9f4a19d-2c50-4876-8ad3-a9895c9b4e5c&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000}],&quot;passes&quot;:[],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;bf34a931-1b34-48e9-9198-9433a949405b&quot;,&quot;title&quot;:&quot;NodePyATVDevice&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[],&quot;suites&quot;:[{&quot;uuid&quot;:&quot;15a27fff-2454-492e-8484-ed6f0ebb9a05&quot;,&quot;title&quot;:&quot;get name()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the name&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get name() should return the name&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n});\nassert.strictEqual(device.name, &#x27;My Testdevice&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;59a3af56-27aa-4c88-801d-f5b835aaa695&quot;,&quot;parentUUID&quot;:&quot;15a27fff-2454-492e-8484-ed6f0ebb9a05&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;59a3af56-27aa-4c88-801d-f5b835aaa695&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;549fa181-1dd0-478d-b3be-8eb0aa027b80&quot;,&quot;title&quot;:&quot;get host()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the host&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get host() should return the host&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n});\nassert.strictEqual(device.host, &#x27;192.168.178.2&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;ce63de02-7e05-450c-a382-46c69abfbfc4&quot;,&quot;parentUUID&quot;:&quot;549fa181-1dd0-478d-b3be-8eb0aa027b80&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;ce63de02-7e05-450c-a382-46c69abfbfc4&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;a6fae636-3a50-4e38-8eac-57ccf0f3d4a0&quot;,&quot;title&quot;:&quot;get id()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the id&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get id() should return the id&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n id: &#x27;*****&#x27;\n});\nassert.strictEqual(device.id, &#x27;*****&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;74b74195-6610-40c6-a0cf-ca4829e58c87&quot;,&quot;parentUUID&quot;:&quot;a6fae636-3a50-4e38-8eac-57ccf0f3d4a0&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;74b74195-6610-40c6-a0cf-ca4829e58c87&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;7a092ca7-22ee-480c-810c-68c89a91c20f&quot;,&quot;title&quot;:&quot;get protocol()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the protocol&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get protocol() should return the protocol&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n protocol: NodePyATVProtocol.airplay\n});\nassert.strictEqual(device.protocol, NodePyATVProtocol.airplay);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;273de988-a94e-4e2f-99a9-01be5cd953bb&quot;,&quot;parentUUID&quot;:&quot;7a092ca7-22ee-480c-810c-68c89a91c20f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;273de988-a94e-4e2f-99a9-01be5cd953bb&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;2837d41d-ca13-43ad-a801-d523813066c9&quot;,&quot;title&quot;:&quot;get model()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the model if set by scan&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get model() should return the model if set by scan&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;,\n id: &#x27;xxx&#x27;,\n model: &#x27;Gen4K&#x27;\n});\nassert.strictEqual(device.model, &#x27;Gen4K&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;08abd69f-5c48-47bb-bbf9-7c5825894767&quot;,&quot;parentUUID&quot;:&quot;2837d41d-ca13-43ad-a801-d523813066c9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return undefined otherwise&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get model() should return undefined otherwise&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;\n});\nassert.strictEqual(device.model, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;4cfbcc38-6fa3-4a3b-abf1-bd2702008f81&quot;,&quot;parentUUID&quot;:&quot;2837d41d-ca13-43ad-a801-d523813066c9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;08abd69f-5c48-47bb-bbf9-7c5825894767&quot;,&quot;4cfbcc38-6fa3-4a3b-abf1-bd2702008f81&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;b1734157-0e2a-4dc4-a3b0-144a76f858c3&quot;,&quot;title&quot;:&quot;get modelName()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the model name if set by scan&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get modelName() should return the model name if set by scan&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;,\n id: &#x27;xxx&#x27;,\n modelName: &#x27;Apple TV 4K&#x27;\n});\nassert.strictEqual(device.modelName, &#x27;Apple TV 4K&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;781440e5-7315-4cfb-b5e3-64397024e681&quot;,&quot;parentUUID&quot;:&quot;b1734157-0e2a-4dc4-a3b0-144a76f858c3&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return undefined otherwise&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get modelName() should return undefined otherwise&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;\n});\nassert.strictEqual(device.modelName, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;42e1beaa-2989-46cb-a590-207ff3f95a45&quot;,&quot;parentUUID&quot;:&quot;b1734157-0e2a-4dc4-a3b0-144a76f858c3&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;781440e5-7315-4cfb-b5e3-64397024e681&quot;,&quot;42e1beaa-2989-46cb-a590-207ff3f95a45&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;c28712fd-4298-48cf-bc3f-1ee82d0d9a5e&quot;,&quot;title&quot;:&quot;get os()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the operating system if set by scan&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get os() should return the operating system if set by scan&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;,\n id: &#x27;xxx&#x27;,\n os: &#x27;TvOS&#x27;\n});\nassert.strictEqual(device.os, &#x27;TvOS&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;71cb4c69-c090-4720-8d81-10d27dadda91&quot;,&quot;parentUUID&quot;:&quot;c28712fd-4298-48cf-bc3f-1ee82d0d9a5e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return undefined otherwise&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get os() should return undefined otherwise&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;\n});\nassert.strictEqual(device.os, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;881caffe-41c9-4b49-90c3-5130a7d50bee&quot;,&quot;parentUUID&quot;:&quot;c28712fd-4298-48cf-bc3f-1ee82d0d9a5e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;71cb4c69-c090-4720-8d81-10d27dadda91&quot;,&quot;881caffe-41c9-4b49-90c3-5130a7d50bee&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;1528f25c-a2c7-409c-8a9a-ee9f30350a0f&quot;,&quot;title&quot;:&quot;get version()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the version if set by scan&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get version() should return the version if set by scan&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;,\n id: &#x27;xxx&#x27;,\n version: &#x27;15.5.1&#x27;\n});\nassert.strictEqual(device.version, &#x27;15.5.1&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;542d6c96-475b-4930-9523-edad46c4ec72&quot;,&quot;parentUUID&quot;:&quot;1528f25c-a2c7-409c-8a9a-ee9f30350a0f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return undefined otherwise&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get version() should return undefined otherwise&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;\n});\nassert.strictEqual(device.version, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;c8d793f0-18c5-4db3-85df-9cfad8174b81&quot;,&quot;parentUUID&quot;:&quot;1528f25c-a2c7-409c-8a9a-ee9f30350a0f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;542d6c96-475b-4930-9523-edad46c4ec72&quot;,&quot;c8d793f0-18c5-4db3-85df-9cfad8174b81&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;c3f0f5b7-0ff4-41c2-abc4-c0b777e1b4ab&quot;,&quot;title&quot;:&quot;get services()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the services if set by scan&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get services() should return the services if set by scan&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;,\n id: &#x27;xxx&#x27;,\n services: [\n {\n protocol: NodePyATVProtocol.mrp,\n port: 49152\n },\n {\n protocol: NodePyATVProtocol.airplay,\n port: 7000\n }\n ]\n});\nassert.deepStrictEqual(device.services, [\n {\n protocol: &#x27;mrp&#x27;,\n port: 49152\n },\n {\n protocol: &#x27;airplay&#x27;,\n port: 7000\n }\n]);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;8b436b5e-6bf3-4045-9cdf-a2dd23b1d6f2&quot;,&quot;parentUUID&quot;:&quot;c3f0f5b7-0ff4-41c2-abc4-c0b777e1b4ab&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return undefined otherwise&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get services() should return undefined otherwise&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;\n});\nassert.strictEqual(device.services, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;f6f18ff2-7096-4115-9799-93656fc670e7&quot;,&quot;parentUUID&quot;:&quot;c3f0f5b7-0ff4-41c2-abc4-c0b777e1b4ab&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;8b436b5e-6bf3-4045-9cdf-a2dd23b1d6f2&quot;,&quot;f6f18ff2-7096-4115-9799-93656fc670e7&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;66bfbfd8-cc84-461c-a31f-8e2349d070f1&quot;,&quot;title&quot;:&quot;get debug()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return true if set to true&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get debug() should return true if set to true&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n debug: true\n});\nassert.strictEqual(device.debug, true);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;3613a28c-85eb-40e7-820f-5db1b8e51e48&quot;,&quot;parentUUID&quot;:&quot;66bfbfd8-cc84-461c-a31f-8e2349d070f1&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return fn if set to custom function&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get debug() should return fn if set to custom function&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () =&gt; {\n};\nconst device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n debug: fn\n});\nassert.strictEqual(device.debug, fn);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;748dcff2-0182-4cf3-a9b5-66c1c49cf431&quot;,&quot;parentUUID&quot;:&quot;66bfbfd8-cc84-461c-a31f-8e2349d070f1&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return false if unset&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get debug() should return false if unset&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n});\nassert.strictEqual(device.debug, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;cd705447-e4b1-48ac-935e-d1b8fdb72744&quot;,&quot;parentUUID&quot;:&quot;66bfbfd8-cc84-461c-a31f-8e2349d070f1&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;3613a28c-85eb-40e7-820f-5db1b8e51e48&quot;,&quot;748dcff2-0182-4cf3-a9b5-66c1c49cf431&quot;,&quot;cd705447-e4b1-48ac-935e-d1b8fdb72744&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;716f1a21-9d26-427b-b7fb-28359cd006b9&quot;,&quot;title&quot;:&quot;set debug()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work for debug = true&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice set debug() should work for debug = true&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n});\nassert.strictEqual(device.debug, undefined);\ndevice.debug = true;\nassert.strictEqual(device.debug, true);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;117347c9-3945-4680-8284-9dcf05ad5a6c&quot;,&quot;parentUUID&quot;:&quot;716f1a21-9d26-427b-b7fb-28359cd006b9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work for debug = undefined&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice set debug() should work for debug = undefined&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n debug: true\n});\nassert.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert.strictEqual(device.debug, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;41a38ce5-dfc8-433e-964d-58e396045ec3&quot;,&quot;parentUUID&quot;:&quot;716f1a21-9d26-427b-b7fb-28359cd006b9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work for debug = undefined&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice set debug() should work for debug = undefined&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n debug: true\n});\nassert.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert.strictEqual(device.debug, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;443b82bb-5c9c-4fb2-974c-b90a2815898b&quot;,&quot;parentUUID&quot;:&quot;716f1a21-9d26-427b-b7fb-28359cd006b9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work for debug = fn&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice set debug() should work for debug = fn&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n});\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () =&gt; {\n};\nassert.strictEqual(device.debug, undefined);\ndevice.debug = fn;\nassert.strictEqual(device.debug, fn);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;3b942400-40a3-4f32-86bf-a41b098f7e63&quot;,&quot;parentUUID&quot;:&quot;716f1a21-9d26-427b-b7fb-28359cd006b9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;117347c9-3945-4680-8284-9dcf05ad5a6c&quot;,&quot;41a38ce5-dfc8-433e-964d-58e396045ec3&quot;,&quot;443b82bb-5c9c-4fb2-974c-b90a2815898b&quot;,&quot;3b942400-40a3-4f32-86bf-a41b098f7e63&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;8aa6c957-cf3e-4bd4-bb42-523b0b4d90f7&quot;,&quot;title&quot;:&quot;toJSON()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return a object representation&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice toJSON() should return a object representation&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n id: &#x27;*****&#x27;,\n protocol: NodePyATVProtocol.airplay\n});\nassert.deepEqual(device.toJSON(), {\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n id: &#x27;*****&#x27;,\n protocol: NodePyATVProtocol.airplay\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;65c89e90-dca0-43a0-951e-0cfd9c39cf27&quot;,&quot;parentUUID&quot;:&quot;8aa6c957-cf3e-4bd4-bb42-523b0b4d90f7&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should be possible to create a new device from this&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice toJSON() should be possible to create a new device from this&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const config = {\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n id: &#x27;*****&#x27;,\n protocol: NodePyATVProtocol.airplay\n};\nconst deviceA = new NodePyATVDevice(config);\nconst deviceB = new NodePyATVDevice(deviceA.toJSON());\nassert.deepEqual(deviceB.toJSON(), config);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;7eac7549-48b4-4ab6-ac6c-95ee096a8c4e&quot;,&quot;parentUUID&quot;:&quot;8aa6c957-cf3e-4bd4-bb42-523b0b4d90f7&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;65c89e90-dca0-43a0-951e-0cfd9c39cf27&quot;,&quot;7eac7549-48b4-4ab6-ac6c-95ee096a8c4e&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;70081f36-094b-40cb-b70c-2ae79166d175&quot;,&quot;title&quot;:&quot;toString()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice toString() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n});\nassert.strictEqual(device.toString(), &#x27;NodePyATVDevice(My Testdevice, 192.168.178.2)&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;a1aac1bc-8eee-4b66-881e-932285538892&quot;,&quot;parentUUID&quot;:&quot;70081f36-094b-40cb-b70c-2ae79166d175&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;a1aac1bc-8eee-4b66-881e-932285538892&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;d7d7673f-fca0-4c0a-a193-5b234c74fada&quot;,&quot;title&quot;:&quot;getState()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work [I]&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getState() should work [I]&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;pending&quot;,&quot;pass&quot;:false,&quot;fail&quot;:false,&quot;pending&quot;:true,&quot;code&quot;:&quot;&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;cec24ce9-dd40-4ee1-8cd6-9ca7e99c6945&quot;,&quot;parentUUID&quot;:&quot;d7d7673f-fca0-4c0a-a193-5b234c74fada&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getState() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n datetime: &#x27;2020-11-07T22:38:43.608030+01:00&#x27;,\n hash: &#x27;100e0ab6-6ff5-4199-9c04-a7107ff78712&#x27;,\n media_type: &#x27;video&#x27;,\n device_state: &#x27;playing&#x27;,\n title: &#x27;Solo: A Star Wars Story&#x27;,\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: &#x27;off&#x27;,\n repeat: &#x27;off&#x27;,\n app: &#x27;Disney+&#x27;,\n app_id: &#x27;com.disney.disneyplus&#x27;\n });\n })\n });\n const result = yield device.getState();\n assert.deepStrictEqual(result, {\n dateTime: new Date(&#x27;2020-11-07T22:38:43.608030+01:00&#x27;),\n hash: &#x27;100e0ab6-6ff5-4199-9c04-a7107ff78712&#x27;,\n mediaType: NodePyATVMediaType.video,\n deviceState: NodePyATVDeviceState.playing,\n title: &#x27;Solo: A Star Wars Story&#x27;,\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: &#x27;Disney+&#x27;,\n appId: &#x27;com.disney.disneyplus&#x27;,\n powerState: null\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;646d0b69-9eac-405c-8ac1-64ca6e0dff02&quot;,&quot;parentUUID&quot;:&quot;d7d7673f-fca0-4c0a-a193-5b234c74fada&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should reject with error if pyatv fails&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getState() should reject with error if pyatv fails&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;failure&#x27;,\n datetime: &#x27;2021-11-24T21:13:36.424576+03:00&#x27;,\n exception: &#x27;invalid credentials: 321&#x27;,\n stacktrace: &#x27;Traceback (most recent call last):\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\&quot;, line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\&quot;, line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\&quot;, line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\&quot;, line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\&quot;, line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\&quot;, line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\&quot;invalid credentials: \\\&quot; + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n&#x27;\n });\n })\n });\n assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield device.getState();\n }), /Got pyatv Error: invalid credentials: 321/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;c772c427-00a8-49eb-8fad-457860f5c7f0&quot;,&quot;parentUUID&quot;:&quot;d7d7673f-fca0-4c0a-a193-5b234c74fada&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should cache requests for a bit&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getState() should cache requests for a bit&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n executions++;\n cp.end({\n result: &#x27;success&#x27;,\n datetime: new Date().toJSON(),\n hash: &#x27;100e0ab6-6ff5-4199-9c04-a7107ff78712&#x27;,\n media_type: &#x27;video&#x27;,\n device_state: &#x27;playing&#x27;,\n title: &#x27;Solo: A Star Wars Story&#x27;,\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: &#x27;off&#x27;,\n repeat: &#x27;off&#x27;,\n app: &#x27;Disney+&#x27;,\n app_id: &#x27;com.disney.disneyplus&#x27;\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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;c0f2828d-e022-4357-ba70-4b8ae38a872d&quot;,&quot;parentUUID&quot;:&quot;d7d7673f-fca0-4c0a-a193-5b234c74fada&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should update the position if cache was used&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getState() should update the position if cache was used&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n datetime: new Date(new Date().getTime() - 1000).toJSON(),\n hash: &#x27;100e0ab6-6ff5-4199-9c04-a7107ff78712&#x27;,\n media_type: &#x27;video&#x27;,\n device_state: &#x27;playing&#x27;,\n title: &#x27;Solo: A Star Wars Story&#x27;,\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: &#x27;off&#x27;,\n repeat: &#x27;off&#x27;,\n app: &#x27;Disney+&#x27;,\n app_id: &#x27;com.disney.disneyplus&#x27;\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 &gt; 27, `Position should be &gt; 27, was ${secondResult.position}`);\n assert.ok(secondResult.position &lt; 30, `Position should be &gt; 27, was ${secondResult.position}`);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;f58fd914-b230-4d2e-8c96-eb495d84ea5d&quot;,&quot;parentUUID&quot;:&quot;d7d7673f-fca0-4c0a-a193-5b234c74fada&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;646d0b69-9eac-405c-8ac1-64ca6e0dff02&quot;,&quot;c772c427-00a8-49eb-8fad-457860f5c7f0&quot;,&quot;c0f2828d-e022-4357-ba70-4b8ae38a872d&quot;,&quot;f58fd914-b230-4d2e-8c96-eb495d84ea5d&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[&quot;cec24ce9-dd40-4ee1-8cd6-9ca7e99c6945&quot;],&quot;skipped&quot;:[],&quot;duration&quot;:7,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;46b83562-124a-4a20-a71e-27dae44ae598&quot;,&quot;title&quot;:&quot;clearState()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice clearState() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n executions++;\n cp.end({\n result: &#x27;success&#x27;,\n datetime: &#x27;2020-11-07T22:38:43.608030+01:00&#x27;,\n title: &#x27;Solo: A Star Wars Story&#x27;\n });\n })\n });\n assert.deepStrictEqual(yield device.getTitle(), &#x27;Solo: A Star Wars Story&#x27;);\n device.clearState();\n assert.deepStrictEqual(yield device.getTitle(), &#x27;Solo: A Star Wars Story&#x27;);\n assert.strictEqual(executions, 2);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;2cc7fa25-50db-4e4b-b0f1-2edb46ae28a3&quot;,&quot;parentUUID&quot;:&quot;46b83562-124a-4a20-a71e-27dae44ae598&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;2cc7fa25-50db-4e4b-b0f1-2edb46ae28a3&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;5a188a5d-805b-4398-874e-8b17ce754f37&quot;,&quot;title&quot;:&quot;getDateTime()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getDateTime() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n datetime: new Date().toJSON()\n });\n })\n });\n const result = yield device.getDateTime();\n assert.ok(result instanceof Date);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;930641aa-1dc4-4cb1-a158-84be7df7e520&quot;,&quot;parentUUID&quot;:&quot;5a188a5d-805b-4398-874e-8b17ce754f37&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;930641aa-1dc4-4cb1-a158-84be7df7e520&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;1b49b28d-4178-49ab-ab0e-60266f0f0f2a&quot;,&quot;title&quot;:&quot;getHash()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getHash() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n hash: &#x27;12345&#x27;\n });\n })\n });\n const result = yield device.getHash();\n assert.strictEqual(result, &#x27;12345&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;60a5cf87-07dc-459a-9eac-34043611d691&quot;,&quot;parentUUID&quot;:&quot;1b49b28d-4178-49ab-ab0e-60266f0f0f2a&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;60a5cf87-07dc-459a-9eac-34043611d691&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;d51b19a4-b622-4e23-9c6b-16d99ab573e4&quot;,&quot;title&quot;:&quot;getMediaType()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getMediaType() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n media_type: &#x27;video&#x27;\n });\n })\n });\n const result = yield device.getMediaType();\n assert.deepStrictEqual(result, NodePyATVMediaType.video);\n assert.deepStrictEqual(result, &#x27;video&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;3be04266-9fdd-4a51-93f9-9f01a14930c4&quot;,&quot;parentUUID&quot;:&quot;d51b19a4-b622-4e23-9c6b-16d99ab573e4&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;3be04266-9fdd-4a51-93f9-9f01a14930c4&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;a7dc84ab-1023-492b-91cc-4af68332d5fa&quot;,&quot;title&quot;:&quot;getDeviceState()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getDeviceState() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n device_state: &#x27;seeking&#x27;\n });\n })\n });\n const result = yield device.getDeviceState();\n assert.deepStrictEqual(result, NodePyATVDeviceState.seeking);\n assert.deepStrictEqual(result, &#x27;seeking&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;fed8ad26-2114-4e19-b37a-e4dce476008f&quot;,&quot;parentUUID&quot;:&quot;a7dc84ab-1023-492b-91cc-4af68332d5fa&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;fed8ad26-2114-4e19-b37a-e4dce476008f&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;7627df18-08d3-419a-8542-532ca96a7906&quot;,&quot;title&quot;:&quot;getTitle()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getTitle() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n const result = yield device.getTitle();\n assert.strictEqual(result, &#x27;My Movie&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5bfb3b8a-1640-49d7-aa97-aefb7b2bdaa4&quot;,&quot;parentUUID&quot;:&quot;7627df18-08d3-419a-8542-532ca96a7906&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;5bfb3b8a-1640-49d7-aa97-aefb7b2bdaa4&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;ba645e5e-a62d-4f4b-b720-9237a101a4b7&quot;,&quot;title&quot;:&quot;getArtist()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getArtist() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n artist: &#x27;My Artist&#x27;\n });\n })\n });\n const result = yield device.getArtist();\n assert.strictEqual(result, &#x27;My Artist&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;4eb4fb2c-fa8c-494d-99f9-93ad1c7672a1&quot;,&quot;parentUUID&quot;:&quot;ba645e5e-a62d-4f4b-b720-9237a101a4b7&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;4eb4fb2c-fa8c-494d-99f9-93ad1c7672a1&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;84535fd0-618e-4a1c-a40c-f858b964a905&quot;,&quot;title&quot;:&quot;getAlbum()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getAlbum() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n album: &#x27;My ALbum&#x27;\n });\n })\n });\n const result = yield device.getAlbum();\n assert.strictEqual(result, &#x27;My ALbum&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;2ddb158e-09aa-4d17-84ae-4eb0d5dbd352&quot;,&quot;parentUUID&quot;:&quot;84535fd0-618e-4a1c-a40c-f858b964a905&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;2ddb158e-09aa-4d17-84ae-4eb0d5dbd352&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;e0775d00-1bbe-4aa9-a5db-7b962f5dafd1&quot;,&quot;title&quot;:&quot;getGenre()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getGenre() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n genre: &#x27;My Genre&#x27;\n });\n })\n });\n const result = yield device.getGenre();\n assert.strictEqual(result, &#x27;My Genre&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;f3a46def-025d-4fcc-a5c6-0034d091904b&quot;,&quot;parentUUID&quot;:&quot;e0775d00-1bbe-4aa9-a5db-7b962f5dafd1&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;f3a46def-025d-4fcc-a5c6-0034d091904b&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;183edde5-ab7e-4b2b-bf30-e0fe19435e16&quot;,&quot;title&quot;:&quot;getTotalTime()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getTotalTime() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n total_time: 45\n });\n })\n });\n const result = yield device.getTotalTime();\n assert.strictEqual(result, 45);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;6e4f0e8d-78d1-4d51-b99f-f05e7b04b93a&quot;,&quot;parentUUID&quot;:&quot;183edde5-ab7e-4b2b-bf30-e0fe19435e16&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;6e4f0e8d-78d1-4d51-b99f-f05e7b04b93a&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;9ea52a64-0e7b-4f9c-bbd7-fd63d7a1d84b&quot;,&quot;title&quot;:&quot;getPosition()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getPosition() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n position: 30\n });\n })\n });\n const result = yield device.getPosition();\n assert.strictEqual(result, 30);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;3a9927a3-3b4f-436d-a31d-4bdec66a49bc&quot;,&quot;parentUUID&quot;:&quot;9ea52a64-0e7b-4f9c-bbd7-fd63d7a1d84b&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;3a9927a3-3b4f-436d-a31d-4bdec66a49bc&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;87ceb25c-1807-49d5-a2bc-2b7fc25a3740&quot;,&quot;title&quot;:&quot;getShuffle()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getShuffle() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n shuffle: &#x27;songs&#x27;\n });\n })\n });\n const result = yield device.getShuffle();\n assert.deepStrictEqual(result, NodePyATVShuffleState.songs);\n assert.deepStrictEqual(result, &#x27;songs&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5c7143f2-c197-499a-a54c-efb259cf35e1&quot;,&quot;parentUUID&quot;:&quot;87ceb25c-1807-49d5-a2bc-2b7fc25a3740&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;5c7143f2-c197-499a-a54c-efb259cf35e1&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;a00ece1a-a3e8-4997-bd06-c6f5e55cac32&quot;,&quot;title&quot;:&quot;getRepeat()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getRepeat() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n repeat: &#x27;all&#x27;\n });\n })\n });\n const result = yield device.getRepeat();\n assert.deepStrictEqual(result, NodePyATVRepeatState.all);\n assert.deepStrictEqual(result, &#x27;all&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;30f5c3c9-eb95-4206-8973-8edbd2aa41ac&quot;,&quot;parentUUID&quot;:&quot;a00ece1a-a3e8-4997-bd06-c6f5e55cac32&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;30f5c3c9-eb95-4206-8973-8edbd2aa41ac&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;3661c309-28dc-4581-a163-734ac845f6e2&quot;,&quot;title&quot;:&quot;getApp()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getApp() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n app: &#x27;My App&#x27;\n });\n })\n });\n const result = yield device.getApp();\n assert.strictEqual(result, &#x27;My App&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;df705be5-0393-4fb6-a1be-2841a2ed1671&quot;,&quot;parentUUID&quot;:&quot;3661c309-28dc-4581-a163-734ac845f6e2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;df705be5-0393-4fb6-a1be-2841a2ed1671&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;e6b2677d-7140-4b4c-a975-27c6986f96ac&quot;,&quot;title&quot;:&quot;getAppId()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getAppId() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n app_id: &#x27;app.example.com&#x27;\n });\n })\n });\n const result = yield device.getAppId();\n assert.strictEqual(result, &#x27;app.example.com&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;39717108-e01d-4c77-a0db-1b91876bbc2e&quot;,&quot;parentUUID&quot;:&quot;e6b2677d-7140-4b4c-a975-27c6986f96ac&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;39717108-e01d-4c77-a0db-1b91876bbc2e&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;95381a53-907c-49ca-83c9-dc7ffa9a0a00&quot;,&quot;title&quot;:&quot;pressKey()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work with valid key&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice pressKey() should work with valid key&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n yield device.pressKey(NodePyATVKeys.home);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;c42d5ee9-7bb6-466b-b2c5-ec9450b74caf&quot;,&quot;parentUUID&quot;:&quot;95381a53-907c-49ca-83c9-dc7ffa9a0a00&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error with invalid key&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice pressKey() should throw error with invalid key&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n });\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n // @ts-ignore\n yield device.pressKey(&#x27;foo&#x27;);\n }), /Unsupported key value foo/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;6ec7f93b-c407-4974-9962-1f13167a9f81&quot;,&quot;parentUUID&quot;:&quot;95381a53-907c-49ca-83c9-dc7ffa9a0a00&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error if pyatv result is not success&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice pressKey() should throw error if pyatv result is not success&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;failure\&quot;}&#x27;);\n })\n });\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield device.pressKey(NodePyATVKeys.home);\n }), /Unable to parse pyatv response/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;8d082a4b-4314-4b6a-ae23-dae2d25b6532&quot;,&quot;parentUUID&quot;:&quot;95381a53-907c-49ca-83c9-dc7ffa9a0a00&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;c42d5ee9-7bb6-466b-b2c5-ec9450b74caf&quot;,&quot;6ec7f93b-c407-4974-9962-1f13167a9f81&quot;,&quot;8d082a4b-4314-4b6a-ae23-dae2d25b6532&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;3875f683-07fa-4cab-b93a-2700f5cc2e59&quot;,&quot;title&quot;:&quot;down()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice down() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;09c33717-4ef6-4be7-a0d6-d5341c02ce6f&quot;,&quot;parentUUID&quot;:&quot;3875f683-07fa-4cab-b93a-2700f5cc2e59&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;09c33717-4ef6-4be7-a0d6-d5341c02ce6f&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;c26356fe-27e2-4578-ae14-389926e32f43&quot;,&quot;title&quot;:&quot;home()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice home() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;860a0a07-32c8-45eb-9f0c-12ae4cc02cb1&quot;,&quot;parentUUID&quot;:&quot;c26356fe-27e2-4578-ae14-389926e32f43&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;860a0a07-32c8-45eb-9f0c-12ae4cc02cb1&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;811fad0d-ec4e-4d33-b0a3-9053219a3d22&quot;,&quot;title&quot;:&quot;homeHold()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice homeHold() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;08436ab6-962f-4651-a530-586d46d7a123&quot;,&quot;parentUUID&quot;:&quot;811fad0d-ec4e-4d33-b0a3-9053219a3d22&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;08436ab6-962f-4651-a530-586d46d7a123&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;9ccc3f21-5c5f-4e15-8f55-5b4731a0884e&quot;,&quot;title&quot;:&quot;left()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice left() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;4ca27503-fff7-41d1-b79e-611811eb0daf&quot;,&quot;parentUUID&quot;:&quot;9ccc3f21-5c5f-4e15-8f55-5b4731a0884e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;4ca27503-fff7-41d1-b79e-611811eb0daf&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;d2afda71-d82c-4912-b7e4-33f4774e3118&quot;,&quot;title&quot;:&quot;menu()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice menu() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;6a721df0-dd2f-4e13-8ea3-e125a9cef405&quot;,&quot;parentUUID&quot;:&quot;d2afda71-d82c-4912-b7e4-33f4774e3118&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;6a721df0-dd2f-4e13-8ea3-e125a9cef405&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;78177769-2a95-4764-bcd9-a9b6a48fb929&quot;,&quot;title&quot;:&quot;next()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice next() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;95eac100-314d-488d-9067-98f1fb8d412a&quot;,&quot;parentUUID&quot;:&quot;78177769-2a95-4764-bcd9-a9b6a48fb929&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;95eac100-314d-488d-9067-98f1fb8d412a&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;29cf6af0-260c-454d-841e-ac0c76ee0b3c&quot;,&quot;title&quot;:&quot;pause()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice pause() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;0fdaeb54-fa08-498e-afd1-3b88b60ac2b1&quot;,&quot;parentUUID&quot;:&quot;29cf6af0-260c-454d-841e-ac0c76ee0b3c&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;0fdaeb54-fa08-498e-afd1-3b88b60ac2b1&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;e12a356b-d4a6-4f59-97eb-13b599981e46&quot;,&quot;title&quot;:&quot;play()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice play() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;72be5684-e34b-4d7e-95f3-77c1866544f9&quot;,&quot;parentUUID&quot;:&quot;e12a356b-d4a6-4f59-97eb-13b599981e46&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;72be5684-e34b-4d7e-95f3-77c1866544f9&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;252ba737-3726-4dc2-b0e5-1362ba026d13&quot;,&quot;title&quot;:&quot;playPause()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice playPause() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;6cf3ad0f-745f-4a3c-93e5-b712338598ed&quot;,&quot;parentUUID&quot;:&quot;252ba737-3726-4dc2-b0e5-1362ba026d13&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;6cf3ad0f-745f-4a3c-93e5-b712338598ed&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;000616e9-3edf-43a8-a01a-695ac050a42b&quot;,&quot;title&quot;:&quot;previous()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice previous() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;826f4007-0720-483a-9693-5afb43c3d51e&quot;,&quot;parentUUID&quot;:&quot;000616e9-3edf-43a8-a01a-695ac050a42b&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;826f4007-0720-483a-9693-5afb43c3d51e&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;af24219b-d030-4519-9575-8e1234ecb504&quot;,&quot;title&quot;:&quot;right()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice right() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;1da398c6-f1df-45a2-929a-9d408f77f894&quot;,&quot;parentUUID&quot;:&quot;af24219b-d030-4519-9575-8e1234ecb504&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;1da398c6-f1df-45a2-929a-9d408f77f894&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;c1019d42-a516-4981-bd7d-8eaf297281d0&quot;,&quot;title&quot;:&quot;select()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice select() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;81a9101b-2858-4a52-8234-5416e9acb988&quot;,&quot;parentUUID&quot;:&quot;c1019d42-a516-4981-bd7d-8eaf297281d0&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;81a9101b-2858-4a52-8234-5416e9acb988&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;b936b394-51e9-4854-838c-87e7220f959b&quot;,&quot;title&quot;:&quot;skipBackward()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice skipBackward() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;ecc023e5-c3ae-46f6-b682-a1d36d43c3a0&quot;,&quot;parentUUID&quot;:&quot;b936b394-51e9-4854-838c-87e7220f959b&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;ecc023e5-c3ae-46f6-b682-a1d36d43c3a0&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;06de6600-38a6-4f25-88f0-23424c3c9d06&quot;,&quot;title&quot;:&quot;skipForward()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice skipForward() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;4441bfbd-0871-4927-a543-521bbc40ca6c&quot;,&quot;parentUUID&quot;:&quot;06de6600-38a6-4f25-88f0-23424c3c9d06&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;4441bfbd-0871-4927-a543-521bbc40ca6c&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;cb5285e6-daf2-437c-933e-fdda4fb6ba4a&quot;,&quot;title&quot;:&quot;stop()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice stop() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;32d990f8-5970-4fb4-9599-76bebad93702&quot;,&quot;parentUUID&quot;:&quot;cb5285e6-daf2-437c-933e-fdda4fb6ba4a&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;32d990f8-5970-4fb4-9599-76bebad93702&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;5e925cd9-188e-4555-b65c-5a8aa2658979&quot;,&quot;title&quot;:&quot;suspend()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice suspend() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;974b8daf-2852-4f68-aa97-b1ee39e03cfb&quot;,&quot;parentUUID&quot;:&quot;5e925cd9-188e-4555-b65c-5a8aa2658979&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;974b8daf-2852-4f68-aa97-b1ee39e03cfb&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;4cd25fcf-2265-4481-aba5-5d7137a29b67&quot;,&quot;title&quot;:&quot;topMenu()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice topMenu() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5dbae19d-6f3a-4d5d-ab4b-2aa6d99826ad&quot;,&quot;parentUUID&quot;:&quot;4cd25fcf-2265-4481-aba5-5d7137a29b67&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;5dbae19d-6f3a-4d5d-ab4b-2aa6d99826ad&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;aefc07ea-8383-43c1-b179-4a6e9a9b2338&quot;,&quot;title&quot;:&quot;up()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice up() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d28e2434-5b0e-4078-a664-12c668d1a45b&quot;,&quot;parentUUID&quot;:&quot;aefc07ea-8383-43c1-b179-4a6e9a9b2338&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;d28e2434-5b0e-4078-a664-12c668d1a45b&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;e58db1a1-970c-490f-aae4-a6bed548504d&quot;,&quot;title&quot;:&quot;volumeDown()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice volumeDown() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;fb517499-3901-4d64-b794-cdc1c0eb95fc&quot;,&quot;parentUUID&quot;:&quot;e58db1a1-970c-490f-aae4-a6bed548504d&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;fb517499-3901-4d64-b794-cdc1c0eb95fc&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;a8065e37-e210-4bb9-b55e-fecd2d79f642&quot;,&quot;title&quot;:&quot;volumeUp()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice volumeUp() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;f9e2ac5f-821e-41de-a760-5a519bc6be99&quot;,&quot;parentUUID&quot;:&quot;a8065e37-e210-4bb9-b55e-fecd2d79f642&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;f9e2ac5f-821e-41de-a760-5a519bc6be99&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;6c2c764e-10e5-4a59-83a6-1a9f56254865&quot;,&quot;title&quot;:&quot;wakeup()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice wakeup() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;981c3ba2-fe7f-4fae-8c08-ec3e0401a9dd&quot;,&quot;parentUUID&quot;:&quot;6c2c764e-10e5-4a59-83a6-1a9f56254865&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;981c3ba2-fe7f-4fae-8c08-ec3e0401a9dd&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;c9f2ee68-28ce-46dc-8a44-59ae89658eaa&quot;,&quot;title&quot;:&quot;turnOff()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice turnOff() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;99aa0be0-86e7-40b3-a98b-699853e009db&quot;,&quot;parentUUID&quot;:&quot;c9f2ee68-28ce-46dc-8a44-59ae89658eaa&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;99aa0be0-86e7-40b3-a98b-699853e009db&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;d7ea354b-a48a-4d8a-93ac-e05b674a1e56&quot;,&quot;title&quot;:&quot;turnOn()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice turnOn() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;1782cf88-25d9-4edd-b009-32c53f1e350b&quot;,&quot;parentUUID&quot;:&quot;d7ea354b-a48a-4d8a-93ac-e05b674a1e56&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;1782cf88-25d9-4edd-b009-32c53f1e350b&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000}],&quot;passes&quot;:[],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;7a74729c-3998-475d-b070-0f8eb963b85a&quot;,&quot;title&quot;:&quot;NodePyATVInstance&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[],&quot;suites&quot;:[{&quot;uuid&quot;:&quot;06bda930-8116-4915-ac11-a0eaba68fe00&quot;,&quot;title&quot;:&quot;static version()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work with pyatv [L]&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should work with pyatv [L]&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:643,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;slow&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;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(&#x27;No version found for pyatv. Is it installed in test environment?&#x27;);\n }\n assert.equal(typeof result.pyatv, &#x27;string&#x27;, &#x27;result.pyatv is a string&#x27;);\n assert.ok(result.pyatv.length &gt;= 5, &#x27;result.pyatv has content&#x27;);\n assert.strictEqual(result.module, version);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;f3c0e4e7-f641-4138-9716-612d9449b2d9&quot;,&quot;parentUUID&quot;:&quot;06bda930-8116-4915-ac11-a0eaba68fe00&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return the pyatv version&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should return the pyatv version&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp =&gt; {\n cp.code(1);\n cp.end(&#x27;atvremote 0.7.4&#x27;);\n })\n });\n assert.ok(result.pyatv);\n assert.strictEqual(result.pyatv, &#x27;0.7.4&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;c5818bb1-77b6-4e43-822a-271cec2811a9&quot;,&quot;parentUUID&quot;:&quot;06bda930-8116-4915-ac11-a0eaba68fe00&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return the module version&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should return the module version&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n noColors: true,\n spawn: createFakeSpawn(cp =&gt; cp.code(1).end())\n });\n assert.strictEqual(result.module, version);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;8de64e25-1660-47e8-af9b-4e40af01ea6b&quot;,&quot;parentUUID&quot;:&quot;06bda930-8116-4915-ac11-a0eaba68fe00&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should handle option.atvremotePath&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should handle option.atvremotePath&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.version({\n atvremotePath: &#x27;/foo/bar&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n assert.strictEqual(cp.cmd(), &#x27;/foo/bar&#x27;);\n cp.code(1).end();\n })\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;751c3438-dd3a-4580-a3a1-b445df54af8f&quot;,&quot;parentUUID&quot;:&quot;06bda930-8116-4915-ac11-a0eaba68fe00&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with option.debug = true&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should work with option.debug = true&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:3,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.version({\n debug: true,\n spawn: createFakeSpawn(cp =&gt; cp.code(1).end())\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;21111a15-2be9-4d00-a3c6-e344ca9b2366&quot;,&quot;parentUUID&quot;:&quot;06bda930-8116-4915-ac11-a0eaba68fe00&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with option.noColors&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should work with option.noColors&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.version({\n debug: () =&gt; {\n // no debug log\n },\n noColors: true,\n spawn: createFakeSpawn(cp =&gt; cp.code(1).end())\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;3092b7ba-942b-428b-8e52-5059d3097b13&quot;,&quot;parentUUID&quot;:&quot;06bda930-8116-4915-ac11-a0eaba68fe00&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return null on pyatv stderr output&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should return null on pyatv stderr output&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp =&gt; cp.stderr(&#x27;Hello World!&#x27;).code(123).end())\n });\n assert.strictEqual(result.pyatv, null);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;70e15df2-3111-43e4-b57d-0b3b42536882&quot;,&quot;parentUUID&quot;:&quot;06bda930-8116-4915-ac11-a0eaba68fe00&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return null on pyatv error&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should return null on pyatv error&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:3,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp =&gt; {\n cp.error(new Error(&#x27;Hello world!&#x27;)).end();\n })\n });\n assert.strictEqual(result.pyatv, null);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;269d53b4-d82b-47fb-8efa-e561515ac7c9&quot;,&quot;parentUUID&quot;:&quot;06bda930-8116-4915-ac11-a0eaba68fe00&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return null on invalid pyatv version&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should return null on invalid pyatv version&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout(&#x27;atvremote 42&#x27;).code(1).end();\n })\n });\n assert.strictEqual(result.pyatv, null);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;74a87bd3-47ad-4f9c-b21d-207bee7c9bc1&quot;,&quot;parentUUID&quot;:&quot;06bda930-8116-4915-ac11-a0eaba68fe00&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;f3c0e4e7-f641-4138-9716-612d9449b2d9&quot;,&quot;c5818bb1-77b6-4e43-822a-271cec2811a9&quot;,&quot;8de64e25-1660-47e8-af9b-4e40af01ea6b&quot;,&quot;751c3438-dd3a-4580-a3a1-b445df54af8f&quot;,&quot;21111a15-2be9-4d00-a3c6-e344ca9b2366&quot;,&quot;3092b7ba-942b-428b-8e52-5059d3097b13&quot;,&quot;70e15df2-3111-43e4-b57d-0b3b42536882&quot;,&quot;269d53b4-d82b-47fb-8efa-e561515ac7c9&quot;,&quot;74a87bd3-47ad-4f9c-b21d-207bee7c9bc1&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:660,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;16815972-2f6a-4e1d-a83c-50a3f783b4e2&quot;,&quot;title&quot;:&quot;static check()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should resolve in test environment [L]&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static check() should resolve in test environment [L]&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:5859,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;slow&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n this.timeout(12000);\n yield NodePyATVInstance.check();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;9e6353dc-f7e8-4df9-ab5f-ba845238fefc&quot;,&quot;parentUUID&quot;:&quot;16815972-2f6a-4e1d-a83c-50a3f783b4e2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return nice error message if pyatv was not found&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static check() should return nice error message if pyatv was not found&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.check({\n spawn: createFakeSpawn(cp =&gt; {\n cp.error(new Error(&#x27;spawn atvremote ENOENT&#x27;)).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d72990fe-9c85-473a-9ac8-3dd9c89bc639&quot;,&quot;parentUUID&quot;:&quot;16815972-2f6a-4e1d-a83c-50a3f783b4e2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return nice error message if myatv is too old&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static check() should return nice error message if myatv is too old&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.check({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout(&#x27;atvremote 0.5.1&#x27;).code(1).end();\n })\n });\n }), /Found pyatv, but unforunately it&#x27;s too old. Please update pyatv./);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5876f292-1a0c-4131-88f3-59254cc0ffac&quot;,&quot;parentUUID&quot;:&quot;16815972-2f6a-4e1d-a83c-50a3f783b4e2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return nice error message if scan failed&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static check() should return nice error message if scan failed&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:3,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n let i = 0;\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.check({\n spawn: createFakeSpawn(cp =&gt; {\n if (i === 0) {\n cp.stdout(&#x27;atvremote 0.7.0&#x27;).code(1).end();\n i++;\n }\n else {\n cp.error(new Error(&#x27;spawn atvremote ENOENT&#x27;)).code(1).end();\n }\n })\n });\n }), /Unable to scan for devices/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;2c8e7265-b073-47d5-aaa7-fddcd129282e&quot;,&quot;parentUUID&quot;:&quot;16815972-2f6a-4e1d-a83c-50a3f783b4e2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;9e6353dc-f7e8-4df9-ab5f-ba845238fefc&quot;,&quot;d72990fe-9c85-473a-9ac8-3dd9c89bc639&quot;,&quot;5876f292-1a0c-4131-88f3-59254cc0ffac&quot;,&quot;2c8e7265-b073-47d5-aaa7-fddcd129282e&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:5866,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;16b5594f-a14b-499e-9790-50c1e2434917&quot;,&quot;title&quot;:&quot;static find()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work [L]&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should work [L]&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:5435,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;slow&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;b153bd06-672e-4c93-bfc6-3d59ab21e6e6&quot;,&quot;parentUUID&quot;:&quot;16b5594f-a14b-499e-9790-50c1e2434917&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should handle option.atvscriptPath&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should handle option.atvscriptPath&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n atvscriptPath: &#x27;/foo/bar&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n assert.strictEqual(cp.cmd(), &#x27;/foo/bar&#x27;);\n cp.stdout({\n &#x27;result&#x27;: &#x27;success&#x27;,\n &#x27;datetime&#x27;: &#x27;2020-11-06T20:47:30.840022+01:00&#x27;,\n &#x27;devices&#x27;: []\n }).end();\n })\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;634a36c0-749c-4123-853b-f469700bea03&quot;,&quot;parentUUID&quot;:&quot;16b5594f-a14b-499e-9790-50c1e2434917&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error on stderr output&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should throw error on stderr output&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stderr(&#x27;Hello World!&#x27;).code(1).end();\n })\n });\n }), /Unable to execute request/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;30e95754-84d3-4b6f-be77-d2428ca0605a&quot;,&quot;parentUUID&quot;:&quot;16b5594f-a14b-499e-9790-50c1e2434917&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error on error&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should throw error on error&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.error(new Error(&#x27;Hello world!&#x27;)).code(1).end();\n })\n });\n }), /Hello world!/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;e311f9c8-3930-465b-87fb-616dee8dceec&quot;,&quot;parentUUID&quot;:&quot;16b5594f-a14b-499e-9790-50c1e2434917&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error if atvscript result is not valid json&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should throw error if atvscript result is not valid json&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout(JSON.stringify({\n &#x27;result&#x27;: &#x27;success&#x27;,\n &#x27;datetime&#x27;: &#x27;2020-11-06T20:47:30.840022+01:00&#x27;,\n &#x27;devices&#x27;: []\n }).substr(1)).end();\n })\n });\n }), /Unable to parse result/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d3f0c79e-e4a2-4215-8ab4-16b557b10e40&quot;,&quot;parentUUID&quot;:&quot;16b5594f-a14b-499e-9790-50c1e2434917&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error if atvscript result is not successfull&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should throw error if atvscript result is not successfull&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout({\n result: &#x27;error&#x27;\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;cfe50b8d-633f-43c7-b10a-e11eebfe7a93&quot;,&quot;parentUUID&quot;:&quot;16b5594f-a14b-499e-9790-50c1e2434917&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error if atvscript result is without device array&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should throw error if atvscript result is without device array&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout({\n result: &#x27;success&#x27;\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;f0f983df-36ad-4dda-8cd1-e9e72990812a&quot;,&quot;parentUUID&quot;:&quot;16b5594f-a14b-499e-9790-50c1e2434917&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work if devices are without device_info / services&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should work if devices are without device_info / services&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const devices = yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout({\n result: &#x27;success&#x27;,\n datetime: &#x27;2020-11-06T20:47:30.840022+01:00&#x27;,\n devices: [\n {\n name: &#x27;Vardagsrum&#x27;,\n address: &#x27;10.0.10.81&#x27;,\n identifier: &#x27;xxx&#x27;\n }\n ]\n }).code(1).end();\n })\n });\n assert.strictEqual(devices.length, 1);\n assert.strictEqual(devices[0].name, &#x27;Vardagsrum&#x27;);\n assert.strictEqual(devices[0].host, &#x27;10.0.10.81&#x27;);\n assert.strictEqual(devices[0].id, &#x27;xxx&#x27;);\n assert.strictEqual(devices[0].model, undefined);\n assert.strictEqual(devices[0].modelName, undefined);\n assert.strictEqual(devices[0].os, undefined);\n assert.strictEqual(devices[0].version, undefined);\n assert.deepStrictEqual(devices[0].services, undefined);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;23027e51-4286-4667-ae1e-163e686e6642&quot;,&quot;parentUUID&quot;:&quot;16b5594f-a14b-499e-9790-50c1e2434917&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work if devices are with device_info / services&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should work if devices are with device_info / services&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const devices = yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout({\n result: &#x27;success&#x27;,\n datetime: &#x27;2020-11-06T20:47:30.840022+01:00&#x27;,\n devices: [\n {\n name: &#x27;Vardagsrum&#x27;,\n address: &#x27;10.0.10.81&#x27;,\n identifier: &#x27;xxx&#x27;,\n device_info: {\n &#x27;model&#x27;: &#x27;Gen4K&#x27;,\n &#x27;model_str&#x27;: &#x27;Apple TV 4K&#x27;,\n &#x27;operating_system&#x27;: &#x27;TvOS&#x27;,\n &#x27;version&#x27;: &#x27;15.5.1&#x27;\n },\n services: [\n {\n protocol: &#x27;mrp&#x27;,\n port: 49152\n },\n {\n protocol: &#x27;airplay&#x27;,\n port: 7000\n }\n ]\n }\n ]\n }).code(1).end();\n })\n });\n assert.strictEqual(devices.length, 1);\n assert.strictEqual(devices[0].name, &#x27;Vardagsrum&#x27;);\n assert.strictEqual(devices[0].host, &#x27;10.0.10.81&#x27;);\n assert.strictEqual(devices[0].id, &#x27;xxx&#x27;);\n assert.strictEqual(devices[0].model, &#x27;Gen4K&#x27;);\n assert.strictEqual(devices[0].modelName, &#x27;Apple TV 4K&#x27;);\n assert.strictEqual(devices[0].os, &#x27;TvOS&#x27;);\n assert.strictEqual(devices[0].version, &#x27;15.5.1&#x27;);\n assert.deepStrictEqual(devices[0].services, [\n {\n protocol: NodePyATVProtocol.mrp,\n port: 49152\n },\n {\n protocol: NodePyATVProtocol.airplay,\n port: 7000\n }\n ]);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;a363355d-1e50-41ba-a933-f2f1967f38b8&quot;,&quot;parentUUID&quot;:&quot;16b5594f-a14b-499e-9790-50c1e2434917&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;b153bd06-672e-4c93-bfc6-3d59ab21e6e6&quot;,&quot;634a36c0-749c-4123-853b-f469700bea03&quot;,&quot;30e95754-84d3-4b6f-be77-d2428ca0605a&quot;,&quot;e311f9c8-3930-465b-87fb-616dee8dceec&quot;,&quot;d3f0c79e-e4a2-4215-8ab4-16b557b10e40&quot;,&quot;cfe50b8d-633f-43c7-b10a-e11eebfe7a93&quot;,&quot;f0f983df-36ad-4dda-8cd1-e9e72990812a&quot;,&quot;23027e51-4286-4667-ae1e-163e686e6642&quot;,&quot;a363355d-1e50-41ba-a933-f2f1967f38b8&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:5445,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;1b84e454-556c-4e5f-a4b8-de29a15b16d2&quot;,&quot;title&quot;:&quot;static device()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should pass options to constructor&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static device() should pass options to constructor&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = NodePyATVInstance.device({ host: &#x27;192.168.178.6&#x27;, name: &#x27;My Testdevice&#x27; });\nassert.strictEqual(device.host, &#x27;192.168.178.6&#x27;);\nassert.strictEqual(device.name, &#x27;My Testdevice&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;3ca31e52-083a-438c-a012-cbd4e33d86f0&quot;,&quot;parentUUID&quot;:&quot;1b84e454-556c-4e5f-a4b8-de29a15b16d2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;3ca31e52-083a-438c-a012-cbd4e33d86f0&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;65d93d17-709a-4f0f-baf5-5a08ebe64b4c&quot;,&quot;title&quot;:&quot;version()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should merge options from constructor&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance version() should merge options from constructor&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ atvremotePath: &#x27;test&#x27; });\n yield i.version({\n spawn: createFakeSpawn(cp =&gt; {\n assert.strictEqual(cp.cmd(), &#x27;test&#x27;);\n cp.code(1).end();\n })\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;55a617a6-0506-4599-910f-c88fa0fff655&quot;,&quot;parentUUID&quot;:&quot;65d93d17-709a-4f0f-baf5-5a08ebe64b4c&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;55a617a6-0506-4599-910f-c88fa0fff655&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;f95f0e32-fb89-4c31-8131-710bedd8cbaa&quot;,&quot;title&quot;:&quot;check()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should merge options from constructor&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance check() should merge options from constructor&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ atvremotePath: &#x27;test&#x27; });\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield i.check({\n spawn: createFakeSpawn(cp =&gt; {\n assert.strictEqual(cp.cmd(), &#x27;test&#x27;);\n cp.error(new Error(&#x27;spawn atvremote ENOENT&#x27;)).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;647d9fe0-9d79-4b90-85c3-4904d6d9ad7f&quot;,&quot;parentUUID&quot;:&quot;f95f0e32-fb89-4c31-8131-710bedd8cbaa&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;647d9fe0-9d79-4b90-85c3-4904d6d9ad7f&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;a6b4d5f6-f7a5-4f0e-99e3-58ca04728df6&quot;,&quot;title&quot;:&quot;find()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should merge options from constructor&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance find() should merge options from constructor&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ atvscriptPath: &#x27;test&#x27; });\n yield i.find({\n spawn: createFakeSpawn(cp =&gt; {\n assert.strictEqual(cp.cmd(), &#x27;test&#x27;);\n cp.stdout({\n &#x27;result&#x27;: &#x27;success&#x27;,\n &#x27;datetime&#x27;: &#x27;2020-11-06T20:47:30.840022+01:00&#x27;,\n &#x27;devices&#x27;: []\n }).end();\n })\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;9dd8f09b-86fb-4568-a6be-7d75d0ae6e8c&quot;,&quot;parentUUID&quot;:&quot;a6b4d5f6-f7a5-4f0e-99e3-58ca04728df6&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;9dd8f09b-86fb-4568-a6be-7d75d0ae6e8c&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;59e54596-b1b6-46d0-89bf-4fd6cce127fe&quot;,&quot;title&quot;:&quot;device()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should merge options from constructor&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance device() should merge options from constructor&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ debug: true });\n const d = i.device({ name: &#x27;My Testdevice&#x27;, host: &#x27;192.168.178.2&#x27; });\n assert.deepStrictEqual(d.debug, true);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;c5e4467d-dfd7-436d-9984-d172691274e2&quot;,&quot;parentUUID&quot;:&quot;59e54596-b1b6-46d0-89bf-4fd6cce127fe&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;c5e4467d-dfd7-436d-9984-d172691274e2&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;c64ccb69-c545-46a8-89b0-3924e58d2961&quot;,&quot;title&quot;:&quot;Type Exports&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;Type NodePyATVProtocol should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVProtocol should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVProtocol);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;9b97c676-5726-4ee6-938a-318fc52ad271&quot;,&quot;parentUUID&quot;:&quot;c64ccb69-c545-46a8-89b0-3924e58d2961&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVMediaType should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVMediaType should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVMediaType);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;175e5dad-20bb-4f2d-b564-2d6cbe8cd9bd&quot;,&quot;parentUUID&quot;:&quot;c64ccb69-c545-46a8-89b0-3924e58d2961&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVDeviceEvent should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVDeviceEvent should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVDeviceEvent);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;b18194db-b523-4652-8792-f21a7dcb2a00&quot;,&quot;parentUUID&quot;:&quot;c64ccb69-c545-46a8-89b0-3924e58d2961&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVDeviceState should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVDeviceState should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVDeviceState);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;400069d7-6e64-4446-8164-eab4a468479f&quot;,&quot;parentUUID&quot;:&quot;c64ccb69-c545-46a8-89b0-3924e58d2961&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVRepeatState should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVRepeatState should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVRepeatState);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;950ef444-e6cf-4a2b-af84-4f1ff7107eb3&quot;,&quot;parentUUID&quot;:&quot;c64ccb69-c545-46a8-89b0-3924e58d2961&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVShuffleState should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVShuffleState should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVShuffleState);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;7049fecc-4a1d-43e5-a9a7-4954723f5718&quot;,&quot;parentUUID&quot;:&quot;c64ccb69-c545-46a8-89b0-3924e58d2961&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVKeys should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVKeys should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVKeys);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5d5f027d-5d42-4bd8-aa0c-483013e54e39&quot;,&quot;parentUUID&quot;:&quot;c64ccb69-c545-46a8-89b0-3924e58d2961&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVInstanceOptions should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVInstanceOptions should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVListenerState);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;1b80e7fd-8d1b-4ce7-8f00-db2db56e0f23&quot;,&quot;parentUUID&quot;:&quot;c64ccb69-c545-46a8-89b0-3924e58d2961&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVPowerState should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVPowerState should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVPowerState);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;ab641a69-9431-4a08-a5e2-1e1ff35e21e2&quot;,&quot;parentUUID&quot;:&quot;c64ccb69-c545-46a8-89b0-3924e58d2961&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;9b97c676-5726-4ee6-938a-318fc52ad271&quot;,&quot;175e5dad-20bb-4f2d-b564-2d6cbe8cd9bd&quot;,&quot;b18194db-b523-4652-8792-f21a7dcb2a00&quot;,&quot;400069d7-6e64-4446-8164-eab4a468479f&quot;,&quot;950ef444-e6cf-4a2b-af84-4f1ff7107eb3&quot;,&quot;7049fecc-4a1d-43e5-a9a7-4954723f5718&quot;,&quot;5d5f027d-5d42-4bd8-aa0c-483013e54e39&quot;,&quot;1b80e7fd-8d1b-4ce7-8f00-db2db56e0f23&quot;,&quot;ab641a69-9431-4a08-a5e2-1e1ff35e21e2&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000}],&quot;passes&quot;:[],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;41f3c732-c385-4156-864d-b69ee8e4c04c&quot;,&quot;title&quot;:&quot;Tools&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/tools.ts&quot;,&quot;file&quot;:&quot;/test/tools.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[],&quot;suites&quot;:[{&quot;uuid&quot;:&quot;24b5d074-9647-4126-a4e8-8b96f5937ac3&quot;,&quot;title&quot;:&quot;addRequestId() / removeRequestId()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/tools.ts&quot;,&quot;file&quot;:&quot;/test/tools.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return a string&quot;,&quot;fullTitle&quot;:&quot;Tools addRequestId() / removeRequestId() should return a string&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const id = addRequestId();\nassert.strictEqual(typeof id, &#x27;string&#x27;);\nremoveRequestId(id);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;9e017772-0116-4af9-82d1-c3e8c4ad535f&quot;,&quot;parentUUID&quot;:&quot;24b5d074-9647-4126-a4e8-8b96f5937ac3&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work if given id is not in index&quot;,&quot;fullTitle&quot;:&quot;Tools addRequestId() / removeRequestId() should work if given id is not in index&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;removeRequestId(&#x27;FOO&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;be839d73-d279-40e5-9ade-8b4ea554c1e4&quot;,&quot;parentUUID&quot;:&quot;24b5d074-9647-4126-a4e8-8b96f5937ac3&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;9e017772-0116-4af9-82d1-c3e8c4ad535f&quot;,&quot;be839d73-d279-40e5-9ade-8b4ea554c1e4&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;ce385db6-536c-4857-a5da-a78f07aa7a3f&quot;,&quot;title&quot;:&quot;debug()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/tools.ts&quot;,&quot;file&quot;:&quot;/test/tools.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work without any options&quot;,&quot;fullTitle&quot;:&quot;Tools debug() should work without any options&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;debug(&#x27;TEST&#x27;, &#x27;Hello World.&#x27;, {});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;b4201dfc-f2ec-4183-9956-6b5e735a1783&quot;,&quot;parentUUID&quot;:&quot;ce385db6-536c-4857-a5da-a78f07aa7a3f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with default logger&quot;,&quot;fullTitle&quot;:&quot;Tools debug() should work with default logger&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;debug(&#x27;TEST&#x27;, &#x27;Hello World.&#x27;, { debug: true });&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;3e43184f-ceca-4693-8e99-ebc8c1239f48&quot;,&quot;parentUUID&quot;:&quot;ce385db6-536c-4857-a5da-a78f07aa7a3f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with custom logger&quot;,&quot;fullTitle&quot;:&quot;Tools debug() should work with custom logger&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;debug(&#x27;TEST&#x27;, &#x27;Hello World.&#x27;, {\n debug: function (msg) {\n assert.strictEqual(this, null);\n assert.ok(msg.includes(&#x27;Hello World&#x27;));\n }\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;63f58b81-6eb6-4d48-825b-51563496e795&quot;,&quot;parentUUID&quot;:&quot;ce385db6-536c-4857-a5da-a78f07aa7a3f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with colors disabled&quot;,&quot;fullTitle&quot;:&quot;Tools debug() should work with colors disabled&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;debug(&#x27;TEST&#x27;, &#x27;Hello World.&#x27;, { noColors: true });&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;4682eed8-edca-4418-a2e4-7e1574984fde&quot;,&quot;parentUUID&quot;:&quot;ce385db6-536c-4857-a5da-a78f07aa7a3f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with custom logger and colors disabled&quot;,&quot;fullTitle&quot;:&quot;Tools debug() should work with custom logger and colors disabled&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;debug(&#x27;TEST&#x27;, &#x27;Hello World.&#x27;, {\n noColors: true,\n debug: function (msg) {\n assert.strictEqual(this, null);\n assert.strictEqual(msg, &#x27;[node-pyatv][TEST] Hello World.&#x27;);\n }\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;c2d78628-3b30-4898-b6e9-e8075f42cf87&quot;,&quot;parentUUID&quot;:&quot;ce385db6-536c-4857-a5da-a78f07aa7a3f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;b4201dfc-f2ec-4183-9956-6b5e735a1783&quot;,&quot;3e43184f-ceca-4693-8e99-ebc8c1239f48&quot;,&quot;63f58b81-6eb6-4d48-825b-51563496e795&quot;,&quot;4682eed8-edca-4418-a2e4-7e1574984fde&quot;,&quot;c2d78628-3b30-4898-b6e9-e8075f42cf87&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;6b9ae4df-d3c4-4ac3-b5de-5eded0ad569e&quot;,&quot;title&quot;:&quot;getExecutable()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/tools.ts&quot;,&quot;file&quot;:&quot;/test/tools.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should handle atvremotePath if set&quot;,&quot;fullTitle&quot;:&quot;Tools getExecutable() should handle atvremotePath if set&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const result = getExecutable(NodePyATVExecutableType.atvremote, {\n atvremotePath: &#x27;/tmp/1&#x27;,\n atvscriptPath: &#x27;/tmp/2&#x27;\n});\nassert.strictEqual(result, &#x27;/tmp/1&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;3e9fbc19-158a-4d0d-a429-ef6bed34e5f6&quot;,&quot;parentUUID&quot;:&quot;6b9ae4df-d3c4-4ac3-b5de-5eded0ad569e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should handle atvscriptPath if set&quot;,&quot;fullTitle&quot;:&quot;Tools getExecutable() should handle atvscriptPath if set&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const result = getExecutable(NodePyATVExecutableType.atvscript, {\n atvremotePath: &#x27;/tmp/1&#x27;,\n atvscriptPath: &#x27;/tmp/2&#x27;\n});\nassert.strictEqual(result, &#x27;/tmp/2&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;c71a689e-d963-4ab8-b21c-9937992e50e5&quot;,&quot;parentUUID&quot;:&quot;6b9ae4df-d3c4-4ac3-b5de-5eded0ad569e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should handle default for atvremote&quot;,&quot;fullTitle&quot;:&quot;Tools getExecutable() should handle default for atvremote&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const result = getExecutable(NodePyATVExecutableType.atvremote, {\n atvscriptPath: &#x27;/tmp&#x27;\n});\nassert.strictEqual(result, &#x27;atvremote&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;793b7c1a-e50d-4369-9917-ca4ddf4a4c84&quot;,&quot;parentUUID&quot;:&quot;6b9ae4df-d3c4-4ac3-b5de-5eded0ad569e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should handle default for atvscript&quot;,&quot;fullTitle&quot;:&quot;Tools getExecutable() should handle default for atvscript&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const result = getExecutable(NodePyATVExecutableType.atvscript, {\n atvremotePath: &#x27;/tmp&#x27;\n});\nassert.strictEqual(result, &#x27;atvscript&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5001992a-63eb-4af7-975f-e6451330e215&quot;,&quot;parentUUID&quot;:&quot;6b9ae4df-d3c4-4ac3-b5de-5eded0ad569e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;3e9fbc19-158a-4d0d-a429-ef6bed34e5f6&quot;,&quot;c71a689e-d963-4ab8-b21c-9937992e50e5&quot;,&quot;793b7c1a-e50d-4369-9917-ca4ddf4a4c84&quot;,&quot;5001992a-63eb-4af7-975f-e6451330e215&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;1f282e5d-d4c2-4df5-ab3d-1ff255375b0d&quot;,&quot;title&quot;:&quot;getParameters()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/tools.ts&quot;,&quot;file&quot;:&quot;/test/tools.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;empty case&quot;,&quot;fullTitle&quot;:&quot;Tools getParameters() empty case&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield getParamters();\n assert.deepEqual(result, []);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;39e6bbdd-a6e3-4eb6-8ab5-805b164a3b72&quot;,&quot;parentUUID&quot;:&quot;1f282e5d-d4c2-4df5-ab3d-1ff255375b0d&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;easy case&quot;,&quot;fullTitle&quot;:&quot;Tools getParameters() easy case&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield getParamters({\n host: &#x27;192.168.178.2&#x27;\n });\n assert.deepEqual(result, [&#x27;-s&#x27;, &#x27;192.168.178.2&#x27;]);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;dc5b8fdd-c910-4f3f-a351-8b5da008cb32&quot;,&quot;parentUUID&quot;:&quot;1f282e5d-d4c2-4df5-ab3d-1ff255375b0d&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;full case&quot;,&quot;fullTitle&quot;:&quot;Tools getParameters() full case&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield getParamters({\n hosts: [&#x27;192.168.178.2&#x27;, &#x27;192.168.178.3&#x27;],\n id: &#x27;****&#x27;,\n protocol: NodePyATVProtocol.mrp,\n dmapCredentials: &#x27;****&#x27;,\n mrpCredentials: &#x27;****&#x27;,\n airplayCredentials: &#x27;****&#x27;,\n companionCredentials: &#x27;1234&#x27;,\n raopCredentials: &#x27;::foo:&#x27;\n });\n assert.deepEqual(result, [\n &#x27;-s&#x27;, &#x27;192.168.178.2,192.168.178.3&#x27;,\n &#x27;-i&#x27;, &#x27;****&#x27;,\n &#x27;--protocol&#x27;, &#x27;mrp&#x27;,\n &#x27;--dmap-credentials&#x27;, &#x27;****&#x27;,\n &#x27;--mrp-credentials&#x27;, &#x27;****&#x27;,\n &#x27;--airplay-credentials&#x27;, &#x27;****&#x27;,\n &#x27;--companion-credentials&#x27;, &#x27;1234&#x27;,\n &#x27;--raop-credentials&#x27;, &#x27;::foo:&#x27;\n ]);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d4c16970-29ac-4ad2-8298-1ef2de9c6c09&quot;,&quot;parentUUID&quot;:&quot;1f282e5d-d4c2-4df5-ab3d-1ff255375b0d&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;39e6bbdd-a6e3-4eb6-8ab5-805b164a3b72&quot;,&quot;dc5b8fdd-c910-4f3f-a351-8b5da008cb32&quot;,&quot;d4c16970-29ac-4ad2-8298-1ef2de9c6c09&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;550ba0b3-5654-4a0b-be3c-083fb762ddff&quot;,&quot;title&quot;:&quot;parseState()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/tools.ts&quot;,&quot;file&quot;:&quot;/test/tools.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work with empty data&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should work with empty data&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const input = {};\nconst result = parseState(input, &#x27;&#x27;, {});\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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;143d9b1d-582c-4dd6-867e-26dadd9bb703&quot;,&quot;parentUUID&quot;:&quot;550ba0b3-5654-4a0b-be3c-083fb762ddff&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work without data&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should work without data&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;// @ts-ignore\nconst result = parseState(null, &#x27;&#x27;, {});\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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;8b30e7fa-3786-4c50-84f3-b6eb253a27af&quot;,&quot;parentUUID&quot;:&quot;550ba0b3-5654-4a0b-be3c-083fb762ddff&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with example data&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should work with example data&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const input = {\n result: &#x27;success&#x27;,\n datetime: &#x27;2020-11-07T22:38:43.608030+01:00&#x27;,\n hash: &#x27;100e0ab6-6ff5-4199-9c04-a7107ff78712&#x27;,\n media_type: &#x27;video&#x27;,\n device_state: &#x27;playing&#x27;,\n title: &#x27;Solo: A Star Wars Story&#x27;,\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: &#x27;off&#x27;,\n repeat: &#x27;off&#x27;,\n app: &#x27;Disney+&#x27;,\n app_id: &#x27;com.disney.disneyplus&#x27;,\n powerState: null\n};\nconst result = parseState(input, &#x27;&#x27;, {});\nassert.deepStrictEqual(result, {\n dateTime: new Date(&#x27;2020-11-07T22:38:43.608030+01:00&#x27;),\n hash: &#x27;100e0ab6-6ff5-4199-9c04-a7107ff78712&#x27;,\n mediaType: NodePyATVMediaType.video,\n deviceState: NodePyATVDeviceState.playing,\n title: &#x27;Solo: A Star Wars Story&#x27;,\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: &#x27;Disney+&#x27;,\n appId: &#x27;com.disney.disneyplus&#x27;,\n powerState: null\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d3618317-59ed-4bdb-bc5d-43cfcc24f74b&quot;,&quot;parentUUID&quot;:&quot;550ba0b3-5654-4a0b-be3c-083fb762ddff&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw an error for pyatv exceptions&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should throw an error for pyatv exceptions&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const input = {\n result: &#x27;failure&#x27;,\n datetime: &#x27;2021-11-24T21:13:36.424576+03:00&#x27;,\n exception: &#x27;invalid credentials: 321&#x27;,\n stacktrace: &#x27;Traceback (most recent call last):\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\&quot;, line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\&quot;, line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\&quot;, line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\&quot;, line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\&quot;, line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\&quot;, line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\&quot;invalid credentials: \\\&quot; + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n&#x27;\n};\nassert.throws(() =&gt; {\n parseState(input, &#x27;&#x27;, {});\n}, /Got pyatv Error: invalid credentials: 321/);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5569f934-fb7d-4049-975c-d951c50a720f&quot;,&quot;parentUUID&quot;:&quot;550ba0b3-5654-4a0b-be3c-083fb762ddff&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should ignore date if it&#x27;s an invalid date&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should ignore date if it&#x27;s an invalid date&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const input = { datetime: &#x27;today&#x27; };\nconst result = parseState(input, &#x27;&#x27;, {});\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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d224641b-b106-4c6a-95e4-879ab15bd890&quot;,&quot;parentUUID&quot;:&quot;550ba0b3-5654-4a0b-be3c-083fb762ddff&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should ignore data if unsupported type&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should ignore data if unsupported type&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const input = {\n result: &#x27;success&#x27;,\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: &#x27;23min&#x27;,\n position: &#x27;0:30.123&#x27;,\n shuffle: false,\n repeat: true,\n app: 0,\n app_id: 891645381647289,\n powerState: null\n};\nconst result = parseState(input, &#x27;&#x27;, {});\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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;e0eedfdc-387a-47d7-accd-7fad29e2bd5b&quot;,&quot;parentUUID&quot;:&quot;550ba0b3-5654-4a0b-be3c-083fb762ddff&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should ignore enums with unsupported valid&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should ignore enums with unsupported valid&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const input = {\n media_type: &#x27;3d-experience&#x27;,\n device_state: &#x27;initiating&#x27;,\n shuffle: &#x27;everything&#x27;,\n repeat: &#x27;nothing&#x27;\n};\nconst result = parseState(input, &#x27;&#x27;, {});\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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;bc4e5391-a826-4a85-9c10-b0b90498fbdd&quot;,&quot;parentUUID&quot;:&quot;550ba0b3-5654-4a0b-be3c-083fb762ddff&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;143d9b1d-582c-4dd6-867e-26dadd9bb703&quot;,&quot;8b30e7fa-3786-4c50-84f3-b6eb253a27af&quot;,&quot;d3618317-59ed-4bdb-bc5d-43cfcc24f74b&quot;,&quot;5569f934-fb7d-4049-975c-d951c50a720f&quot;,&quot;d224641b-b106-4c6a-95e4-879ab15bd890&quot;,&quot;e0eedfdc-387a-47d7-accd-7fad29e2bd5b&quot;,&quot;bc4e5391-a826-4a85-9c10-b0b90498fbdd&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000}],&quot;passes&quot;:[],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000}],&quot;passes&quot;:[],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:true,&quot;rootEmpty&quot;:true,&quot;_timeout&quot;:2000}],&quot;meta&quot;:{&quot;mocha&quot;:{&quot;version&quot;:&quot;10.1.0&quot;},&quot;mochawesome&quot;:{&quot;options&quot;:{&quot;quiet&quot;:false,&quot;reportFilename&quot;:&quot;mochawesome&quot;,&quot;saveHtml&quot;:true,&quot;saveJson&quot;:true,&quot;consoleReporter&quot;:&quot;spec&quot;,&quot;useInlineDiffs&quot;:false,&quot;code&quot;:true},&quot;version&quot;:&quot;7.1.3&quot;},&quot;marge&quot;:{&quot;version&quot;:&quot;6.2.0&quot;}}}" data-config="{&quot;reportFilename&quot;:&quot;mochawesome&quot;,&quot;reportDir&quot;:&quot;mochawesome-report&quot;,&quot;reportTitle&quot;:&quot;node-pyatv&quot;,&quot;reportPageTitle&quot;:&quot;Mochawesome Report&quot;,&quot;inline&quot;:false,&quot;inlineAssets&quot;:false,&quot;cdn&quot;:false,&quot;charts&quot;:false,&quot;enableCharts&quot;:false,&quot;code&quot;:true,&quot;enableCode&quot;:true,&quot;autoOpen&quot;:false,&quot;overwrite&quot;:true,&quot;timestamp&quot;:false,&quot;ts&quot;:false,&quot;showPassed&quot;:true,&quot;showFailed&quot;:true,&quot;showPending&quot;:true,&quot;showSkipped&quot;:false,&quot;showHooks&quot;:&quot;failed&quot;,&quot;saveJson&quot;:true,&quot;saveHtml&quot;:true,&quot;dev&quot;:false,&quot;assetsDir&quot;:&quot;mochawesome-report/assets&quot;,&quot;jsonFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/mochawesome-report/mochawesome.json&quot;,&quot;htmlFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/mochawesome-report/mochawesome.html&quot;}"><div id="report"></div><script src="assets/app.js"></script></body></html>
2
+ <html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Mochawesome Report</title><link rel="stylesheet" href="assets/app.css"/></head><body data-raw="{&quot;stats&quot;:{&quot;suites&quot;:89,&quot;tests&quot;:153,&quot;passes&quot;:151,&quot;pending&quot;:2,&quot;failures&quot;:0,&quot;start&quot;:&quot;2022-12-07T11:11:19.118Z&quot;,&quot;end&quot;:&quot;2022-12-07T11:11:31.604Z&quot;,&quot;duration&quot;:12486,&quot;testsRegistered&quot;:153,&quot;passPercent&quot;:100,&quot;pendingPercent&quot;:1.3071895424836601,&quot;other&quot;:0,&quot;hasOther&quot;:false,&quot;skipped&quot;:0,&quot;hasSkipped&quot;:false},&quot;results&quot;:[{&quot;uuid&quot;:&quot;2c6c8e04-3fde-4ea7-9ebb-9618366673ec&quot;,&quot;title&quot;:&quot;&quot;,&quot;fullFile&quot;:&quot;&quot;,&quot;file&quot;:&quot;&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[],&quot;suites&quot;:[{&quot;uuid&quot;:&quot;86889974-b552-468f-85ab-8d8628a872dd&quot;,&quot;title&quot;:&quot;NodePyATVDeviceEvent&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts&quot;,&quot;file&quot;:&quot;/test/device-event.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[],&quot;suites&quot;:[{&quot;uuid&quot;:&quot;4243263c-3b82-4c3a-9b20-fb3a07334959&quot;,&quot;title&quot;:&quot;get key()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts&quot;,&quot;file&quot;:&quot;/test/device-event.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvent get key() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const event = new NodePyATVDeviceEvent({\n key: &#x27;genre&#x27;,\n old: &#x27;Jazz&#x27;,\n new: &#x27;Rock&#x27;,\n device: new NodePyATVDevice({\n host: &#x27;192.168.178.2&#x27;,\n name: &#x27;My Testinstance&#x27;\n })\n});\nassert.strictEqual(event.key, &#x27;genre&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;f15e58db-29f7-43cf-975f-7e57145e0df6&quot;,&quot;parentUUID&quot;:&quot;4243263c-3b82-4c3a-9b20-fb3a07334959&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;f15e58db-29f7-43cf-975f-7e57145e0df6&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;1cd05197-7f14-4a7a-bab7-377b62d49e1c&quot;,&quot;title&quot;:&quot;get oldValue()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts&quot;,&quot;file&quot;:&quot;/test/device-event.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvent get oldValue() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const event = new NodePyATVDeviceEvent({\n key: &#x27;genre&#x27;,\n old: &#x27;Jazz&#x27;,\n new: &#x27;Rock&#x27;,\n device: new NodePyATVDevice({\n host: &#x27;192.168.178.2&#x27;,\n name: &#x27;My Testinstance&#x27;\n })\n});\nassert.strictEqual(event.oldValue, &#x27;Jazz&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;bfb12b10-a5ca-4010-b13b-34c65b3b2aaa&quot;,&quot;parentUUID&quot;:&quot;1cd05197-7f14-4a7a-bab7-377b62d49e1c&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;bfb12b10-a5ca-4010-b13b-34c65b3b2aaa&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;5b6365e1-1074-4252-95bf-7f946c9c891f&quot;,&quot;title&quot;:&quot;get newValue()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts&quot;,&quot;file&quot;:&quot;/test/device-event.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvent get newValue() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const event = new NodePyATVDeviceEvent({\n key: &#x27;genre&#x27;,\n old: &#x27;Jazz&#x27;,\n new: &#x27;Rock&#x27;,\n device: new NodePyATVDevice({\n host: &#x27;192.168.178.2&#x27;,\n name: &#x27;My Testinstance&#x27;\n })\n});\nassert.strictEqual(event.newValue, &#x27;Rock&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;94525e5b-21b9-4a4a-8f36-6162cddde025&quot;,&quot;parentUUID&quot;:&quot;5b6365e1-1074-4252-95bf-7f946c9c891f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;94525e5b-21b9-4a4a-8f36-6162cddde025&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;1ae46516-36aa-42ad-8eca-2038c7405681&quot;,&quot;title&quot;:&quot;get value()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts&quot;,&quot;file&quot;:&quot;/test/device-event.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvent get value() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const event = new NodePyATVDeviceEvent({\n key: &#x27;genre&#x27;,\n old: &#x27;Jazz&#x27;,\n new: &#x27;Rock&#x27;,\n device: new NodePyATVDevice({\n host: &#x27;192.168.178.2&#x27;,\n name: &#x27;My Testinstance&#x27;\n })\n});\nassert.strictEqual(event.value, &#x27;Rock&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;96b53b5c-ac30-4c69-ab09-cc999e52d10c&quot;,&quot;parentUUID&quot;:&quot;1ae46516-36aa-42ad-8eca-2038c7405681&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;96b53b5c-ac30-4c69-ab09-cc999e52d10c&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;4080657f-14c9-4bd1-bb44-be6311c60afd&quot;,&quot;title&quot;:&quot;get device()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts&quot;,&quot;file&quot;:&quot;/test/device-event.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvent get device() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n host: &#x27;192.168.178.2&#x27;,\n name: &#x27;My Testinstance&#x27;\n});\nconst event = new NodePyATVDeviceEvent({\n key: &#x27;genre&#x27;,\n old: &#x27;Jazz&#x27;,\n new: &#x27;Rock&#x27;,\n device\n});\nassert.deepEqual(event.device, device);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;9d98d4f9-6b9d-4ef7-b6c9-8740bd9107b0&quot;,&quot;parentUUID&quot;:&quot;4080657f-14c9-4bd1-bb44-be6311c60afd&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;9d98d4f9-6b9d-4ef7-b6c9-8740bd9107b0&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000}],&quot;passes&quot;:[],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;3c6559d5-a493-4f76-a5ee-a028e3f094f3&quot;,&quot;title&quot;:&quot;NodePyATVDeviceEvents&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[],&quot;suites&quot;:[{&quot;uuid&quot;:&quot;93107bad-39f3-4843-b15c-a98a4cc6bf4a&quot;,&quot;title&quot;:&quot;applyStateAndEmitEvents()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should emit update:key event&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update:key event&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:4,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n yield new Promise(cb =&gt; {\n device.once(&#x27;update:title&#x27;, event =&gt; {\n assert.ok(event instanceof NodePyATVDeviceEvent);\n assert.strictEqual(event.key, &#x27;title&#x27;);\n assert.strictEqual(event.oldValue, null);\n assert.strictEqual(event.newValue, &#x27;My Movie&#x27;);\n assert.strictEqual(event.value, &#x27;My Movie&#x27;);\n assert.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;7bb3bbae-2156-4b7a-91f8-6d8acc781bee&quot;,&quot;parentUUID&quot;:&quot;93107bad-39f3-4843-b15c-a98a4cc6bf4a&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should emit update event&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update event&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n yield new Promise(cb =&gt; {\n device.once(&#x27;update&#x27;, event =&gt; {\n assert.ok(event instanceof NodePyATVDeviceEvent);\n assert.strictEqual(event.key, &#x27;title&#x27;);\n assert.strictEqual(event.oldValue, null);\n assert.strictEqual(event.newValue, &#x27;My Movie&#x27;);\n assert.strictEqual(event.value, &#x27;My Movie&#x27;);\n assert.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;0363431d-7a7e-4c7e-9720-0a9226f44842&quot;,&quot;parentUUID&quot;:&quot;93107bad-39f3-4843-b15c-a98a4cc6bf4a&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should emit update:key event before update&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update:key event before update&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n const sort = [];\n yield Promise.race([\n new Promise(cb =&gt; {\n device.once(&#x27;update&#x27;, () =&gt; {\n sort.push(&#x27;update&#x27;);\n cb(undefined);\n });\n }),\n new Promise(cb =&gt; {\n device.once(&#x27;update:title&#x27;, () =&gt; {\n sort.push(&#x27;update:title&#x27;);\n cb(undefined);\n });\n })\n ]);\n assert.deepStrictEqual(sort, [&#x27;update:title&#x27;, &#x27;update&#x27;]);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;2feef894-04a7-4434-a7c6-d3c695d2ce94&quot;,&quot;parentUUID&quot;:&quot;93107bad-39f3-4843-b15c-a98a4cc6bf4a&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should emit error events on failures&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should emit error events on failures&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;failure&#x27;,\n datetime: &#x27;2021-11-24T21:13:36.424576+03:00&#x27;,\n exception: &#x27;invalid credentials: 321&#x27;,\n stacktrace: &#x27;Traceback (most recent call last):\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\&quot;, line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\&quot;, line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\&quot;, line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\&quot;, line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\&quot;, line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\&quot;, line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\&quot;invalid credentials: \\\&quot; + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n&#x27;\n });\n })\n });\n yield new Promise(cb =&gt; {\n device.once(&#x27;error&#x27;, error =&gt; {\n assert.ok(error instanceof Error);\n assert.ok(error.toString().includes(&#x27;invalid credentials: 321&#x27;));\n cb(undefined);\n });\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;f5c29a59-c7b8-4b52-b5de-160dae90171c&quot;,&quot;parentUUID&quot;:&quot;93107bad-39f3-4843-b15c-a98a4cc6bf4a&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should not emit an update if new value is same as old one&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should not emit an update if new value is same as old one&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:4,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n let spawnCounter = 0;\n let eventCounter = 0;\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n if (spawnCounter === 0) {\n cp.onStdIn(() =&gt; cp.end());\n }\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n spawnCounter++;\n if (spawnCounter &gt;= 2) {\n cp.end();\n }\n })\n });\n const listener = () =&gt; {\n eventCounter++;\n };\n device.on(&#x27;update&#x27;, listener);\n yield new Promise(cb =&gt; setTimeout(cb, 0));\n yield device.getState();\n device.off(&#x27;update&#x27;, listener);\n assert.strictEqual(spawnCounter, 2);\n assert.strictEqual(eventCounter, 1);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d93b9a17-8668-47c6-9364-efd62fb59bd9&quot;,&quot;parentUUID&quot;:&quot;93107bad-39f3-4843-b15c-a98a4cc6bf4a&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should emit error event if event listener throws an exception&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should emit error event if event listener throws an exception&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n let callCounter = 0;\n const error = new Error(&#x27;This is an error. Be nice.&#x27;);\n device.once(&#x27;error&#x27;, err =&gt; {\n assert.strictEqual(err, error);\n callCounter++;\n });\n const listener = () =&gt; {\n throw error;\n };\n device.on(&#x27;update&#x27;, listener);\n yield new Promise(cb =&gt; setTimeout(cb, 0));\n device.off(&#x27;update&#x27;, listener);\n assert.strictEqual(callCounter, 1);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;190ec273-1eb9-40ae-b7d1-d5f2c234a36f&quot;,&quot;parentUUID&quot;:&quot;93107bad-39f3-4843-b15c-a98a4cc6bf4a&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should also work with powerState&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents applyStateAndEmitEvents() should also work with powerState&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n datetime: new Date().toJSON(),\n power_state: &#x27;off&#x27;\n });\n })\n });\n yield new Promise(cb =&gt; {\n device.once(&#x27;update:powerState&#x27;, event =&gt; {\n assert.ok(event instanceof NodePyATVDeviceEvent);\n assert.strictEqual(event.key, &#x27;powerState&#x27;);\n assert.strictEqual(event.oldValue, null);\n assert.strictEqual(event.newValue, &#x27;off&#x27;);\n assert.strictEqual(event.newValue, NodePyATVPowerState.off);\n assert.strictEqual(event.value, &#x27;off&#x27;);\n assert.strictEqual(event.value, NodePyATVPowerState.off);\n assert.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;f7ac09d9-11df-4fde-9276-4bf366d2b1ef&quot;,&quot;parentUUID&quot;:&quot;93107bad-39f3-4843-b15c-a98a4cc6bf4a&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;7bb3bbae-2156-4b7a-91f8-6d8acc781bee&quot;,&quot;0363431d-7a7e-4c7e-9720-0a9226f44842&quot;,&quot;2feef894-04a7-4434-a7c6-d3c695d2ce94&quot;,&quot;f5c29a59-c7b8-4b52-b5de-160dae90171c&quot;,&quot;d93b9a17-8668-47c6-9364-efd62fb59bd9&quot;,&quot;190ec273-1eb9-40ae-b7d1-d5f2c234a36f&quot;,&quot;f7ac09d9-11df-4fde-9276-4bf366d2b1ef&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:16,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;b81a5991-81e9-41dd-be33-56e75747c79e&quot;,&quot;title&quot;:&quot;start|stopListening()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should emit error if spawn fails&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents start|stopListening() should emit error if spawn fails&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const error = new Error();\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.error(error).end();\n })\n });\n const listener = () =&gt; {\n // empty listener\n };\n device.on(&#x27;update&#x27;, listener);\n yield new Promise(cb =&gt; {\n device.once(&#x27;error&#x27;, err =&gt; {\n assert.strictEqual(err, error);\n cb(undefined);\n });\n });\n device.off(&#x27;update&#x27;, listener);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d87c4f41-1e3f-4125-a16f-d5dd92dc2b48&quot;,&quot;parentUUID&quot;:&quot;b81a5991-81e9-41dd-be33-56e75747c79e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should emit error on stderr data&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents start|stopListening() should emit error on stderr data&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.stderr(&#x27;Hello World!&#x27;).end();\n })\n });\n const listener = () =&gt; {\n // empty listener\n };\n device.on(&#x27;update&#x27;, listener);\n yield new Promise(cb =&gt; {\n device.once(&#x27;error&#x27;, err =&gt; {\n assert.ok(err instanceof Error);\n assert.ok(err.toString().includes(&#x27;Got stderr output from pyatv: Hello World!&#x27;));\n cb(undefined);\n });\n });\n device.off(&#x27;update&#x27;, listener);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;9a79c380-451b-40a3-a7a7-8e363bb18204&quot;,&quot;parentUUID&quot;:&quot;b81a5991-81e9-41dd-be33-56e75747c79e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should emit error if stdout is not valid json&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents start|stopListening() should emit error if stdout is not valid json&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout(&#x27;#&#x27;).end();\n })\n });\n const listener = () =&gt; {\n // empty listener\n };\n device.on(&#x27;update&#x27;, listener);\n yield new Promise(cb =&gt; {\n device.once(&#x27;error&#x27;, err =&gt; {\n assert.ok(err instanceof Error);\n assert.ok(err.toString().includes(&#x27;Unable to parse stdout json: SyntaxError: &#x27; +\n &#x27;Unexpected token # in JSON at position 0&#x27;));\n cb(undefined);\n });\n });\n device.off(&#x27;update&#x27;, listener);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;ca4bbbe3-f41a-4630-abb2-41ecc6fc6a10&quot;,&quot;parentUUID&quot;:&quot;b81a5991-81e9-41dd-be33-56e75747c79e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should restart the process if it gets killed&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents start|stopListening() should restart the process if it gets killed&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;pending&quot;,&quot;pass&quot;:false,&quot;fail&quot;:false,&quot;pending&quot;:true,&quot;code&quot;:&quot;&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;2b0e0252-4658-4eea-86bb-007b0c67818f&quot;,&quot;parentUUID&quot;:&quot;b81a5991-81e9-41dd-be33-56e75747c79e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;d87c4f41-1e3f-4125-a16f-d5dd92dc2b48&quot;,&quot;9a79c380-451b-40a3-a7a7-8e363bb18204&quot;,&quot;ca4bbbe3-f41a-4630-abb2-41ecc6fc6a10&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[&quot;2b0e0252-4658-4eea-86bb-007b0c67818f&quot;],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;a07e8704-9db3-432e-b9ac-55bb11ce66cb&quot;,&quot;title&quot;:&quot;addListener() / removeAllListeners()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work without any exceptions&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents addListener() / removeAllListeners() should work without any exceptions&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n const listener = () =&gt; {\n // empty listener\n };\n device.addListener(&#x27;update&#x27;, listener);\n device.removeAllListeners(&#x27;update&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;9d09c10a-8062-4559-b96c-f4c2ddaa1956&quot;,&quot;parentUUID&quot;:&quot;a07e8704-9db3-432e-b9ac-55bb11ce66cb&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;9d09c10a-8062-4559-b96c-f4c2ddaa1956&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;a7183cc4-4db6-4805-aad6-956015184955&quot;,&quot;title&quot;:&quot;emit()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents emit() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n })\n});\nconst event = new NodePyATVDeviceEvent({\n key: &#x27;dateTime&#x27;,\n old: &#x27;foo&#x27;,\n new: &#x27;bar&#x27;,\n device\n});\nlet executions = 0;\ndevice.once(&#x27;test&#x27;, (e) =&gt; {\n executions++;\n assert.strictEqual(e, event);\n assert.strictEqual(executions, 1);\n done();\n});\ndevice.emit(&#x27;test&#x27;, event);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;90f04908-2f72-4721-9e23-800a9e7cb037&quot;,&quot;parentUUID&quot;:&quot;a7183cc4-4db6-4805-aad6-956015184955&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;90f04908-2f72-4721-9e23-800a9e7cb037&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;a29f2a72-3051-4403-94ec-7e3d1e091b09&quot;,&quot;title&quot;:&quot;eventNames()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents eventNames() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n })\n});\nconst listener = () =&gt; {\n // ignore\n};\ndevice.on(&#x27;test&#x27;, listener);\nassert.deepStrictEqual(device.eventNames(), [&#x27;test&#x27;]);\ndevice.off(&#x27;test&#x27;, listener);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;b4cdc600-accf-4daf-8a22-16185402571f&quot;,&quot;parentUUID&quot;:&quot;a29f2a72-3051-4403-94ec-7e3d1e091b09&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;b4cdc600-accf-4daf-8a22-16185402571f&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;c20513dd-e666-47ec-bc8b-7e524b7d2bf0&quot;,&quot;title&quot;:&quot;getMaxListeners()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents getMaxListeners() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n })\n});\nconst result = device.getMaxListeners();\nassert.ok(typeof result, &#x27;number&#x27;);\nassert.ok(result &gt;= 10);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d58d4cc5-91cf-4f15-9eec-0568c2427802&quot;,&quot;parentUUID&quot;:&quot;c20513dd-e666-47ec-bc8b-7e524b7d2bf0&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;d58d4cc5-91cf-4f15-9eec-0568c2427802&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;03ca03bf-4dc1-4838-80c9-f9fb2e0c0eeb&quot;,&quot;title&quot;:&quot;listenerCount()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents listenerCount() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n })\n});\nconst listener = () =&gt; {\n // ignore\n};\nassert.deepStrictEqual(device.listenerCount(&#x27;test&#x27;), 0);\ndevice.on(&#x27;test&#x27;, listener);\nassert.deepStrictEqual(device.listenerCount(&#x27;test&#x27;), 1);\ndevice.off(&#x27;test&#x27;, listener);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;bb25f92f-072a-49bc-bf16-0fe8ea72bb0c&quot;,&quot;parentUUID&quot;:&quot;03ca03bf-4dc1-4838-80c9-f9fb2e0c0eeb&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;bb25f92f-072a-49bc-bf16-0fe8ea72bb0c&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;d728e8e6-8a2f-49c0-84ad-15acdb3711c0&quot;,&quot;title&quot;:&quot;listeners()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents listeners() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n })\n});\nconst listener = () =&gt; {\n // ignore\n};\nassert.deepStrictEqual(device.listeners(&#x27;test&#x27;).length, 0);\ndevice.on(&#x27;test&#x27;, listener);\nassert.deepStrictEqual(device.listeners(&#x27;test&#x27;).length, 1);\nassert.deepStrictEqual(device.listeners(&#x27;test&#x27;)[0], listener);\ndevice.off(&#x27;test&#x27;, listener);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;911c79e5-a183-4429-be5e-bd947defbdf0&quot;,&quot;parentUUID&quot;:&quot;d728e8e6-8a2f-49c0-84ad-15acdb3711c0&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;911c79e5-a183-4429-be5e-bd947defbdf0&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;ce82cf98-16a5-4aac-b725-7bc9b5f7fcda&quot;,&quot;title&quot;:&quot;prependListener()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents prependListener() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n});\nconst listener = () =&gt; {\n device.removeAllListeners(&#x27;update&#x27;);\n done();\n};\ndevice.prependListener(&#x27;update&#x27;, listener);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;4263cbc6-c308-4a91-909e-aa2b2a6b8f51&quot;,&quot;parentUUID&quot;:&quot;ce82cf98-16a5-4aac-b725-7bc9b5f7fcda&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;4263cbc6-c308-4a91-909e-aa2b2a6b8f51&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;d1ae0e13-c14f-4a5d-9a08-df743b271c4e&quot;,&quot;title&quot;:&quot;prependOnceListener()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents prependOnceListener() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n});\ndevice.prependOnceListener(&#x27;update&#x27;, () =&gt; done());&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;39c68f35-82c8-4749-8437-eb66415464d3&quot;,&quot;parentUUID&quot;:&quot;d1ae0e13-c14f-4a5d-9a08-df743b271c4e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;39c68f35-82c8-4749-8437-eb66415464d3&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;aeb69aaf-2186-491c-bb7f-1871ef7353de&quot;,&quot;title&quot;:&quot;rawListeners()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents rawListeners() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n })\n});\nconst listener = () =&gt; {\n // ignore\n};\nassert.deepStrictEqual(device.rawListeners(&#x27;test&#x27;).length, 0);\ndevice.on(&#x27;test&#x27;, listener);\nassert.deepStrictEqual(device.rawListeners(&#x27;test&#x27;).length, 1);\nassert.deepStrictEqual(device.rawListeners(&#x27;test&#x27;)[0], listener);\ndevice.off(&#x27;test&#x27;, listener);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d1b5fab5-49f0-4c87-8567-3369cb1702e6&quot;,&quot;parentUUID&quot;:&quot;aeb69aaf-2186-491c-bb7f-1871ef7353de&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;d1b5fab5-49f0-4c87-8567-3369cb1702e6&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;5fc8ca3e-1dc8-49d9-aba4-bf3813ccf038&quot;,&quot;title&quot;:&quot;removeListener()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts&quot;,&quot;file&quot;:&quot;/test/device-events.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work without any exceptions&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDeviceEvents removeListener() should work without any exceptions&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.onStdIn(() =&gt; cp.end());\n cp.stdout({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n const listener = () =&gt; {\n // empty listener\n };\n device.addListener(&#x27;update&#x27;, listener);\n assert.deepStrictEqual(device.listenerCount(&#x27;update&#x27;), 1);\n device.removeListener(&#x27;update&#x27;, listener);\n assert.deepStrictEqual(device.listenerCount(&#x27;update&#x27;), 0);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;0b703645-5933-4560-ad81-3937ee7b9b70&quot;,&quot;parentUUID&quot;:&quot;5fc8ca3e-1dc8-49d9-aba4-bf3813ccf038&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;0b703645-5933-4560-ad81-3937ee7b9b70&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000}],&quot;passes&quot;:[],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;906d6ddd-5cbb-4d28-95dd-a25cb9742840&quot;,&quot;title&quot;:&quot;NodePyATVDevice&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[],&quot;suites&quot;:[{&quot;uuid&quot;:&quot;e3c7572a-d1c4-42e3-9c6e-91b58627ea53&quot;,&quot;title&quot;:&quot;get name()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the name&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get name() should return the name&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n});\nassert.strictEqual(device.name, &#x27;My Testdevice&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d4cf35ca-ac48-403a-98f5-f23dd04aa448&quot;,&quot;parentUUID&quot;:&quot;e3c7572a-d1c4-42e3-9c6e-91b58627ea53&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;d4cf35ca-ac48-403a-98f5-f23dd04aa448&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;854ab0a4-21d1-4cf2-a576-b3f31a0bc836&quot;,&quot;title&quot;:&quot;get host()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the host&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get host() should return the host&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n});\nassert.strictEqual(device.host, &#x27;192.168.178.2&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;89848a64-5ff4-4aee-9833-48b4493ff886&quot;,&quot;parentUUID&quot;:&quot;854ab0a4-21d1-4cf2-a576-b3f31a0bc836&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;89848a64-5ff4-4aee-9833-48b4493ff886&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;d23d3a87-5e70-4633-9e26-7cc006b1043e&quot;,&quot;title&quot;:&quot;get id()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the id&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get id() should return the id&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n id: &#x27;*****&#x27;\n});\nassert.strictEqual(device.id, &#x27;*****&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;4439ca7f-6b9d-43a8-81a1-6e1929437912&quot;,&quot;parentUUID&quot;:&quot;d23d3a87-5e70-4633-9e26-7cc006b1043e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;4439ca7f-6b9d-43a8-81a1-6e1929437912&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;ce4bd857-cde8-4fc5-bc9f-fda39980e89c&quot;,&quot;title&quot;:&quot;get protocol()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the protocol&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get protocol() should return the protocol&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n protocol: NodePyATVProtocol.airplay\n});\nassert.strictEqual(device.protocol, NodePyATVProtocol.airplay);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;fd1ac457-e9db-4ae4-b028-55b1f134f3ea&quot;,&quot;parentUUID&quot;:&quot;ce4bd857-cde8-4fc5-bc9f-fda39980e89c&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;fd1ac457-e9db-4ae4-b028-55b1f134f3ea&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;095c7377-a0b4-4e7a-9600-39eaee9c90f4&quot;,&quot;title&quot;:&quot;get model()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the model if set by scan&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get model() should return the model if set by scan&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;,\n id: &#x27;xxx&#x27;,\n model: &#x27;Gen4K&#x27;\n});\nassert.strictEqual(device.model, &#x27;Gen4K&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;85f50dbe-02c8-4515-ad8a-bc678deb18f7&quot;,&quot;parentUUID&quot;:&quot;095c7377-a0b4-4e7a-9600-39eaee9c90f4&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return undefined otherwise&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get model() should return undefined otherwise&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;\n});\nassert.strictEqual(device.model, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;b14c9f38-ea40-44aa-be63-566fca51661d&quot;,&quot;parentUUID&quot;:&quot;095c7377-a0b4-4e7a-9600-39eaee9c90f4&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;85f50dbe-02c8-4515-ad8a-bc678deb18f7&quot;,&quot;b14c9f38-ea40-44aa-be63-566fca51661d&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;4c5b8145-f2b6-496d-854c-2d5102002c2b&quot;,&quot;title&quot;:&quot;get modelName()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the model name if set by scan&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get modelName() should return the model name if set by scan&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;,\n id: &#x27;xxx&#x27;,\n modelName: &#x27;Apple TV 4K&#x27;\n});\nassert.strictEqual(device.modelName, &#x27;Apple TV 4K&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;0622ea6c-1ea9-493d-a8cb-4169af76a55c&quot;,&quot;parentUUID&quot;:&quot;4c5b8145-f2b6-496d-854c-2d5102002c2b&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return undefined otherwise&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get modelName() should return undefined otherwise&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;\n});\nassert.strictEqual(device.modelName, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;04aff91b-6b3b-4dcd-bd59-ae6852dc943f&quot;,&quot;parentUUID&quot;:&quot;4c5b8145-f2b6-496d-854c-2d5102002c2b&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;0622ea6c-1ea9-493d-a8cb-4169af76a55c&quot;,&quot;04aff91b-6b3b-4dcd-bd59-ae6852dc943f&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;e58cc6ee-474e-4ca5-9b33-8b4cf442621d&quot;,&quot;title&quot;:&quot;get os()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the operating system if set by scan&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get os() should return the operating system if set by scan&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;,\n id: &#x27;xxx&#x27;,\n os: &#x27;TvOS&#x27;\n});\nassert.strictEqual(device.os, &#x27;TvOS&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;bfe4411f-ba29-4ec9-921b-1ade0b3367fd&quot;,&quot;parentUUID&quot;:&quot;e58cc6ee-474e-4ca5-9b33-8b4cf442621d&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return undefined otherwise&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get os() should return undefined otherwise&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;\n});\nassert.strictEqual(device.os, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;eee991e7-7b47-4932-b029-09e59992d434&quot;,&quot;parentUUID&quot;:&quot;e58cc6ee-474e-4ca5-9b33-8b4cf442621d&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;bfe4411f-ba29-4ec9-921b-1ade0b3367fd&quot;,&quot;eee991e7-7b47-4932-b029-09e59992d434&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;bc20fa71-489a-4bac-aaf0-2327a2b3bb38&quot;,&quot;title&quot;:&quot;get version()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the version if set by scan&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get version() should return the version if set by scan&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;,\n id: &#x27;xxx&#x27;,\n version: &#x27;15.5.1&#x27;\n});\nassert.strictEqual(device.version, &#x27;15.5.1&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;ff0b02a0-a962-41bd-b4e7-9ea4af2902ad&quot;,&quot;parentUUID&quot;:&quot;bc20fa71-489a-4bac-aaf0-2327a2b3bb38&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return undefined otherwise&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get version() should return undefined otherwise&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;\n});\nassert.strictEqual(device.version, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;e8853848-5e81-4854-8fe6-5f2546eb7909&quot;,&quot;parentUUID&quot;:&quot;bc20fa71-489a-4bac-aaf0-2327a2b3bb38&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;ff0b02a0-a962-41bd-b4e7-9ea4af2902ad&quot;,&quot;e8853848-5e81-4854-8fe6-5f2546eb7909&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;e7e7eea0-a49e-4bb2-9c2d-f240cc87b76c&quot;,&quot;title&quot;:&quot;get services()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return the services if set by scan&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get services() should return the services if set by scan&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;,\n id: &#x27;xxx&#x27;,\n services: [\n {\n protocol: NodePyATVProtocol.mrp,\n port: 49152\n },\n {\n protocol: NodePyATVProtocol.airplay,\n port: 7000\n }\n ]\n});\nassert.deepStrictEqual(device.services, [\n {\n protocol: &#x27;mrp&#x27;,\n port: 49152\n },\n {\n protocol: &#x27;airplay&#x27;,\n port: 7000\n }\n]);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;7921187a-07be-4ca8-8929-504ce5f7dd63&quot;,&quot;parentUUID&quot;:&quot;e7e7eea0-a49e-4bb2-9c2d-f240cc87b76c&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return undefined otherwise&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get services() should return undefined otherwise&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;Vardagsrum&#x27;,\n host: &#x27;10.0.10.81&#x27;\n});\nassert.strictEqual(device.services, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;0f3bbe4e-92ae-4607-b93b-eba7733e5839&quot;,&quot;parentUUID&quot;:&quot;e7e7eea0-a49e-4bb2-9c2d-f240cc87b76c&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;7921187a-07be-4ca8-8929-504ce5f7dd63&quot;,&quot;0f3bbe4e-92ae-4607-b93b-eba7733e5839&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;e4d3a983-18b8-43a7-91c1-d8c2e7e1885f&quot;,&quot;title&quot;:&quot;get debug()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return true if set to true&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get debug() should return true if set to true&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n debug: true\n});\nassert.strictEqual(device.debug, true);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;655ecfcb-613d-48cf-8506-3b13bf49b14b&quot;,&quot;parentUUID&quot;:&quot;e4d3a983-18b8-43a7-91c1-d8c2e7e1885f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return fn if set to custom function&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get debug() should return fn if set to custom function&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () =&gt; {\n};\nconst device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n debug: fn\n});\nassert.strictEqual(device.debug, fn);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;b5a5f3ac-c6c5-443b-90d6-4e40f217f985&quot;,&quot;parentUUID&quot;:&quot;e4d3a983-18b8-43a7-91c1-d8c2e7e1885f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return false if unset&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice get debug() should return false if unset&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n});\nassert.strictEqual(device.debug, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;318431ac-f03d-4645-951b-074dee14a920&quot;,&quot;parentUUID&quot;:&quot;e4d3a983-18b8-43a7-91c1-d8c2e7e1885f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;655ecfcb-613d-48cf-8506-3b13bf49b14b&quot;,&quot;b5a5f3ac-c6c5-443b-90d6-4e40f217f985&quot;,&quot;318431ac-f03d-4645-951b-074dee14a920&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;faefd627-8f93-4581-81cf-597226f38df0&quot;,&quot;title&quot;:&quot;set debug()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work for debug = true&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice set debug() should work for debug = true&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n});\nassert.strictEqual(device.debug, undefined);\ndevice.debug = true;\nassert.strictEqual(device.debug, true);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;834b14fe-6b6b-48c8-a6c2-fd56104fde68&quot;,&quot;parentUUID&quot;:&quot;faefd627-8f93-4581-81cf-597226f38df0&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work for debug = undefined&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice set debug() should work for debug = undefined&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n debug: true\n});\nassert.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert.strictEqual(device.debug, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;7bd0a38c-a7c4-41aa-b141-75de3c7c3b92&quot;,&quot;parentUUID&quot;:&quot;faefd627-8f93-4581-81cf-597226f38df0&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work for debug = undefined&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice set debug() should work for debug = undefined&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n debug: true\n});\nassert.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert.strictEqual(device.debug, undefined);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;2f027e6d-420a-4039-a55a-1c9de43ec63b&quot;,&quot;parentUUID&quot;:&quot;faefd627-8f93-4581-81cf-597226f38df0&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work for debug = fn&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice set debug() should work for debug = fn&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n});\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () =&gt; {\n};\nassert.strictEqual(device.debug, undefined);\ndevice.debug = fn;\nassert.strictEqual(device.debug, fn);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;1aa3aa39-1a33-45e0-b049-50abe2a30ce8&quot;,&quot;parentUUID&quot;:&quot;faefd627-8f93-4581-81cf-597226f38df0&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;834b14fe-6b6b-48c8-a6c2-fd56104fde68&quot;,&quot;7bd0a38c-a7c4-41aa-b141-75de3c7c3b92&quot;,&quot;2f027e6d-420a-4039-a55a-1c9de43ec63b&quot;,&quot;1aa3aa39-1a33-45e0-b049-50abe2a30ce8&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;dd5b8ebf-02e9-4ecf-a557-d6a8707e5295&quot;,&quot;title&quot;:&quot;toJSON()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return a object representation&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice toJSON() should return a object representation&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n id: &#x27;*****&#x27;,\n protocol: NodePyATVProtocol.airplay\n});\nassert.deepEqual(device.toJSON(), {\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n id: &#x27;*****&#x27;,\n protocol: NodePyATVProtocol.airplay\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;bb1fc1be-0a8f-48d8-80ed-ba273eb2f3f1&quot;,&quot;parentUUID&quot;:&quot;dd5b8ebf-02e9-4ecf-a557-d6a8707e5295&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should be possible to create a new device from this&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice toJSON() should be possible to create a new device from this&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const config = {\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n id: &#x27;*****&#x27;,\n protocol: NodePyATVProtocol.airplay\n};\nconst deviceA = new NodePyATVDevice(config);\nconst deviceB = new NodePyATVDevice(deviceA.toJSON());\nassert.deepEqual(deviceB.toJSON(), config);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;485d2f91-061b-460d-8bac-600ab274eaec&quot;,&quot;parentUUID&quot;:&quot;dd5b8ebf-02e9-4ecf-a557-d6a8707e5295&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;bb1fc1be-0a8f-48d8-80ed-ba273eb2f3f1&quot;,&quot;485d2f91-061b-460d-8bac-600ab274eaec&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;0e6fb607-77a0-4d96-bd0d-65f2ac4b27c8&quot;,&quot;title&quot;:&quot;toString()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice toString() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n});\nassert.strictEqual(device.toString(), &#x27;NodePyATVDevice(My Testdevice, 192.168.178.2)&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d276a5dd-3dc6-42e3-a243-1c004603ca50&quot;,&quot;parentUUID&quot;:&quot;0e6fb607-77a0-4d96-bd0d-65f2ac4b27c8&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;d276a5dd-3dc6-42e3-a243-1c004603ca50&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;844d278a-179a-472d-bef5-20eba4b50bce&quot;,&quot;title&quot;:&quot;getState()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work [I]&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getState() should work [I]&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;pending&quot;,&quot;pass&quot;:false,&quot;fail&quot;:false,&quot;pending&quot;:true,&quot;code&quot;:&quot;&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;987899c9-c2ea-42da-bb33-ebc6d780f4eb&quot;,&quot;parentUUID&quot;:&quot;844d278a-179a-472d-bef5-20eba4b50bce&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getState() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n datetime: &#x27;2020-11-07T22:38:43.608030+01:00&#x27;,\n hash: &#x27;100e0ab6-6ff5-4199-9c04-a7107ff78712&#x27;,\n media_type: &#x27;video&#x27;,\n device_state: &#x27;playing&#x27;,\n title: &#x27;Solo: A Star Wars Story&#x27;,\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: &#x27;off&#x27;,\n repeat: &#x27;off&#x27;,\n app: &#x27;Disney+&#x27;,\n app_id: &#x27;com.disney.disneyplus&#x27;\n });\n })\n });\n const result = yield device.getState();\n assert.deepStrictEqual(result, {\n dateTime: new Date(&#x27;2020-11-07T22:38:43.608030+01:00&#x27;),\n hash: &#x27;100e0ab6-6ff5-4199-9c04-a7107ff78712&#x27;,\n mediaType: NodePyATVMediaType.video,\n deviceState: NodePyATVDeviceState.playing,\n title: &#x27;Solo: A Star Wars Story&#x27;,\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: &#x27;Disney+&#x27;,\n appId: &#x27;com.disney.disneyplus&#x27;,\n powerState: null\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d06d5d72-a872-4cf7-841b-665694cb04b2&quot;,&quot;parentUUID&quot;:&quot;844d278a-179a-472d-bef5-20eba4b50bce&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should reject with error if pyatv fails&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getState() should reject with error if pyatv fails&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;failure&#x27;,\n datetime: &#x27;2021-11-24T21:13:36.424576+03:00&#x27;,\n exception: &#x27;invalid credentials: 321&#x27;,\n stacktrace: &#x27;Traceback (most recent call last):\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\&quot;, line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\&quot;, line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\&quot;, line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\&quot;, line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\&quot;, line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\&quot;, line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\&quot;invalid credentials: \\\&quot; + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n&#x27;\n });\n })\n });\n assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield device.getState();\n }), /Got pyatv Error: invalid credentials: 321/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;e0188d42-2600-4064-8517-6b7ce87f3e05&quot;,&quot;parentUUID&quot;:&quot;844d278a-179a-472d-bef5-20eba4b50bce&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should cache requests for a bit&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getState() should cache requests for a bit&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n executions++;\n cp.end({\n result: &#x27;success&#x27;,\n datetime: new Date().toJSON(),\n hash: &#x27;100e0ab6-6ff5-4199-9c04-a7107ff78712&#x27;,\n media_type: &#x27;video&#x27;,\n device_state: &#x27;playing&#x27;,\n title: &#x27;Solo: A Star Wars Story&#x27;,\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: &#x27;off&#x27;,\n repeat: &#x27;off&#x27;,\n app: &#x27;Disney+&#x27;,\n app_id: &#x27;com.disney.disneyplus&#x27;\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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;99753c55-d4a1-4355-8253-293cc6481879&quot;,&quot;parentUUID&quot;:&quot;844d278a-179a-472d-bef5-20eba4b50bce&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should update the position if cache was used&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getState() should update the position if cache was used&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n datetime: new Date(new Date().getTime() - 1000).toJSON(),\n hash: &#x27;100e0ab6-6ff5-4199-9c04-a7107ff78712&#x27;,\n media_type: &#x27;video&#x27;,\n device_state: &#x27;playing&#x27;,\n title: &#x27;Solo: A Star Wars Story&#x27;,\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: &#x27;off&#x27;,\n repeat: &#x27;off&#x27;,\n app: &#x27;Disney+&#x27;,\n app_id: &#x27;com.disney.disneyplus&#x27;\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 &gt; 27, `Position should be &gt; 27, was ${secondResult.position}`);\n assert.ok(secondResult.position &lt; 30, `Position should be &gt; 27, was ${secondResult.position}`);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;4bf62bbf-3d40-41b8-835a-d956cfa95db6&quot;,&quot;parentUUID&quot;:&quot;844d278a-179a-472d-bef5-20eba4b50bce&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;d06d5d72-a872-4cf7-841b-665694cb04b2&quot;,&quot;e0188d42-2600-4064-8517-6b7ce87f3e05&quot;,&quot;99753c55-d4a1-4355-8253-293cc6481879&quot;,&quot;4bf62bbf-3d40-41b8-835a-d956cfa95db6&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[&quot;987899c9-c2ea-42da-bb33-ebc6d780f4eb&quot;],&quot;skipped&quot;:[],&quot;duration&quot;:4,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;4dea81dc-adb0-4ffc-aace-37b4a886d74a&quot;,&quot;title&quot;:&quot;clearState()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice clearState() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:3,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n executions++;\n cp.end({\n result: &#x27;success&#x27;,\n datetime: &#x27;2020-11-07T22:38:43.608030+01:00&#x27;,\n title: &#x27;Solo: A Star Wars Story&#x27;\n });\n })\n });\n assert.deepStrictEqual(yield device.getTitle(), &#x27;Solo: A Star Wars Story&#x27;);\n device.clearState();\n assert.deepStrictEqual(yield device.getTitle(), &#x27;Solo: A Star Wars Story&#x27;);\n assert.strictEqual(executions, 2);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;039044c1-cc00-44ef-b091-5ad9abd20797&quot;,&quot;parentUUID&quot;:&quot;4dea81dc-adb0-4ffc-aace-37b4a886d74a&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;039044c1-cc00-44ef-b091-5ad9abd20797&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:3,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;f40a3e51-3358-49d1-94ad-477c3108acca&quot;,&quot;title&quot;:&quot;getDateTime()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getDateTime() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n datetime: new Date().toJSON()\n });\n })\n });\n const result = yield device.getDateTime();\n assert.ok(result instanceof Date);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;add7a38f-b7f8-485e-8dfc-8a2ab73cdfab&quot;,&quot;parentUUID&quot;:&quot;f40a3e51-3358-49d1-94ad-477c3108acca&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;add7a38f-b7f8-485e-8dfc-8a2ab73cdfab&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;9ef848ce-c882-4706-aa3a-5f84b39cbb17&quot;,&quot;title&quot;:&quot;getHash()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getHash() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n hash: &#x27;12345&#x27;\n });\n })\n });\n const result = yield device.getHash();\n assert.strictEqual(result, &#x27;12345&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;c1a9e1f2-fe19-49d6-8520-785b025e3b6a&quot;,&quot;parentUUID&quot;:&quot;9ef848ce-c882-4706-aa3a-5f84b39cbb17&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;c1a9e1f2-fe19-49d6-8520-785b025e3b6a&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;42ea4709-4dfd-450e-bcd6-5d7cab370f5f&quot;,&quot;title&quot;:&quot;getMediaType()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getMediaType() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n media_type: &#x27;video&#x27;\n });\n })\n });\n const result = yield device.getMediaType();\n assert.deepStrictEqual(result, NodePyATVMediaType.video);\n assert.deepStrictEqual(result, &#x27;video&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;df2d31b4-fa43-4d2b-ab3e-7b928f9c3899&quot;,&quot;parentUUID&quot;:&quot;42ea4709-4dfd-450e-bcd6-5d7cab370f5f&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;df2d31b4-fa43-4d2b-ab3e-7b928f9c3899&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;02d66e30-ea61-4dc1-a706-2bfb322939d7&quot;,&quot;title&quot;:&quot;getDeviceState()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getDeviceState() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n device_state: &#x27;seeking&#x27;\n });\n })\n });\n const result = yield device.getDeviceState();\n assert.deepStrictEqual(result, NodePyATVDeviceState.seeking);\n assert.deepStrictEqual(result, &#x27;seeking&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;38eb8867-5c14-4254-844a-876dc0dd0460&quot;,&quot;parentUUID&quot;:&quot;02d66e30-ea61-4dc1-a706-2bfb322939d7&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;38eb8867-5c14-4254-844a-876dc0dd0460&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;70cc34fa-ff87-4e28-8925-c5169f174445&quot;,&quot;title&quot;:&quot;getTitle()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getTitle() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n title: &#x27;My Movie&#x27;\n });\n })\n });\n const result = yield device.getTitle();\n assert.strictEqual(result, &#x27;My Movie&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;1a8862c2-4834-4d2e-bba9-2a801f5dc526&quot;,&quot;parentUUID&quot;:&quot;70cc34fa-ff87-4e28-8925-c5169f174445&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;1a8862c2-4834-4d2e-bba9-2a801f5dc526&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;d48cdd47-f007-4f34-88f1-8387c102b43e&quot;,&quot;title&quot;:&quot;getArtist()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getArtist() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n artist: &#x27;My Artist&#x27;\n });\n })\n });\n const result = yield device.getArtist();\n assert.strictEqual(result, &#x27;My Artist&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;85333e4a-4990-4c66-9be5-ad93ec529eef&quot;,&quot;parentUUID&quot;:&quot;d48cdd47-f007-4f34-88f1-8387c102b43e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;85333e4a-4990-4c66-9be5-ad93ec529eef&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;65a0b33c-7b9d-4117-a80c-864cfff60967&quot;,&quot;title&quot;:&quot;getAlbum()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getAlbum() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n album: &#x27;My ALbum&#x27;\n });\n })\n });\n const result = yield device.getAlbum();\n assert.strictEqual(result, &#x27;My ALbum&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;13a826d0-a9a6-4c22-8adf-b85c27c3341c&quot;,&quot;parentUUID&quot;:&quot;65a0b33c-7b9d-4117-a80c-864cfff60967&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;13a826d0-a9a6-4c22-8adf-b85c27c3341c&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;9335b1df-6088-4911-b4f0-0f2467074131&quot;,&quot;title&quot;:&quot;getGenre()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getGenre() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n genre: &#x27;My Genre&#x27;\n });\n })\n });\n const result = yield device.getGenre();\n assert.strictEqual(result, &#x27;My Genre&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;72b18b76-4726-4552-83d9-7926c23b4033&quot;,&quot;parentUUID&quot;:&quot;9335b1df-6088-4911-b4f0-0f2467074131&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;72b18b76-4726-4552-83d9-7926c23b4033&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;94d18d18-a8e8-418d-819b-1a8df1075994&quot;,&quot;title&quot;:&quot;getTotalTime()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getTotalTime() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n total_time: 45\n });\n })\n });\n const result = yield device.getTotalTime();\n assert.strictEqual(result, 45);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5179a037-90b7-4182-bb53-acab38dc3c27&quot;,&quot;parentUUID&quot;:&quot;94d18d18-a8e8-418d-819b-1a8df1075994&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;5179a037-90b7-4182-bb53-acab38dc3c27&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;808064f2-8de4-407c-aab6-2f6c22526e9b&quot;,&quot;title&quot;:&quot;getPosition()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getPosition() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n position: 30\n });\n })\n });\n const result = yield device.getPosition();\n assert.strictEqual(result, 30);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;e1a30065-f35b-4228-bf78-726a6212d627&quot;,&quot;parentUUID&quot;:&quot;808064f2-8de4-407c-aab6-2f6c22526e9b&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;e1a30065-f35b-4228-bf78-726a6212d627&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;aadc57bb-527a-4913-8fbf-74f77061e8c6&quot;,&quot;title&quot;:&quot;getShuffle()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getShuffle() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n shuffle: &#x27;songs&#x27;\n });\n })\n });\n const result = yield device.getShuffle();\n assert.deepStrictEqual(result, NodePyATVShuffleState.songs);\n assert.deepStrictEqual(result, &#x27;songs&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;b8e4895c-f13e-4213-b033-cc7994ab411c&quot;,&quot;parentUUID&quot;:&quot;aadc57bb-527a-4913-8fbf-74f77061e8c6&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;b8e4895c-f13e-4213-b033-cc7994ab411c&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;ae656cb2-8f78-4129-b7d8-b817cbf7f3cd&quot;,&quot;title&quot;:&quot;getRepeat()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getRepeat() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n repeat: &#x27;all&#x27;\n });\n })\n });\n const result = yield device.getRepeat();\n assert.deepStrictEqual(result, NodePyATVRepeatState.all);\n assert.deepStrictEqual(result, &#x27;all&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;38f59632-5b62-4c63-a245-a3ed19d86666&quot;,&quot;parentUUID&quot;:&quot;ae656cb2-8f78-4129-b7d8-b817cbf7f3cd&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;38f59632-5b62-4c63-a245-a3ed19d86666&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;eb23e8aa-b81d-4f96-8150-4a51f8900222&quot;,&quot;title&quot;:&quot;getApp()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getApp() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n app: &#x27;My App&#x27;\n });\n })\n });\n const result = yield device.getApp();\n assert.strictEqual(result, &#x27;My App&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;722ed142-f71d-4ad6-bb48-d51d1e6933f5&quot;,&quot;parentUUID&quot;:&quot;eb23e8aa-b81d-4f96-8150-4a51f8900222&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;722ed142-f71d-4ad6-bb48-d51d1e6933f5&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;29e357d1-d87a-4eec-b332-64d768015293&quot;,&quot;title&quot;:&quot;getAppId()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice getAppId() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end({\n result: &#x27;success&#x27;,\n app_id: &#x27;app.example.com&#x27;\n });\n })\n });\n const result = yield device.getAppId();\n assert.strictEqual(result, &#x27;app.example.com&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;569b5b5d-6f29-4b1b-bbf9-632279487224&quot;,&quot;parentUUID&quot;:&quot;29e357d1-d87a-4eec-b332-64d768015293&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;569b5b5d-6f29-4b1b-bbf9-632279487224&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;de3b5c0d-2902-4410-9850-536f9b83a76d&quot;,&quot;title&quot;:&quot;pressKey()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work with valid key&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice pressKey() should work with valid key&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n yield device.pressKey(NodePyATVKeys.home);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;2cad5a6d-a6f4-400e-b1f4-8a71dfb77ac1&quot;,&quot;parentUUID&quot;:&quot;de3b5c0d-2902-4410-9850-536f9b83a76d&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error with invalid key&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice pressKey() should throw error with invalid key&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;\n });\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n // @ts-ignore\n yield device.pressKey(&#x27;foo&#x27;);\n }), /Unsupported key value foo/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;456700b6-a4ae-4a18-9784-65322e837f40&quot;,&quot;parentUUID&quot;:&quot;de3b5c0d-2902-4410-9850-536f9b83a76d&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error if pyatv result is not success&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice pressKey() should throw error if pyatv result is not success&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;failure\&quot;}&#x27;);\n })\n });\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield device.pressKey(NodePyATVKeys.home);\n }), /Unable to parse pyatv response/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;3cffaa51-18aa-46eb-96bb-375c8669b252&quot;,&quot;parentUUID&quot;:&quot;de3b5c0d-2902-4410-9850-536f9b83a76d&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;2cad5a6d-a6f4-400e-b1f4-8a71dfb77ac1&quot;,&quot;456700b6-a4ae-4a18-9784-65322e837f40&quot;,&quot;3cffaa51-18aa-46eb-96bb-375c8669b252&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:4,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;0e4d2ec1-17cf-4390-bfb6-71cd5317d170&quot;,&quot;title&quot;:&quot;down()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice down() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;31b25548-7097-4b18-bc36-f5691b4b3266&quot;,&quot;parentUUID&quot;:&quot;0e4d2ec1-17cf-4390-bfb6-71cd5317d170&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;31b25548-7097-4b18-bc36-f5691b4b3266&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;7838c464-c1d4-4bea-80ac-a3af65f58bfe&quot;,&quot;title&quot;:&quot;home()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice home() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;9be7ff77-c60f-4b52-8c04-d5b22d69ad51&quot;,&quot;parentUUID&quot;:&quot;7838c464-c1d4-4bea-80ac-a3af65f58bfe&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;9be7ff77-c60f-4b52-8c04-d5b22d69ad51&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;7728b91d-af1b-493a-a0c0-1bc15763130e&quot;,&quot;title&quot;:&quot;homeHold()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice homeHold() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;bcbab322-d47a-49d3-a9a6-c067b7ab2557&quot;,&quot;parentUUID&quot;:&quot;7728b91d-af1b-493a-a0c0-1bc15763130e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;bcbab322-d47a-49d3-a9a6-c067b7ab2557&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;35fb02f7-7fb8-4bf2-903b-34843b567a16&quot;,&quot;title&quot;:&quot;left()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice left() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;b6fdecce-dd04-432c-8c35-3c660c618a89&quot;,&quot;parentUUID&quot;:&quot;35fb02f7-7fb8-4bf2-903b-34843b567a16&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;b6fdecce-dd04-432c-8c35-3c660c618a89&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;c5ec67bb-9895-4382-8f54-ce80b00a5805&quot;,&quot;title&quot;:&quot;menu()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice menu() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;82f0cd2f-441f-4fbb-be08-69a26649f5e3&quot;,&quot;parentUUID&quot;:&quot;c5ec67bb-9895-4382-8f54-ce80b00a5805&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;82f0cd2f-441f-4fbb-be08-69a26649f5e3&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;1d8a4210-8108-43aa-8f0d-8c407543d4e5&quot;,&quot;title&quot;:&quot;next()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice next() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;ae6bfffd-a0b4-487a-a55a-9637855ce526&quot;,&quot;parentUUID&quot;:&quot;1d8a4210-8108-43aa-8f0d-8c407543d4e5&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;ae6bfffd-a0b4-487a-a55a-9637855ce526&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;b39a0e19-b514-483a-a8c7-6f2937ff528e&quot;,&quot;title&quot;:&quot;pause()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice pause() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;a5393086-2ba0-466d-8e84-b0299ddaabe5&quot;,&quot;parentUUID&quot;:&quot;b39a0e19-b514-483a-a8c7-6f2937ff528e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;a5393086-2ba0-466d-8e84-b0299ddaabe5&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;e5a7e9f7-bb55-4aaa-a734-cc94fa892ed7&quot;,&quot;title&quot;:&quot;play()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice play() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;4c338b5f-e90f-46ad-ae88-42af2ae168e0&quot;,&quot;parentUUID&quot;:&quot;e5a7e9f7-bb55-4aaa-a734-cc94fa892ed7&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;4c338b5f-e90f-46ad-ae88-42af2ae168e0&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;d8973b66-ba67-4c78-a56a-a783d8dd6cd2&quot;,&quot;title&quot;:&quot;playPause()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice playPause() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;77eff26d-90f0-446e-97b3-4b3485dfeab6&quot;,&quot;parentUUID&quot;:&quot;d8973b66-ba67-4c78-a56a-a783d8dd6cd2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;77eff26d-90f0-446e-97b3-4b3485dfeab6&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;db355f72-9269-4a9d-af23-1bb8e4998729&quot;,&quot;title&quot;:&quot;previous()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice previous() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;b29e65e9-bd03-43b9-9445-faad38f8ae3c&quot;,&quot;parentUUID&quot;:&quot;db355f72-9269-4a9d-af23-1bb8e4998729&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;b29e65e9-bd03-43b9-9445-faad38f8ae3c&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;5901ea01-7c61-4bd4-a571-a439aaa103ee&quot;,&quot;title&quot;:&quot;right()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice right() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;963ff983-64a5-4145-9c4c-282a6d23514c&quot;,&quot;parentUUID&quot;:&quot;5901ea01-7c61-4bd4-a571-a439aaa103ee&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;963ff983-64a5-4145-9c4c-282a6d23514c&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;4105052b-25ad-4ffe-9858-bc543ee29f15&quot;,&quot;title&quot;:&quot;select()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice select() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;9683067e-8424-4210-ac18-54ffa9319bf0&quot;,&quot;parentUUID&quot;:&quot;4105052b-25ad-4ffe-9858-bc543ee29f15&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;9683067e-8424-4210-ac18-54ffa9319bf0&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;b8bbaafe-be65-4149-b524-e710463e4795&quot;,&quot;title&quot;:&quot;skipBackward()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice skipBackward() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;91bfb926-12be-424f-b78e-fd95ea20599e&quot;,&quot;parentUUID&quot;:&quot;b8bbaafe-be65-4149-b524-e710463e4795&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;91bfb926-12be-424f-b78e-fd95ea20599e&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;c891c130-7c21-4657-9499-0931648e1780&quot;,&quot;title&quot;:&quot;skipForward()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice skipForward() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;322b4954-0b5e-492e-8214-453fde435330&quot;,&quot;parentUUID&quot;:&quot;c891c130-7c21-4657-9499-0931648e1780&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;322b4954-0b5e-492e-8214-453fde435330&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;0c37113c-f232-47de-98ce-c3425a833e87&quot;,&quot;title&quot;:&quot;stop()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice stop() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;2e7bc9be-4b4f-4d7c-a7f3-1d7ba5ff1449&quot;,&quot;parentUUID&quot;:&quot;0c37113c-f232-47de-98ce-c3425a833e87&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;2e7bc9be-4b4f-4d7c-a7f3-1d7ba5ff1449&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;171bdb46-0127-4279-b6fb-c03e684b3810&quot;,&quot;title&quot;:&quot;suspend()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice suspend() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;6459cd01-3270-4bba-bdd6-587b8e1bc994&quot;,&quot;parentUUID&quot;:&quot;171bdb46-0127-4279-b6fb-c03e684b3810&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;6459cd01-3270-4bba-bdd6-587b8e1bc994&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;6bbdf5b3-6366-4e28-83e7-da0b676c86f3&quot;,&quot;title&quot;:&quot;topMenu()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice topMenu() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;62ee332a-6c51-4a82-bfbb-14eb795eb71d&quot;,&quot;parentUUID&quot;:&quot;6bbdf5b3-6366-4e28-83e7-da0b676c86f3&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;62ee332a-6c51-4a82-bfbb-14eb795eb71d&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;89874c48-b61e-4e8d-ab09-a2186da2df43&quot;,&quot;title&quot;:&quot;up()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice up() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;1f68d4fc-fbca-441e-831f-e4796e32930b&quot;,&quot;parentUUID&quot;:&quot;89874c48-b61e-4e8d-ab09-a2186da2df43&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;1f68d4fc-fbca-441e-831f-e4796e32930b&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;b3652c1a-9821-41de-ae62-cb3bc5470c4d&quot;,&quot;title&quot;:&quot;volumeDown()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice volumeDown() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;db9f0495-85bb-4ed8-b1a1-59f0828111d3&quot;,&quot;parentUUID&quot;:&quot;b3652c1a-9821-41de-ae62-cb3bc5470c4d&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;db9f0495-85bb-4ed8-b1a1-59f0828111d3&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;fe40171a-85d7-4d37-965f-7de2d041e462&quot;,&quot;title&quot;:&quot;volumeUp()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice volumeUp() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;4a567ee9-1fb2-4cf4-9977-5a96fefa4ddf&quot;,&quot;parentUUID&quot;:&quot;fe40171a-85d7-4d37-965f-7de2d041e462&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;4a567ee9-1fb2-4cf4-9977-5a96fefa4ddf&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;8cf37f11-3fa6-4d3d-9126-6b6f441b4cf0&quot;,&quot;title&quot;:&quot;wakeup()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice wakeup() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;583f9744-1e51-4c8d-90c1-da070b5d61bd&quot;,&quot;parentUUID&quot;:&quot;8cf37f11-3fa6-4d3d-9126-6b6f441b4cf0&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;583f9744-1e51-4c8d-90c1-da070b5d61bd&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;0081811e-d8d5-4c38-b6a5-440071a16338&quot;,&quot;title&quot;:&quot;turnOff()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice turnOff() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;89943d58-57f4-496e-9d73-df04db50c0e3&quot;,&quot;parentUUID&quot;:&quot;0081811e-d8d5-4c38-b6a5-440071a16338&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;89943d58-57f4-496e-9d73-df04db50c0e3&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;70e4cdbb-7aca-446f-b89d-eef14bf2b2ac&quot;,&quot;title&quot;:&quot;turnOn()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/device.ts&quot;,&quot;file&quot;:&quot;/test/device.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work&quot;,&quot;fullTitle&quot;:&quot;NodePyATVDevice turnOn() should work&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const device = new NodePyATVDevice({\n name: &#x27;My Testdevice&#x27;,\n host: &#x27;192.168.178.2&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n cp.end(&#x27;{\&quot;result\&quot;:\&quot;success\&quot;}&#x27;);\n })\n });\n // @ts-ignore\n yield device[key]();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;be65e319-8d1e-4fee-bf1a-6cfa07cae8a2&quot;,&quot;parentUUID&quot;:&quot;70e4cdbb-7aca-446f-b89d-eef14bf2b2ac&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;be65e319-8d1e-4fee-bf1a-6cfa07cae8a2&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000}],&quot;passes&quot;:[],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;d62d5588-1b19-4314-b773-2ab8670b7ac8&quot;,&quot;title&quot;:&quot;NodePyATVInstance&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[],&quot;suites&quot;:[{&quot;uuid&quot;:&quot;0006f5d7-40fb-4f82-a41f-e0d5edcab192&quot;,&quot;title&quot;:&quot;static version()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work with pyatv [L]&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should work with pyatv [L]&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:725,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;slow&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;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(&#x27;No version found for pyatv. Is it installed in test environment?&#x27;);\n }\n assert.equal(typeof result.pyatv, &#x27;string&#x27;, &#x27;result.pyatv is a string&#x27;);\n assert.ok(result.pyatv.length &gt;= 5, &#x27;result.pyatv has content&#x27;);\n assert.strictEqual(result.module, version);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;4d6c0aee-bafd-47f5-8200-9f0bafc5dace&quot;,&quot;parentUUID&quot;:&quot;0006f5d7-40fb-4f82-a41f-e0d5edcab192&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return the pyatv version&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should return the pyatv version&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp =&gt; {\n cp.code(1);\n cp.end(&#x27;atvremote 0.7.4&#x27;);\n })\n });\n assert.ok(result.pyatv);\n assert.strictEqual(result.pyatv, &#x27;0.7.4&#x27;);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;328fbc24-1ca9-4493-8649-8cd2aac94a57&quot;,&quot;parentUUID&quot;:&quot;0006f5d7-40fb-4f82-a41f-e0d5edcab192&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return the module version&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should return the module version&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n noColors: true,\n spawn: createFakeSpawn(cp =&gt; cp.code(1).end())\n });\n assert.strictEqual(result.module, version);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5d8fbe09-a26f-4deb-875a-64d434ebc9f8&quot;,&quot;parentUUID&quot;:&quot;0006f5d7-40fb-4f82-a41f-e0d5edcab192&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should handle option.atvremotePath&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should handle option.atvremotePath&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.version({\n atvremotePath: &#x27;/foo/bar&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n assert.strictEqual(cp.cmd(), &#x27;/foo/bar&#x27;);\n cp.code(1).end();\n })\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;acf73035-96af-47d2-a3c7-aefbc86edcf1&quot;,&quot;parentUUID&quot;:&quot;0006f5d7-40fb-4f82-a41f-e0d5edcab192&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with option.debug = true&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should work with option.debug = true&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:3,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.version({\n debug: true,\n spawn: createFakeSpawn(cp =&gt; cp.code(1).end())\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5390fc1f-c577-4537-83a2-a8a6dfb33e73&quot;,&quot;parentUUID&quot;:&quot;0006f5d7-40fb-4f82-a41f-e0d5edcab192&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with option.noColors&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should work with option.noColors&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.version({\n debug: () =&gt; {\n // no debug log\n },\n noColors: true,\n spawn: createFakeSpawn(cp =&gt; cp.code(1).end())\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;c0aca693-faa1-484c-9527-e99bda9c7192&quot;,&quot;parentUUID&quot;:&quot;0006f5d7-40fb-4f82-a41f-e0d5edcab192&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return null on pyatv stderr output&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should return null on pyatv stderr output&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp =&gt; cp.stderr(&#x27;Hello World!&#x27;).code(123).end())\n });\n assert.strictEqual(result.pyatv, null);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5ec79f3d-0357-4fa7-8cfa-05b87f8b1e99&quot;,&quot;parentUUID&quot;:&quot;0006f5d7-40fb-4f82-a41f-e0d5edcab192&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return null on pyatv error&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should return null on pyatv error&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp =&gt; {\n cp.error(new Error(&#x27;Hello world!&#x27;)).end();\n })\n });\n assert.strictEqual(result.pyatv, null);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;673efdfd-6149-4020-98c5-c880ff4e920a&quot;,&quot;parentUUID&quot;:&quot;0006f5d7-40fb-4f82-a41f-e0d5edcab192&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return null on invalid pyatv version&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static version() should return null on invalid pyatv version&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield NodePyATVInstance.version({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout(&#x27;atvremote 42&#x27;).code(1).end();\n })\n });\n assert.strictEqual(result.pyatv, null);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;e3f070b2-9dfc-462a-bca1-5f9ac077bee7&quot;,&quot;parentUUID&quot;:&quot;0006f5d7-40fb-4f82-a41f-e0d5edcab192&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;4d6c0aee-bafd-47f5-8200-9f0bafc5dace&quot;,&quot;328fbc24-1ca9-4493-8649-8cd2aac94a57&quot;,&quot;5d8fbe09-a26f-4deb-875a-64d434ebc9f8&quot;,&quot;acf73035-96af-47d2-a3c7-aefbc86edcf1&quot;,&quot;5390fc1f-c577-4537-83a2-a8a6dfb33e73&quot;,&quot;c0aca693-faa1-484c-9527-e99bda9c7192&quot;,&quot;5ec79f3d-0357-4fa7-8cfa-05b87f8b1e99&quot;,&quot;673efdfd-6149-4020-98c5-c880ff4e920a&quot;,&quot;e3f070b2-9dfc-462a-bca1-5f9ac077bee7&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:742,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;a634be5d-22fd-473b-aeac-8c1d52c69aed&quot;,&quot;title&quot;:&quot;static check()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should resolve in test environment [L]&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static check() should resolve in test environment [L]&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:6033,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;slow&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n this.timeout(12000);\n yield NodePyATVInstance.check();\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;caa0f5aa-ef5b-4824-87de-26986b2394e3&quot;,&quot;parentUUID&quot;:&quot;a634be5d-22fd-473b-aeac-8c1d52c69aed&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return nice error message if pyatv was not found&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static check() should return nice error message if pyatv was not found&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.check({\n spawn: createFakeSpawn(cp =&gt; {\n cp.error(new Error(&#x27;spawn atvremote ENOENT&#x27;)).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;a78c2ab2-f148-441c-a382-b9ba56603c87&quot;,&quot;parentUUID&quot;:&quot;a634be5d-22fd-473b-aeac-8c1d52c69aed&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return nice error message if myatv is too old&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static check() should return nice error message if myatv is too old&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.check({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout(&#x27;atvremote 0.5.1&#x27;).code(1).end();\n })\n });\n }), /Found pyatv, but unforunately it&#x27;s too old. Please update pyatv./);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;599e22d0-1879-461f-a496-17150ac90672&quot;,&quot;parentUUID&quot;:&quot;a634be5d-22fd-473b-aeac-8c1d52c69aed&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should return nice error message if scan failed&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static check() should return nice error message if scan failed&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:3,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n let i = 0;\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.check({\n spawn: createFakeSpawn(cp =&gt; {\n if (i === 0) {\n cp.stdout(&#x27;atvremote 0.7.0&#x27;).code(1).end();\n i++;\n }\n else {\n cp.error(new Error(&#x27;spawn atvremote ENOENT&#x27;)).code(1).end();\n }\n })\n });\n }), /Unable to scan for devices/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;1cfdad47-5dda-423c-8d79-a2d74e455107&quot;,&quot;parentUUID&quot;:&quot;a634be5d-22fd-473b-aeac-8c1d52c69aed&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;caa0f5aa-ef5b-4824-87de-26986b2394e3&quot;,&quot;a78c2ab2-f148-441c-a382-b9ba56603c87&quot;,&quot;599e22d0-1879-461f-a496-17150ac90672&quot;,&quot;1cfdad47-5dda-423c-8d79-a2d74e455107&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:6039,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;a0ba03bd-ea2e-4b57-95e2-eefe0785889e&quot;,&quot;title&quot;:&quot;static find()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work [L]&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should work [L]&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:5524,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;slow&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;483ac486-1bca-4916-a652-587af4eab265&quot;,&quot;parentUUID&quot;:&quot;a0ba03bd-ea2e-4b57-95e2-eefe0785889e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should handle option.atvscriptPath&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should handle option.atvscriptPath&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n atvscriptPath: &#x27;/foo/bar&#x27;,\n spawn: createFakeSpawn(cp =&gt; {\n assert.strictEqual(cp.cmd(), &#x27;/foo/bar&#x27;);\n cp.stdout({\n &#x27;result&#x27;: &#x27;success&#x27;,\n &#x27;datetime&#x27;: &#x27;2020-11-06T20:47:30.840022+01:00&#x27;,\n &#x27;devices&#x27;: []\n }).end();\n })\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;03799a2c-ce2b-476d-8cc1-adbae81dae19&quot;,&quot;parentUUID&quot;:&quot;a0ba03bd-ea2e-4b57-95e2-eefe0785889e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error on stderr output&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should throw error on stderr output&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stderr(&#x27;Hello World!&#x27;).code(1).end();\n })\n });\n }), /Unable to execute request/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;e0fa38dd-62c2-4ff6-931f-bbb847565299&quot;,&quot;parentUUID&quot;:&quot;a0ba03bd-ea2e-4b57-95e2-eefe0785889e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error on error&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should throw error on error&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.error(new Error(&#x27;Hello world!&#x27;)).code(1).end();\n })\n });\n }), /Hello world!/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;e09921fc-1ca2-4765-9301-6bc78aeef8d5&quot;,&quot;parentUUID&quot;:&quot;a0ba03bd-ea2e-4b57-95e2-eefe0785889e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error if atvscript result is not valid json&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should throw error if atvscript result is not valid json&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout(JSON.stringify({\n &#x27;result&#x27;: &#x27;success&#x27;,\n &#x27;datetime&#x27;: &#x27;2020-11-06T20:47:30.840022+01:00&#x27;,\n &#x27;devices&#x27;: []\n }).substr(1)).end();\n })\n });\n }), /Unable to parse result/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;f45b1401-55db-4e89-8f31-c9cad5467d17&quot;,&quot;parentUUID&quot;:&quot;a0ba03bd-ea2e-4b57-95e2-eefe0785889e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error if atvscript result is not successfull&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should throw error if atvscript result is not successfull&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout({\n result: &#x27;error&#x27;\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d43bc447-9e48-43fb-95b5-4aa574abfd25&quot;,&quot;parentUUID&quot;:&quot;a0ba03bd-ea2e-4b57-95e2-eefe0785889e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw error if atvscript result is without device array&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should throw error if atvscript result is without device array&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout({\n result: &#x27;success&#x27;\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;a6c91679-b234-417b-b5da-ecde5b4e0348&quot;,&quot;parentUUID&quot;:&quot;a0ba03bd-ea2e-4b57-95e2-eefe0785889e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work if devices are without device_info / services&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should work if devices are without device_info / services&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const devices = yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout({\n result: &#x27;success&#x27;,\n datetime: &#x27;2020-11-06T20:47:30.840022+01:00&#x27;,\n devices: [\n {\n name: &#x27;Vardagsrum&#x27;,\n address: &#x27;10.0.10.81&#x27;,\n identifier: &#x27;xxx&#x27;\n }\n ]\n }).code(1).end();\n })\n });\n assert.strictEqual(devices.length, 1);\n assert.strictEqual(devices[0].name, &#x27;Vardagsrum&#x27;);\n assert.strictEqual(devices[0].host, &#x27;10.0.10.81&#x27;);\n assert.strictEqual(devices[0].id, &#x27;xxx&#x27;);\n assert.strictEqual(devices[0].model, undefined);\n assert.strictEqual(devices[0].modelName, undefined);\n assert.strictEqual(devices[0].os, undefined);\n assert.strictEqual(devices[0].version, undefined);\n assert.deepStrictEqual(devices[0].services, undefined);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;042b9a3a-50e3-4ede-9a3e-0be124cb7b7d&quot;,&quot;parentUUID&quot;:&quot;a0ba03bd-ea2e-4b57-95e2-eefe0785889e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work if devices are with device_info / services&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static find() should work if devices are with device_info / services&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const devices = yield NodePyATVInstance.find({\n spawn: createFakeSpawn(cp =&gt; {\n cp.stdout({\n result: &#x27;success&#x27;,\n datetime: &#x27;2020-11-06T20:47:30.840022+01:00&#x27;,\n devices: [\n {\n name: &#x27;Vardagsrum&#x27;,\n address: &#x27;10.0.10.81&#x27;,\n identifier: &#x27;xxx&#x27;,\n device_info: {\n &#x27;model&#x27;: &#x27;Gen4K&#x27;,\n &#x27;model_str&#x27;: &#x27;Apple TV 4K&#x27;,\n &#x27;operating_system&#x27;: &#x27;TvOS&#x27;,\n &#x27;version&#x27;: &#x27;15.5.1&#x27;\n },\n services: [\n {\n protocol: &#x27;mrp&#x27;,\n port: 49152\n },\n {\n protocol: &#x27;airplay&#x27;,\n port: 7000\n }\n ]\n }\n ]\n }).code(1).end();\n })\n });\n assert.strictEqual(devices.length, 1);\n assert.strictEqual(devices[0].name, &#x27;Vardagsrum&#x27;);\n assert.strictEqual(devices[0].host, &#x27;10.0.10.81&#x27;);\n assert.strictEqual(devices[0].id, &#x27;xxx&#x27;);\n assert.strictEqual(devices[0].model, &#x27;Gen4K&#x27;);\n assert.strictEqual(devices[0].modelName, &#x27;Apple TV 4K&#x27;);\n assert.strictEqual(devices[0].os, &#x27;TvOS&#x27;);\n assert.strictEqual(devices[0].version, &#x27;15.5.1&#x27;);\n assert.deepStrictEqual(devices[0].services, [\n {\n protocol: NodePyATVProtocol.mrp,\n port: 49152\n },\n {\n protocol: NodePyATVProtocol.airplay,\n port: 7000\n }\n ]);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;ce1ac065-1b40-453e-b248-64f8e414ff89&quot;,&quot;parentUUID&quot;:&quot;a0ba03bd-ea2e-4b57-95e2-eefe0785889e&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;483ac486-1bca-4916-a652-587af4eab265&quot;,&quot;03799a2c-ce2b-476d-8cc1-adbae81dae19&quot;,&quot;e0fa38dd-62c2-4ff6-931f-bbb847565299&quot;,&quot;e09921fc-1ca2-4765-9301-6bc78aeef8d5&quot;,&quot;f45b1401-55db-4e89-8f31-c9cad5467d17&quot;,&quot;d43bc447-9e48-43fb-95b5-4aa574abfd25&quot;,&quot;a6c91679-b234-417b-b5da-ecde5b4e0348&quot;,&quot;042b9a3a-50e3-4ede-9a3e-0be124cb7b7d&quot;,&quot;ce1ac065-1b40-453e-b248-64f8e414ff89&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:5540,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;4bc78568-9904-4c43-90f0-7a1b1b9f38b1&quot;,&quot;title&quot;:&quot;static device()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should pass options to constructor&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance static device() should pass options to constructor&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const device = NodePyATVInstance.device({ host: &#x27;192.168.178.6&#x27;, name: &#x27;My Testdevice&#x27; });\nassert.strictEqual(device.host, &#x27;192.168.178.6&#x27;);\nassert.strictEqual(device.name, &#x27;My Testdevice&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;05f72214-d28b-4402-a19c-9a027b4d2a41&quot;,&quot;parentUUID&quot;:&quot;4bc78568-9904-4c43-90f0-7a1b1b9f38b1&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;05f72214-d28b-4402-a19c-9a027b4d2a41&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;e1a3b08b-c896-46df-8873-3fc31c978d80&quot;,&quot;title&quot;:&quot;version()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should merge options from constructor&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance version() should merge options from constructor&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:3,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ atvremotePath: &#x27;test&#x27; });\n yield i.version({\n spawn: createFakeSpawn(cp =&gt; {\n assert.strictEqual(cp.cmd(), &#x27;test&#x27;);\n cp.code(1).end();\n })\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;62708bc4-039f-42ab-b4aa-f169796f57e1&quot;,&quot;parentUUID&quot;:&quot;e1a3b08b-c896-46df-8873-3fc31c978d80&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;62708bc4-039f-42ab-b4aa-f169796f57e1&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:3,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;649fed75-8b07-43f8-a6aa-280ff03c6b94&quot;,&quot;title&quot;:&quot;check()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should merge options from constructor&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance check() should merge options from constructor&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:3,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ atvremotePath: &#x27;test&#x27; });\n yield assert.rejects(() =&gt; __awaiter(this, void 0, void 0, function* () {\n yield i.check({\n spawn: createFakeSpawn(cp =&gt; {\n assert.strictEqual(cp.cmd(), &#x27;test&#x27;);\n cp.error(new Error(&#x27;spawn atvremote ENOENT&#x27;)).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;fbb79db0-554e-4773-bc6d-8588026141be&quot;,&quot;parentUUID&quot;:&quot;649fed75-8b07-43f8-a6aa-280ff03c6b94&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;fbb79db0-554e-4773-bc6d-8588026141be&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:3,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;3de3ff8e-ef60-4c1f-acdb-d3cf9d49f14b&quot;,&quot;title&quot;:&quot;find()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should merge options from constructor&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance find() should merge options from constructor&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:2,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ atvscriptPath: &#x27;test&#x27; });\n yield i.find({\n spawn: createFakeSpawn(cp =&gt; {\n assert.strictEqual(cp.cmd(), &#x27;test&#x27;);\n cp.stdout({\n &#x27;result&#x27;: &#x27;success&#x27;,\n &#x27;datetime&#x27;: &#x27;2020-11-06T20:47:30.840022+01:00&#x27;,\n &#x27;devices&#x27;: []\n }).end();\n })\n });\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;e1da6aa5-53f1-4f56-915e-865cda4274ba&quot;,&quot;parentUUID&quot;:&quot;3de3ff8e-ef60-4c1f-acdb-d3cf9d49f14b&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;e1da6aa5-53f1-4f56-915e-865cda4274ba&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:2,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;ca014a38-1b16-4a35-8fc3-f1f8e98c5b77&quot;,&quot;title&quot;:&quot;device()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should merge options from constructor&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance device() should merge options from constructor&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const i = new NodePyATVInstance({ debug: true });\n const d = i.device({ name: &#x27;My Testdevice&#x27;, host: &#x27;192.168.178.2&#x27; });\n assert.deepStrictEqual(d.debug, true);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;06c390cf-52a3-416c-9d51-50d86e79e34d&quot;,&quot;parentUUID&quot;:&quot;ca014a38-1b16-4a35-8fc3-f1f8e98c5b77&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;06c390cf-52a3-416c-9d51-50d86e79e34d&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;0cd9de03-7c09-42df-9cb9-cd1f8abdaef9&quot;,&quot;title&quot;:&quot;Type Exports&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/instance.ts&quot;,&quot;file&quot;:&quot;/test/instance.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;Type NodePyATVProtocol should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVProtocol should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVProtocol);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;a7eb2544-f252-454a-a16a-1dafdb13548a&quot;,&quot;parentUUID&quot;:&quot;0cd9de03-7c09-42df-9cb9-cd1f8abdaef9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVMediaType should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVMediaType should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVMediaType);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;dbedc117-3040-46b0-9964-536b3060c54b&quot;,&quot;parentUUID&quot;:&quot;0cd9de03-7c09-42df-9cb9-cd1f8abdaef9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVDeviceEvent should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVDeviceEvent should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVDeviceEvent);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;6157173a-1d31-42f0-b931-5f8070d28ebf&quot;,&quot;parentUUID&quot;:&quot;0cd9de03-7c09-42df-9cb9-cd1f8abdaef9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVDeviceState should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVDeviceState should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVDeviceState);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;a5a68e7b-9efe-4c60-87b9-3415182bd106&quot;,&quot;parentUUID&quot;:&quot;0cd9de03-7c09-42df-9cb9-cd1f8abdaef9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVRepeatState should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVRepeatState should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVRepeatState);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;036c0505-bed6-4ccb-870c-29c13beea26c&quot;,&quot;parentUUID&quot;:&quot;0cd9de03-7c09-42df-9cb9-cd1f8abdaef9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVShuffleState should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVShuffleState should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVShuffleState);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;79ad0c94-770a-4fcf-96b2-d7250de6d888&quot;,&quot;parentUUID&quot;:&quot;0cd9de03-7c09-42df-9cb9-cd1f8abdaef9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVKeys should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVKeys should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVKeys);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;6b1ea1a3-bb18-4f75-aac7-134e1300daec&quot;,&quot;parentUUID&quot;:&quot;0cd9de03-7c09-42df-9cb9-cd1f8abdaef9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVInstanceOptions should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVInstanceOptions should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVListenerState);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;86f6f956-ee7b-4e64-a44e-555315018036&quot;,&quot;parentUUID&quot;:&quot;0cd9de03-7c09-42df-9cb9-cd1f8abdaef9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;Type NodePyATVPowerState should be exported&quot;,&quot;fullTitle&quot;:&quot;NodePyATVInstance Type Exports Type NodePyATVPowerState should be exported&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;assert.ok(NodePyATVPowerState);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;a3f8ec54-2fb9-4eb9-91d9-45838ac47a16&quot;,&quot;parentUUID&quot;:&quot;0cd9de03-7c09-42df-9cb9-cd1f8abdaef9&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;a7eb2544-f252-454a-a16a-1dafdb13548a&quot;,&quot;dbedc117-3040-46b0-9964-536b3060c54b&quot;,&quot;6157173a-1d31-42f0-b931-5f8070d28ebf&quot;,&quot;a5a68e7b-9efe-4c60-87b9-3415182bd106&quot;,&quot;036c0505-bed6-4ccb-870c-29c13beea26c&quot;,&quot;79ad0c94-770a-4fcf-96b2-d7250de6d888&quot;,&quot;6b1ea1a3-bb18-4f75-aac7-134e1300daec&quot;,&quot;86f6f956-ee7b-4e64-a44e-555315018036&quot;,&quot;a3f8ec54-2fb9-4eb9-91d9-45838ac47a16&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000}],&quot;passes&quot;:[],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;cca0cbb9-f6d5-4493-a9db-3a733920682b&quot;,&quot;title&quot;:&quot;Tools&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/tools.ts&quot;,&quot;file&quot;:&quot;/test/tools.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[],&quot;suites&quot;:[{&quot;uuid&quot;:&quot;f2b04030-2c8a-4f4f-bf89-9f94b3ab3589&quot;,&quot;title&quot;:&quot;addRequestId() / removeRequestId()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/tools.ts&quot;,&quot;file&quot;:&quot;/test/tools.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should return a string&quot;,&quot;fullTitle&quot;:&quot;Tools addRequestId() / removeRequestId() should return a string&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const id = addRequestId();\nassert.strictEqual(typeof id, &#x27;string&#x27;);\nremoveRequestId(id);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;477e9919-a07b-4131-8678-ba2efa202e33&quot;,&quot;parentUUID&quot;:&quot;f2b04030-2c8a-4f4f-bf89-9f94b3ab3589&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work if given id is not in index&quot;,&quot;fullTitle&quot;:&quot;Tools addRequestId() / removeRequestId() should work if given id is not in index&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;removeRequestId(&#x27;FOO&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5789943a-485b-4a6b-adc4-f459a1559ae8&quot;,&quot;parentUUID&quot;:&quot;f2b04030-2c8a-4f4f-bf89-9f94b3ab3589&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;477e9919-a07b-4131-8678-ba2efa202e33&quot;,&quot;5789943a-485b-4a6b-adc4-f459a1559ae8&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;d1dcd32a-a700-4b0c-be17-7d8e94cd0921&quot;,&quot;title&quot;:&quot;debug()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/tools.ts&quot;,&quot;file&quot;:&quot;/test/tools.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work without any options&quot;,&quot;fullTitle&quot;:&quot;Tools debug() should work without any options&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;debug(&#x27;TEST&#x27;, &#x27;Hello World.&#x27;, {});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;09fbe5f8-29ef-45fb-8f67-6cc8c3ac43c2&quot;,&quot;parentUUID&quot;:&quot;d1dcd32a-a700-4b0c-be17-7d8e94cd0921&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with default logger&quot;,&quot;fullTitle&quot;:&quot;Tools debug() should work with default logger&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;debug(&#x27;TEST&#x27;, &#x27;Hello World.&#x27;, { debug: true });&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;3629c2b6-d523-4f49-bfbb-e9091d9612b4&quot;,&quot;parentUUID&quot;:&quot;d1dcd32a-a700-4b0c-be17-7d8e94cd0921&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with custom logger&quot;,&quot;fullTitle&quot;:&quot;Tools debug() should work with custom logger&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;debug(&#x27;TEST&#x27;, &#x27;Hello World.&#x27;, {\n debug: function (msg) {\n assert.strictEqual(this, null);\n assert.ok(msg.includes(&#x27;Hello World&#x27;));\n }\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;adf9ad7d-a9d7-425c-abde-afa92ca57787&quot;,&quot;parentUUID&quot;:&quot;d1dcd32a-a700-4b0c-be17-7d8e94cd0921&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with colors disabled&quot;,&quot;fullTitle&quot;:&quot;Tools debug() should work with colors disabled&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;debug(&#x27;TEST&#x27;, &#x27;Hello World.&#x27;, { noColors: true });&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;9543607c-1b9d-4d1c-9b3c-24d3ffcb6825&quot;,&quot;parentUUID&quot;:&quot;d1dcd32a-a700-4b0c-be17-7d8e94cd0921&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with custom logger and colors disabled&quot;,&quot;fullTitle&quot;:&quot;Tools debug() should work with custom logger and colors disabled&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;debug(&#x27;TEST&#x27;, &#x27;Hello World.&#x27;, {\n noColors: true,\n debug: function (msg) {\n assert.strictEqual(this, null);\n assert.strictEqual(msg, &#x27;[node-pyatv][TEST] Hello World.&#x27;);\n }\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;6449ba2a-5b03-44f8-92de-0b122a86d782&quot;,&quot;parentUUID&quot;:&quot;d1dcd32a-a700-4b0c-be17-7d8e94cd0921&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;09fbe5f8-29ef-45fb-8f67-6cc8c3ac43c2&quot;,&quot;3629c2b6-d523-4f49-bfbb-e9091d9612b4&quot;,&quot;adf9ad7d-a9d7-425c-abde-afa92ca57787&quot;,&quot;9543607c-1b9d-4d1c-9b3c-24d3ffcb6825&quot;,&quot;6449ba2a-5b03-44f8-92de-0b122a86d782&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;2a650bd9-bcda-433d-ab45-e6c7312d64c1&quot;,&quot;title&quot;:&quot;getExecutable()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/tools.ts&quot;,&quot;file&quot;:&quot;/test/tools.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should handle atvremotePath if set&quot;,&quot;fullTitle&quot;:&quot;Tools getExecutable() should handle atvremotePath if set&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const result = getExecutable(NodePyATVExecutableType.atvremote, {\n atvremotePath: &#x27;/tmp/1&#x27;,\n atvscriptPath: &#x27;/tmp/2&#x27;\n});\nassert.strictEqual(result, &#x27;/tmp/1&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;63058f8c-b1f6-4919-bdfd-8527802db1cf&quot;,&quot;parentUUID&quot;:&quot;2a650bd9-bcda-433d-ab45-e6c7312d64c1&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should handle atvscriptPath if set&quot;,&quot;fullTitle&quot;:&quot;Tools getExecutable() should handle atvscriptPath if set&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const result = getExecutable(NodePyATVExecutableType.atvscript, {\n atvremotePath: &#x27;/tmp/1&#x27;,\n atvscriptPath: &#x27;/tmp/2&#x27;\n});\nassert.strictEqual(result, &#x27;/tmp/2&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;ce4b58be-bffe-46a5-b794-71d791b0b9c4&quot;,&quot;parentUUID&quot;:&quot;2a650bd9-bcda-433d-ab45-e6c7312d64c1&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should handle default for atvremote&quot;,&quot;fullTitle&quot;:&quot;Tools getExecutable() should handle default for atvremote&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const result = getExecutable(NodePyATVExecutableType.atvremote, {\n atvscriptPath: &#x27;/tmp&#x27;\n});\nassert.strictEqual(result, &#x27;atvremote&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;d759f932-93c8-4a6c-87c0-6386a438ff59&quot;,&quot;parentUUID&quot;:&quot;2a650bd9-bcda-433d-ab45-e6c7312d64c1&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should handle default for atvscript&quot;,&quot;fullTitle&quot;:&quot;Tools getExecutable() should handle default for atvscript&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const result = getExecutable(NodePyATVExecutableType.atvscript, {\n atvremotePath: &#x27;/tmp&#x27;\n});\nassert.strictEqual(result, &#x27;atvscript&#x27;);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;5f010c0a-aab1-4974-9e5b-a47eb431fa36&quot;,&quot;parentUUID&quot;:&quot;2a650bd9-bcda-433d-ab45-e6c7312d64c1&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;63058f8c-b1f6-4919-bdfd-8527802db1cf&quot;,&quot;ce4b58be-bffe-46a5-b794-71d791b0b9c4&quot;,&quot;d759f932-93c8-4a6c-87c0-6386a438ff59&quot;,&quot;5f010c0a-aab1-4974-9e5b-a47eb431fa36&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;fe8592d8-a0a7-4e40-9071-f9a7067999fd&quot;,&quot;title&quot;:&quot;getParameters()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/tools.ts&quot;,&quot;file&quot;:&quot;/test/tools.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;empty case&quot;,&quot;fullTitle&quot;:&quot;Tools getParameters() empty case&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield getParamters();\n assert.deepEqual(result, []);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;54f911a0-a497-4033-8a6e-1abf84916155&quot;,&quot;parentUUID&quot;:&quot;fe8592d8-a0a7-4e40-9071-f9a7067999fd&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;easy case&quot;,&quot;fullTitle&quot;:&quot;Tools getParameters() easy case&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield getParamters({\n host: &#x27;192.168.178.2&#x27;\n });\n assert.deepEqual(result, [&#x27;-s&#x27;, &#x27;192.168.178.2&#x27;]);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;13ffd5d4-f0f3-45e9-8435-cdf7d95c8848&quot;,&quot;parentUUID&quot;:&quot;fe8592d8-a0a7-4e40-9071-f9a7067999fd&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;full case&quot;,&quot;fullTitle&quot;:&quot;Tools getParameters() full case&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:1,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;return __awaiter(this, void 0, void 0, function* () {\n const result = yield getParamters({\n hosts: [&#x27;192.168.178.2&#x27;, &#x27;192.168.178.3&#x27;],\n id: &#x27;****&#x27;,\n protocol: NodePyATVProtocol.mrp,\n dmapCredentials: &#x27;****&#x27;,\n mrpCredentials: &#x27;****&#x27;,\n airplayCredentials: &#x27;****&#x27;,\n companionCredentials: &#x27;1234&#x27;,\n raopCredentials: &#x27;::foo:&#x27;\n });\n assert.deepEqual(result, [\n &#x27;-s&#x27;, &#x27;192.168.178.2,192.168.178.3&#x27;,\n &#x27;-i&#x27;, &#x27;****&#x27;,\n &#x27;--protocol&#x27;, &#x27;mrp&#x27;,\n &#x27;--dmap-credentials&#x27;, &#x27;****&#x27;,\n &#x27;--mrp-credentials&#x27;, &#x27;****&#x27;,\n &#x27;--airplay-credentials&#x27;, &#x27;****&#x27;,\n &#x27;--companion-credentials&#x27;, &#x27;1234&#x27;,\n &#x27;--raop-credentials&#x27;, &#x27;::foo:&#x27;\n ]);\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;4e357873-fcd8-4e01-96ee-e8c56748042b&quot;,&quot;parentUUID&quot;:&quot;fe8592d8-a0a7-4e40-9071-f9a7067999fd&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;54f911a0-a497-4033-8a6e-1abf84916155&quot;,&quot;13ffd5d4-f0f3-45e9-8435-cdf7d95c8848&quot;,&quot;4e357873-fcd8-4e01-96ee-e8c56748042b&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:1,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000},{&quot;uuid&quot;:&quot;3d3c577e-e5be-4123-9c60-817f7ca327f2&quot;,&quot;title&quot;:&quot;parseState()&quot;,&quot;fullFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/test/tools.ts&quot;,&quot;file&quot;:&quot;/test/tools.ts&quot;,&quot;beforeHooks&quot;:[],&quot;afterHooks&quot;:[],&quot;tests&quot;:[{&quot;title&quot;:&quot;should work with empty data&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should work with empty data&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const input = {};\nconst result = parseState(input, &#x27;&#x27;, {});\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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;732c36c3-7e26-434a-80a8-0540b384ebb2&quot;,&quot;parentUUID&quot;:&quot;3d3c577e-e5be-4123-9c60-817f7ca327f2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work without data&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should work without data&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;// @ts-ignore\nconst result = parseState(null, &#x27;&#x27;, {});\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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;bdb38e4c-42cb-484d-9eb4-faf83a9d7f29&quot;,&quot;parentUUID&quot;:&quot;3d3c577e-e5be-4123-9c60-817f7ca327f2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should work with example data&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should work with example data&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const input = {\n result: &#x27;success&#x27;,\n datetime: &#x27;2020-11-07T22:38:43.608030+01:00&#x27;,\n hash: &#x27;100e0ab6-6ff5-4199-9c04-a7107ff78712&#x27;,\n media_type: &#x27;video&#x27;,\n device_state: &#x27;playing&#x27;,\n title: &#x27;Solo: A Star Wars Story&#x27;,\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: &#x27;off&#x27;,\n repeat: &#x27;off&#x27;,\n app: &#x27;Disney+&#x27;,\n app_id: &#x27;com.disney.disneyplus&#x27;,\n powerState: null\n};\nconst result = parseState(input, &#x27;&#x27;, {});\nassert.deepStrictEqual(result, {\n dateTime: new Date(&#x27;2020-11-07T22:38:43.608030+01:00&#x27;),\n hash: &#x27;100e0ab6-6ff5-4199-9c04-a7107ff78712&#x27;,\n mediaType: NodePyATVMediaType.video,\n deviceState: NodePyATVDeviceState.playing,\n title: &#x27;Solo: A Star Wars Story&#x27;,\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: &#x27;Disney+&#x27;,\n appId: &#x27;com.disney.disneyplus&#x27;,\n powerState: null\n});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;dc55a61c-8b36-443c-8898-08e60eb0fbf8&quot;,&quot;parentUUID&quot;:&quot;3d3c577e-e5be-4123-9c60-817f7ca327f2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should throw an error for pyatv exceptions&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should throw an error for pyatv exceptions&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const input = {\n result: &#x27;failure&#x27;,\n datetime: &#x27;2021-11-24T21:13:36.424576+03:00&#x27;,\n exception: &#x27;invalid credentials: 321&#x27;,\n stacktrace: &#x27;Traceback (most recent call last):\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\&quot;, line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\&quot;, line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\&quot;, line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\&quot;, line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\&quot;, line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\&quot;/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\&quot;, line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\&quot;invalid credentials: \\\&quot; + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n&#x27;\n};\nassert.throws(() =&gt; {\n parseState(input, &#x27;&#x27;, {});\n}, /Got pyatv Error: invalid credentials: 321/);&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;ed8623f8-9512-4bbd-8384-892713671092&quot;,&quot;parentUUID&quot;:&quot;3d3c577e-e5be-4123-9c60-817f7ca327f2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should ignore date if it&#x27;s an invalid date&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should ignore date if it&#x27;s an invalid date&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const input = { datetime: &#x27;today&#x27; };\nconst result = parseState(input, &#x27;&#x27;, {});\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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;61f1bedf-d262-4834-b099-5f44e455d802&quot;,&quot;parentUUID&quot;:&quot;3d3c577e-e5be-4123-9c60-817f7ca327f2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should ignore data if unsupported type&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should ignore data if unsupported type&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const input = {\n result: &#x27;success&#x27;,\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: &#x27;23min&#x27;,\n position: &#x27;0:30.123&#x27;,\n shuffle: false,\n repeat: true,\n app: 0,\n app_id: 891645381647289,\n powerState: null\n};\nconst result = parseState(input, &#x27;&#x27;, {});\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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;eafaeb02-6a6b-4b17-87c0-38f68ba35727&quot;,&quot;parentUUID&quot;:&quot;3d3c577e-e5be-4123-9c60-817f7ca327f2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false},{&quot;title&quot;:&quot;should ignore enums with unsupported valid&quot;,&quot;fullTitle&quot;:&quot;Tools parseState() should ignore enums with unsupported valid&quot;,&quot;timedOut&quot;:false,&quot;duration&quot;:0,&quot;state&quot;:&quot;passed&quot;,&quot;speed&quot;:&quot;fast&quot;,&quot;pass&quot;:true,&quot;fail&quot;:false,&quot;pending&quot;:false,&quot;code&quot;:&quot;const input = {\n media_type: &#x27;3d-experience&#x27;,\n device_state: &#x27;initiating&#x27;,\n shuffle: &#x27;everything&#x27;,\n repeat: &#x27;nothing&#x27;\n};\nconst result = parseState(input, &#x27;&#x27;, {});\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});&quot;,&quot;err&quot;:{},&quot;uuid&quot;:&quot;365697b5-47f4-4639-8ae3-1f8b2ae21e61&quot;,&quot;parentUUID&quot;:&quot;3d3c577e-e5be-4123-9c60-817f7ca327f2&quot;,&quot;isHook&quot;:false,&quot;skipped&quot;:false}],&quot;suites&quot;:[],&quot;passes&quot;:[&quot;732c36c3-7e26-434a-80a8-0540b384ebb2&quot;,&quot;bdb38e4c-42cb-484d-9eb4-faf83a9d7f29&quot;,&quot;dc55a61c-8b36-443c-8898-08e60eb0fbf8&quot;,&quot;ed8623f8-9512-4bbd-8384-892713671092&quot;,&quot;61f1bedf-d262-4834-b099-5f44e455d802&quot;,&quot;eafaeb02-6a6b-4b17-87c0-38f68ba35727&quot;,&quot;365697b5-47f4-4639-8ae3-1f8b2ae21e61&quot;],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000}],&quot;passes&quot;:[],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:false,&quot;rootEmpty&quot;:false,&quot;_timeout&quot;:2000}],&quot;passes&quot;:[],&quot;failures&quot;:[],&quot;pending&quot;:[],&quot;skipped&quot;:[],&quot;duration&quot;:0,&quot;root&quot;:true,&quot;rootEmpty&quot;:true,&quot;_timeout&quot;:2000}],&quot;meta&quot;:{&quot;mocha&quot;:{&quot;version&quot;:&quot;10.1.0&quot;},&quot;mochawesome&quot;:{&quot;options&quot;:{&quot;quiet&quot;:false,&quot;reportFilename&quot;:&quot;mochawesome&quot;,&quot;saveHtml&quot;:true,&quot;saveJson&quot;:true,&quot;consoleReporter&quot;:&quot;spec&quot;,&quot;useInlineDiffs&quot;:false,&quot;code&quot;:true},&quot;version&quot;:&quot;7.1.3&quot;},&quot;marge&quot;:{&quot;version&quot;:&quot;6.2.0&quot;}}}" data-config="{&quot;reportFilename&quot;:&quot;mochawesome&quot;,&quot;reportDir&quot;:&quot;mochawesome-report&quot;,&quot;reportTitle&quot;:&quot;node-pyatv&quot;,&quot;reportPageTitle&quot;:&quot;Mochawesome Report&quot;,&quot;inline&quot;:false,&quot;inlineAssets&quot;:false,&quot;cdn&quot;:false,&quot;charts&quot;:false,&quot;enableCharts&quot;:false,&quot;code&quot;:true,&quot;enableCode&quot;:true,&quot;autoOpen&quot;:false,&quot;overwrite&quot;:true,&quot;timestamp&quot;:false,&quot;ts&quot;:false,&quot;showPassed&quot;:true,&quot;showFailed&quot;:true,&quot;showPending&quot;:true,&quot;showSkipped&quot;:false,&quot;showHooks&quot;:&quot;failed&quot;,&quot;saveJson&quot;:true,&quot;saveHtml&quot;:true,&quot;dev&quot;:false,&quot;assetsDir&quot;:&quot;mochawesome-report/assets&quot;,&quot;jsonFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/mochawesome-report/mochawesome.json&quot;,&quot;htmlFile&quot;:&quot;/home/runner/work/node-pyatv/node-pyatv/mochawesome-report/mochawesome.html&quot;}"><div id="report"></div><script src="assets/app.js"></script></body></html>