@sebbo2002/node-pyatv 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/lib/device-event.d.ts +1 -1
- package/dist/lib/device-events.d.ts +1 -2
- package/dist/lib/device-events.js +9 -7
- package/dist/lib/device-events.js.map +1 -1
- package/dist/lib/device.d.ts +1 -1
- package/dist/lib/device.js +12 -11
- package/dist/lib/device.js.map +1 -1
- package/dist/lib/index.d.ts +3 -1
- package/dist/lib/index.js +7 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/instance.d.ts +1 -1
- package/dist/lib/instance.js +2 -2
- package/dist/lib/instance.js.map +1 -1
- package/dist/lib/tools.js +7 -0
- package/dist/lib/tools.js.map +1 -1
- package/dist/lib/types.d.ts +1 -0
- package/docs/coverage/cobertura-coverage.xml +665 -633
- package/docs/coverage/device-event.ts.html +2 -2
- package/docs/coverage/device-events.ts.html +99 -87
- package/docs/coverage/device.ts.html +38 -26
- package/docs/coverage/fake-spawn.ts.html +25 -25
- package/docs/coverage/index.html +29 -29
- package/docs/coverage/index.ts.html +22 -7
- package/docs/coverage/instance.ts.html +2 -2
- package/docs/coverage/tools.ts.html +133 -109
- package/docs/coverage/types.ts.html +5 -2
- package/docs/reference/assets/main.js +1 -1
- package/docs/reference/assets/search.js +1 -1
- package/docs/reference/assets/style.css +4 -0
- package/docs/reference/classes/NodePyATVDevice.html +147 -0
- package/docs/reference/classes/NodePyATVDeviceEvent.html +6 -6
- package/docs/reference/classes/default.html +15 -15
- package/docs/reference/enums/NodePyATVDeviceState.html +1 -1
- package/docs/reference/enums/NodePyATVKeys.html +1 -1
- package/docs/reference/enums/NodePyATVListenerState.html +1 -0
- package/docs/reference/enums/NodePyATVMediaType.html +1 -1
- package/docs/reference/enums/NodePyATVPowerState.html +1 -0
- package/docs/reference/enums/NodePyATVProtocol.html +1 -1
- package/docs/reference/enums/NodePyATVRepeatState.html +1 -1
- package/docs/reference/enums/NodePyATVShuffleState.html +1 -1
- package/docs/reference/index.html +2 -2
- package/docs/reference/interfaces/NodePyATVDeviceOptions.html +1 -1
- package/docs/reference/interfaces/NodePyATVFindAndInstanceOptions.html +1 -1
- package/docs/reference/interfaces/NodePyATVFindOptions.html +1 -1
- package/docs/reference/interfaces/NodePyATVGetStateOptions.html +1 -1
- package/docs/reference/interfaces/NodePyATVInstanceOptions.html +1 -1
- package/docs/reference/interfaces/NodePyATVState.html +1 -1
- package/docs/reference/interfaces/NodePyATVVersionResponse.html +1 -1
- package/docs/reference/modules.html +1 -1
- package/docs/tests/assets/app.css +1 -1
- package/docs/tests/assets/app.js +2 -2
- package/docs/tests/assets/app.js.LICENSE.txt +1 -1
- package/docs/tests/index.html +1 -1
- package/docs/tests/mochawesome.json +711 -616
- package/package.json +18 -18
- package/src/lib/device-event.ts +1 -1
- package/src/lib/device-events.ts +8 -4
- package/src/lib/device.ts +12 -8
- package/src/lib/index.ts +6 -1
- package/src/lib/instance.ts +1 -1
- package/src/lib/tools.ts +8 -0
- package/src/lib/types.ts +1 -0
- package/test/device-events.ts +24 -3
- package/test/device.ts +18 -0
- package/test/instance.ts +9 -1
- package/test/tools.ts +15 -4
- package/typedoc.json +1 -1
package/docs/tests/index.html
CHANGED
|
@@ -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="{"stats":{"suites":82,"tests":136,"passes":134,"pending":2,"failures":0,"start":"2021-10-09T19:25:50.868Z","end":"2021-10-09T19:26:02.680Z","duration":11812,"testsRegistered":136,"passPercent":100,"pendingPercent":1.4705882352941175,"other":0,"hasOther":false,"skipped":0,"hasSkipped":false},"results":[{"uuid":"e4e1b6bb-dd3a-46e2-b34a-c7e17e122847","title":"","fullFile":"","file":"","beforeHooks":[],"afterHooks":[],"tests":[],"suites":[{"uuid":"0373ac2a-fd66-4185-9476-91e9b0d3a7a7","title":"NodePyATVDeviceEvent","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts","file":"/test/device-event.ts","beforeHooks":[],"afterHooks":[],"tests":[],"suites":[{"uuid":"87ec5a84-4e1d-48e3-8c43-243ece34325e","title":"get key()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts","file":"/test/device-event.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvent get key() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.key, 'genre');","err":{},"uuid":"e5864ff8-89eb-4c2c-b909-fa5c697a763b","parentUUID":"87ec5a84-4e1d-48e3-8c43-243ece34325e","isHook":false,"skipped":false}],"suites":[],"passes":["e5864ff8-89eb-4c2c-b909-fa5c697a763b"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"b95f4769-3594-48ce-bc9c-fc346898972e","title":"get oldValue()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts","file":"/test/device-event.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvent get oldValue() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.oldValue, 'Jazz');","err":{},"uuid":"772e2a52-81ab-4873-afe9-546695541dff","parentUUID":"b95f4769-3594-48ce-bc9c-fc346898972e","isHook":false,"skipped":false}],"suites":[],"passes":["772e2a52-81ab-4873-afe9-546695541dff"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"9515ca2a-1872-46e7-9915-74fec5eef437","title":"get newValue()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts","file":"/test/device-event.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvent get newValue() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.newValue, 'Rock');","err":{},"uuid":"25abdbbe-c30a-41f3-af4e-2aace1ae4d18","parentUUID":"9515ca2a-1872-46e7-9915-74fec5eef437","isHook":false,"skipped":false}],"suites":[],"passes":["25abdbbe-c30a-41f3-af4e-2aace1ae4d18"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"7d16b937-5c25-461d-9a97-db76709a9351","title":"get value()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts","file":"/test/device-event.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvent get value() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.value, 'Rock');","err":{},"uuid":"e3e02f0f-e924-49b9-bc5d-19a1a1d0b595","parentUUID":"7d16b937-5c25-461d-9a97-db76709a9351","isHook":false,"skipped":false}],"suites":[],"passes":["e3e02f0f-e924-49b9-bc5d-19a1a1d0b595"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"b3756fc1-73f2-4883-b07e-97009002dc35","title":"get device()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts","file":"/test/device-event.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvent get device() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n});\nconst event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device\n});\nassert_1.default.deepEqual(event.device, device);","err":{},"uuid":"36b79503-4acb-4001-8d3b-5898b605da67","parentUUID":"b3756fc1-73f2-4883-b07e-97009002dc35","isHook":false,"skipped":false}],"suites":[],"passes":["36b79503-4acb-4001-8d3b-5898b605da67"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000}],"passes":[],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"76aca1ff-2c77-4e09-8106-9ee0c31ff666","title":"NodePyATVDeviceEvents","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[],"suites":[{"uuid":"bb327a8e-26c7-4411-8abd-c347b41668dd","title":"applyStateAndEmitEvents()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should emit update:key event","fullTitle":"NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update:key event","timedOut":false,"duration":4,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:title', event => {\n assert_1.default.ok(event instanceof device_event_1.default);\n assert_1.default.strictEqual(event.key, 'title');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'My Movie');\n assert_1.default.strictEqual(event.value, 'My Movie');\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});","err":{},"uuid":"c89cf15a-d5e5-46c1-971e-5b28354c87b3","parentUUID":"bb327a8e-26c7-4411-8abd-c347b41668dd","isHook":false,"skipped":false},{"title":"should emit update event","fullTitle":"NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update event","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update', event => {\n assert_1.default.ok(event instanceof device_event_1.default);\n assert_1.default.strictEqual(event.key, 'title');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'My Movie');\n assert_1.default.strictEqual(event.value, 'My Movie');\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});","err":{},"uuid":"09286462-0f7e-4e1f-820b-abe506a23b72","parentUUID":"bb327a8e-26c7-4411-8abd-c347b41668dd","isHook":false,"skipped":false},{"title":"should emit update:key event before update","fullTitle":"NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update:key event before update","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const sort = [];\n yield Promise.race([\n new Promise(cb => {\n device.once('update', () => {\n sort.push('update');\n cb(undefined);\n });\n }),\n new Promise(cb => {\n device.once('update:title', () => {\n sort.push('update:title');\n cb(undefined);\n });\n })\n ]);\n assert_1.default.deepStrictEqual(sort, ['update:title', 'update']);\n});","err":{},"uuid":"2e181117-6218-4560-9cd6-ed8e16676778","parentUUID":"bb327a8e-26c7-4411-8abd-c347b41668dd","isHook":false,"skipped":false},{"title":"should not emit an update if new value is same as old one","fullTitle":"NodePyATVDeviceEvents applyStateAndEmitEvents() should not emit an update if new value is same as old one","timedOut":false,"duration":3,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n let spawnCounter = 0;\n let eventCounter = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n if (spawnCounter === 0) {\n cp.onStdIn(() => cp.end());\n }\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n spawnCounter++;\n if (spawnCounter >= 2) {\n cp.end();\n }\n })\n });\n const listener = () => {\n eventCounter++;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n yield device.getState();\n device.off('update', listener);\n assert_1.default.strictEqual(spawnCounter, 2);\n assert_1.default.strictEqual(eventCounter, 1);\n});","err":{},"uuid":"8a7205f1-e2dd-452c-8136-7391b842f1d6","parentUUID":"bb327a8e-26c7-4411-8abd-c347b41668dd","isHook":false,"skipped":false},{"title":"should emit error event if event listener throws an exception","fullTitle":"NodePyATVDeviceEvents applyStateAndEmitEvents() should emit error event if event listener throws an exception","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n let callCounter = 0;\n const error = new Error('This is an error. Be nice.');\n device.once('error', err => {\n assert_1.default.strictEqual(err, error);\n callCounter++;\n });\n const listener = () => {\n throw error;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n device.off('update', listener);\n assert_1.default.strictEqual(callCounter, 1);\n});","err":{},"uuid":"b825ae72-1da3-49d0-aa3d-dea13d77d803","parentUUID":"bb327a8e-26c7-4411-8abd-c347b41668dd","isHook":false,"skipped":false},{"title":"should also work with powerState","fullTitle":"NodePyATVDeviceEvents applyStateAndEmitEvents() should also work with powerState","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n datetime: new Date().toJSON(),\n power_state: 'off'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:powerState', event => {\n assert_1.default.ok(event instanceof device_event_1.default);\n assert_1.default.strictEqual(event.key, 'powerState');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'off');\n assert_1.default.strictEqual(event.newValue, types_1.NodePyATVPowerState.off);\n assert_1.default.strictEqual(event.value, 'off');\n assert_1.default.strictEqual(event.value, types_1.NodePyATVPowerState.off);\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});","err":{},"uuid":"c560c6d0-183f-46cb-972d-c46783cdcbbd","parentUUID":"bb327a8e-26c7-4411-8abd-c347b41668dd","isHook":false,"skipped":false}],"suites":[],"passes":["c89cf15a-d5e5-46c1-971e-5b28354c87b3","09286462-0f7e-4e1f-820b-abe506a23b72","2e181117-6218-4560-9cd6-ed8e16676778","8a7205f1-e2dd-452c-8136-7391b842f1d6","b825ae72-1da3-49d0-aa3d-dea13d77d803","c560c6d0-183f-46cb-972d-c46783cdcbbd"],"failures":[],"pending":[],"skipped":[],"duration":14,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"69b0cc3d-12c8-40ba-a825-a13efe77d2e9","title":"start|stopListening()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should emit error if spawn fails","fullTitle":"NodePyATVDeviceEvents start|stopListening() should emit error if spawn fails","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const error = new Error();\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(error).end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.strictEqual(err, error);\n cb(undefined);\n });\n });\n device.off('update', listener);\n});","err":{},"uuid":"c46ccb30-e5f0-4814-8ad0-f86b35ede001","parentUUID":"69b0cc3d-12c8-40ba-a825-a13efe77d2e9","isHook":false,"skipped":false},{"title":"should emit error on stderr data","fullTitle":"NodePyATVDeviceEvents start|stopListening() should emit error on stderr data","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stderr('Hello World!').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.ok(err instanceof Error);\n assert_1.default.ok(err.toString().includes('Got stderr output from pyatv: Hello World!'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});","err":{},"uuid":"66228cfc-6063-4be5-8f90-d150ec0959ae","parentUUID":"69b0cc3d-12c8-40ba-a825-a13efe77d2e9","isHook":false,"skipped":false},{"title":"should emit error if stdout is not valid json","fullTitle":"NodePyATVDeviceEvents start|stopListening() should emit error if stdout is not valid json","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('#').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.ok(err instanceof Error);\n assert_1.default.ok(err.toString().includes('Unable to parse stdout json: SyntaxError: ' +\n 'Unexpected token # in JSON at position 0'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});","err":{},"uuid":"dbe872ed-44a4-4665-b796-5372b678722d","parentUUID":"69b0cc3d-12c8-40ba-a825-a13efe77d2e9","isHook":false,"skipped":false},{"title":"should restart the process if it gets killed","fullTitle":"NodePyATVDeviceEvents start|stopListening() should restart the process if it gets killed","timedOut":false,"duration":0,"state":"pending","pass":false,"fail":false,"pending":true,"code":"","err":{},"uuid":"3521049e-3de0-44b8-bcb0-81de1b57c6eb","parentUUID":"69b0cc3d-12c8-40ba-a825-a13efe77d2e9","isHook":false,"skipped":false}],"suites":[],"passes":["c46ccb30-e5f0-4814-8ad0-f86b35ede001","66228cfc-6063-4be5-8f90-d150ec0959ae","dbe872ed-44a4-4665-b796-5372b678722d"],"failures":[],"pending":["3521049e-3de0-44b8-bcb0-81de1b57c6eb"],"skipped":[],"duration":4,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"f9a981ab-0d3a-4155-be90-0aabbc44f831","title":"addListener() / removeAllListeners()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work without any exceptions","fullTitle":"NodePyATVDeviceEvents addListener() / removeAllListeners() should work without any exceptions","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n device.removeAllListeners('update');\n});","err":{},"uuid":"5eded13b-a2cd-4367-8c0d-855c7d9fc9b7","parentUUID":"f9a981ab-0d3a-4155-be90-0aabbc44f831","isHook":false,"skipped":false}],"suites":[],"passes":["5eded13b-a2cd-4367-8c0d-855c7d9fc9b7"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"2079cf11-c1dc-4fd8-9da0-8b92d164c989","title":"emit()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents emit() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst event = new device_event_1.default({\n key: 'dateTime',\n old: 'foo',\n new: 'bar',\n device\n});\nlet executions = 0;\ndevice.once('test', (e) => {\n executions++;\n assert_1.default.strictEqual(e, event);\n assert_1.default.strictEqual(executions, 1);\n done();\n});\ndevice.emit('test', event);","err":{},"uuid":"211427a7-0ca1-4aec-907a-9bbf4280021c","parentUUID":"2079cf11-c1dc-4fd8-9da0-8b92d164c989","isHook":false,"skipped":false}],"suites":[],"passes":["211427a7-0ca1-4aec-907a-9bbf4280021c"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"cc659022-27b6-4833-a48a-817462033536","title":"eventNames()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents eventNames() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.eventNames(), ['test']);\ndevice.off('test', listener);","err":{},"uuid":"55fe3add-159d-4135-bd5f-e3cf6035b82e","parentUUID":"cc659022-27b6-4833-a48a-817462033536","isHook":false,"skipped":false}],"suites":[],"passes":["55fe3add-159d-4135-bd5f-e3cf6035b82e"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"6c077650-808b-4ca5-8104-a14626d6c585","title":"getMaxListeners()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents getMaxListeners() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst result = device.getMaxListeners();\nassert_1.default.ok(typeof result, 'number');\nassert_1.default.ok(result >= 10);","err":{},"uuid":"b0090645-3acf-48f1-89d2-c785a15e6a19","parentUUID":"6c077650-808b-4ca5-8104-a14626d6c585","isHook":false,"skipped":false}],"suites":[],"passes":["b0090645-3acf-48f1-89d2-c785a15e6a19"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"99cdaf13-35f4-4404-b3ea-011fdf5b127e","title":"listenerCount()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents listenerCount() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.listenerCount('test'), 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.listenerCount('test'), 1);\ndevice.off('test', listener);","err":{},"uuid":"ea2e9bc3-9d7e-487b-9e64-960f9380b698","parentUUID":"99cdaf13-35f4-4404-b3ea-011fdf5b127e","isHook":false,"skipped":false}],"suites":[],"passes":["ea2e9bc3-9d7e-487b-9e64-960f9380b698"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"f6b199d5-6b7a-488a-b589-01888ccf32f2","title":"listeners()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents listeners() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.listeners('test').length, 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.listeners('test').length, 1);\nassert_1.default.deepStrictEqual(device.listeners('test')[0], listener);\ndevice.off('test', listener);","err":{},"uuid":"3bb8a812-36e7-4aac-82df-4f336b812ce1","parentUUID":"f6b199d5-6b7a-488a-b589-01888ccf32f2","isHook":false,"skipped":false}],"suites":[],"passes":["3bb8a812-36e7-4aac-82df-4f336b812ce1"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"5d47b072-1214-45c5-ac6b-153cb57833ef","title":"prependListener()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents prependListener() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\nconst listener = () => {\n device.removeAllListeners('update');\n done();\n};\ndevice.prependListener('update', listener);","err":{},"uuid":"9ce82b09-5c2f-41f6-92b1-a6bd108bb867","parentUUID":"5d47b072-1214-45c5-ac6b-153cb57833ef","isHook":false,"skipped":false}],"suites":[],"passes":["9ce82b09-5c2f-41f6-92b1-a6bd108bb867"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"e12b6975-9f78-4353-8f62-181155714dbe","title":"prependOnceListener()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents prependOnceListener() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\ndevice.prependOnceListener('update', () => done());","err":{},"uuid":"39c47e6a-2b0c-4e2a-8fbd-bcab8f87b342","parentUUID":"e12b6975-9f78-4353-8f62-181155714dbe","isHook":false,"skipped":false}],"suites":[],"passes":["39c47e6a-2b0c-4e2a-8fbd-bcab8f87b342"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"cd65c9d2-361e-4aa6-8f20-b72e05f1ffed","title":"rawListeners()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents rawListeners() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.rawListeners('test').length, 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.rawListeners('test').length, 1);\nassert_1.default.deepStrictEqual(device.rawListeners('test')[0], listener);\ndevice.off('test', listener);","err":{},"uuid":"08f14309-3683-4d4b-9c66-73bec998fa70","parentUUID":"cd65c9d2-361e-4aa6-8f20-b72e05f1ffed","isHook":false,"skipped":false}],"suites":[],"passes":["08f14309-3683-4d4b-9c66-73bec998fa70"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"eb72aa07-8f47-4892-b51f-0255714911fb","title":"removeListener()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work without any exceptions","fullTitle":"NodePyATVDeviceEvents removeListener() should work without any exceptions","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n assert_1.default.deepStrictEqual(device.listenerCount('update'), 1);\n device.removeListener('update', listener);\n assert_1.default.deepStrictEqual(device.listenerCount('update'), 0);\n});","err":{},"uuid":"f45eb54e-d994-414b-b1ae-f8e4806ad849","parentUUID":"eb72aa07-8f47-4892-b51f-0255714911fb","isHook":false,"skipped":false}],"suites":[],"passes":["f45eb54e-d994-414b-b1ae-f8e4806ad849"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000}],"passes":[],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"ccb75dee-dfc0-4ca1-a518-c3e3d60fc164","title":"NodePyATVDevice","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[],"suites":[{"uuid":"88c3bd44-3736-40a6-96c6-03c28261101a","title":"get name()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return the name","fullTitle":"NodePyATVDevice get name() should return the name","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.name, 'My Testdevice');","err":{},"uuid":"465dda47-6aec-4c31-b287-01200b084480","parentUUID":"88c3bd44-3736-40a6-96c6-03c28261101a","isHook":false,"skipped":false}],"suites":[],"passes":["465dda47-6aec-4c31-b287-01200b084480"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"eb175e72-da4e-41c9-913a-c9c0cc5cb090","title":"get host()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return the host","fullTitle":"NodePyATVDevice get host() should return the host","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.host, '192.168.178.2');","err":{},"uuid":"7e61972f-1583-439b-838d-c3bb28b9b5fb","parentUUID":"eb175e72-da4e-41c9-913a-c9c0cc5cb090","isHook":false,"skipped":false}],"suites":[],"passes":["7e61972f-1583-439b-838d-c3bb28b9b5fb"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"1fda9e5a-7d55-43b6-a64b-8f83a0562588","title":"get id()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return the id","fullTitle":"NodePyATVDevice get id() should return the id","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****'\n});\nassert_1.default.strictEqual(device.id, '*****');","err":{},"uuid":"4ef6ec85-d5e6-420d-bf90-7da3b1ba30c8","parentUUID":"1fda9e5a-7d55-43b6-a64b-8f83a0562588","isHook":false,"skipped":false}],"suites":[],"passes":["4ef6ec85-d5e6-420d-bf90-7da3b1ba30c8"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"dd422be6-2341-45c1-b787-8ce4b9845da8","title":"get protocol()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return the protocol","fullTitle":"NodePyATVDevice get protocol() should return the protocol","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n protocol: types_1.NodePyATVProtocol.airplay\n});\nassert_1.default.strictEqual(device.protocol, types_1.NodePyATVProtocol.airplay);","err":{},"uuid":"18b63500-f4ce-42a1-ab2b-914eb7e105a1","parentUUID":"dd422be6-2341-45c1-b787-8ce4b9845da8","isHook":false,"skipped":false}],"suites":[],"passes":["18b63500-f4ce-42a1-ab2b-914eb7e105a1"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"9b35701f-b004-4336-8005-0e70c0983588","title":"get debug()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return true if set to true","fullTitle":"NodePyATVDevice get debug() should return true if set to true","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);","err":{},"uuid":"d1573cb0-6bc0-40f4-bc3f-501bcce97006","parentUUID":"9b35701f-b004-4336-8005-0e70c0983588","isHook":false,"skipped":false},{"title":"should return fn if set to custom function","fullTitle":"NodePyATVDevice get debug() should return fn if set to custom function","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nconst device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: fn\n});\nassert_1.default.strictEqual(device.debug, fn);","err":{},"uuid":"b1c9d75d-ab6a-402c-b0f3-ec22d2959204","parentUUID":"9b35701f-b004-4336-8005-0e70c0983588","isHook":false,"skipped":false},{"title":"should return false if unset","fullTitle":"NodePyATVDevice get debug() should return false if unset","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.debug, undefined);","err":{},"uuid":"85ba4069-d76d-47c7-be82-f0b2d605cb94","parentUUID":"9b35701f-b004-4336-8005-0e70c0983588","isHook":false,"skipped":false}],"suites":[],"passes":["d1573cb0-6bc0-40f4-bc3f-501bcce97006","b1c9d75d-ab6a-402c-b0f3-ec22d2959204","85ba4069-d76d-47c7-be82-f0b2d605cb94"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"a1065c9c-02fe-4b26-8998-b67f51818b33","title":"set debug()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work for debug = true","fullTitle":"NodePyATVDevice set debug() should work for debug = true","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.debug, undefined);\ndevice.debug = true;\nassert_1.default.strictEqual(device.debug, true);","err":{},"uuid":"b5b1ab4c-a345-4dfd-9bb7-c2f910ad5dca","parentUUID":"a1065c9c-02fe-4b26-8998-b67f51818b33","isHook":false,"skipped":false},{"title":"should work for debug = undefined","fullTitle":"NodePyATVDevice set debug() should work for debug = undefined","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert_1.default.strictEqual(device.debug, undefined);","err":{},"uuid":"551b4b02-f911-45ff-91df-5956d9f5bad0","parentUUID":"a1065c9c-02fe-4b26-8998-b67f51818b33","isHook":false,"skipped":false},{"title":"should work for debug = undefined","fullTitle":"NodePyATVDevice set debug() should work for debug = undefined","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert_1.default.strictEqual(device.debug, undefined);","err":{},"uuid":"29ae5d2f-c041-4479-80d5-9c530f629ae8","parentUUID":"a1065c9c-02fe-4b26-8998-b67f51818b33","isHook":false,"skipped":false},{"title":"should work for debug = fn","fullTitle":"NodePyATVDevice set debug() should work for debug = fn","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nassert_1.default.strictEqual(device.debug, undefined);\ndevice.debug = fn;\nassert_1.default.strictEqual(device.debug, fn);","err":{},"uuid":"680f5db3-2da2-4baf-9f94-d0f83b4af3d5","parentUUID":"a1065c9c-02fe-4b26-8998-b67f51818b33","isHook":false,"skipped":false}],"suites":[],"passes":["b5b1ab4c-a345-4dfd-9bb7-c2f910ad5dca","551b4b02-f911-45ff-91df-5956d9f5bad0","29ae5d2f-c041-4479-80d5-9c530f629ae8","680f5db3-2da2-4baf-9f94-d0f83b4af3d5"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"78f6a65f-2e46-4027-bb69-30ad2342139f","title":"toJSON()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return a object representation","fullTitle":"NodePyATVDevice toJSON() should return a object representation","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n});\nassert_1.default.deepEqual(device.toJSON(), {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n});","err":{},"uuid":"94d37f9d-a6de-464f-b55e-abe355c5825f","parentUUID":"78f6a65f-2e46-4027-bb69-30ad2342139f","isHook":false,"skipped":false},{"title":"should be possible to create a new device from this","fullTitle":"NodePyATVDevice toJSON() should be possible to create a new device from this","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const config = {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n};\nconst deviceA = new device_1.default(config);\nconst deviceB = new device_1.default(deviceA.toJSON());\nassert_1.default.deepEqual(deviceB.toJSON(), config);","err":{},"uuid":"495dbc4c-4917-49d9-abba-cf2b00ed7a73","parentUUID":"78f6a65f-2e46-4027-bb69-30ad2342139f","isHook":false,"skipped":false}],"suites":[],"passes":["94d37f9d-a6de-464f-b55e-abe355c5825f","495dbc4c-4917-49d9-abba-cf2b00ed7a73"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"540dd51d-14a7-4662-82fc-478d3e8b739b","title":"toString()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice toString() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.toString(), 'NodePyATVDevice(My Testdevice, 192.168.178.2)');","err":{},"uuid":"ac8c7ce4-4931-4113-9b3b-f24d4e3a60c2","parentUUID":"540dd51d-14a7-4662-82fc-478d3e8b739b","isHook":false,"skipped":false}],"suites":[],"passes":["ac8c7ce4-4931-4113-9b3b-f24d4e3a60c2"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"e682bfd5-234e-4d3c-9d55-9b464768f139","title":"getState()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work [I]","fullTitle":"NodePyATVDevice getState() should work [I]","timedOut":false,"duration":0,"state":"pending","pass":false,"fail":false,"pending":true,"code":"","err":{},"uuid":"702b88a5-fbbf-4922-b035-7f2dbdf061d8","parentUUID":"e682bfd5-234e-4d3c-9d55-9b464768f139","isHook":false,"skipped":false},{"title":"should work","fullTitle":"NodePyATVDevice getState() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const result = yield device.getState();\n assert_1.default.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: types_1.NodePyATVMediaType.video,\n deviceState: types_1.NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: types_1.NodePyATVShuffleState.off,\n repeat: types_1.NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n });\n});","err":{},"uuid":"f27c4347-6256-4d87-9c08-3293f4c45ea7","parentUUID":"e682bfd5-234e-4d3c-9d55-9b464768f139","isHook":false,"skipped":false},{"title":"should cache requests for a bit","fullTitle":"NodePyATVDevice getState() should cache requests for a bit","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: new Date().toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n const secondResult = yield device.getState();\n assert_1.default.strictEqual(firstResult.dateTime, secondResult.dateTime);\n assert_1.default.strictEqual(executions, 1);\n});","err":{},"uuid":"1c1cabf5-5807-443e-bd2f-b348ffad2048","parentUUID":"e682bfd5-234e-4d3c-9d55-9b464768f139","isHook":false,"skipped":false},{"title":"should update the position if cache was used","fullTitle":"NodePyATVDevice getState() should update the position if cache was used","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: new Date(new Date().getTime() - 1000).toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n assert_1.default.strictEqual(firstResult.position, 27);\n const secondResult = yield device.getState();\n assert_1.default.ok(secondResult.position);\n assert_1.default.ok(secondResult.position > 27, `Position should be > 27, was ${secondResult.position}`);\n assert_1.default.ok(secondResult.position < 30, `Position should be > 27, was ${secondResult.position}`);\n});","err":{},"uuid":"2514bbac-efdf-4d4f-ae13-9d96b50a242a","parentUUID":"e682bfd5-234e-4d3c-9d55-9b464768f139","isHook":false,"skipped":false}],"suites":[],"passes":["f27c4347-6256-4d87-9c08-3293f4c45ea7","1c1cabf5-5807-443e-bd2f-b348ffad2048","2514bbac-efdf-4d4f-ae13-9d96b50a242a"],"failures":[],"pending":["702b88a5-fbbf-4922-b035-7f2dbdf061d8"],"skipped":[],"duration":6,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"a5c38b02-40b7-4356-b613-122ed414e8c2","title":"clearState()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice clearState() should work","timedOut":false,"duration":3,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n title: 'Solo: A Star Wars Story'\n });\n })\n });\n assert_1.default.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n device.clearState();\n assert_1.default.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n assert_1.default.strictEqual(executions, 2);\n});","err":{},"uuid":"e0ca50ce-4b01-44be-afb3-2b95649f8b09","parentUUID":"a5c38b02-40b7-4356-b613-122ed414e8c2","isHook":false,"skipped":false}],"suites":[],"passes":["e0ca50ce-4b01-44be-afb3-2b95649f8b09"],"failures":[],"pending":[],"skipped":[],"duration":3,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"8dabe007-3f06-4850-bd89-4c27d9562bda","title":"getDateTime()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getDateTime() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: new Date().toJSON()\n });\n })\n });\n const result = yield device.getDateTime();\n assert_1.default.ok(result instanceof Date);\n});","err":{},"uuid":"5efe84f0-9709-4555-b5a4-997adf791856","parentUUID":"8dabe007-3f06-4850-bd89-4c27d9562bda","isHook":false,"skipped":false}],"suites":[],"passes":["5efe84f0-9709-4555-b5a4-997adf791856"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"77f89d91-933d-4ac3-8db8-3334304b56c4","title":"getHash()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getHash() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n hash: '12345'\n });\n })\n });\n const result = yield device.getHash();\n assert_1.default.strictEqual(result, '12345');\n});","err":{},"uuid":"27c2ecb7-9d13-44d5-852a-40e16b014fa7","parentUUID":"77f89d91-933d-4ac3-8db8-3334304b56c4","isHook":false,"skipped":false}],"suites":[],"passes":["27c2ecb7-9d13-44d5-852a-40e16b014fa7"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"c7422f8b-393f-4c60-91a6-da4133d84fb7","title":"getMediaType()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getMediaType() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n media_type: 'video'\n });\n })\n });\n const result = yield device.getMediaType();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVMediaType.video);\n assert_1.default.deepStrictEqual(result, 'video');\n});","err":{},"uuid":"527d69bf-d6c0-48ff-a087-ad067b677bfc","parentUUID":"c7422f8b-393f-4c60-91a6-da4133d84fb7","isHook":false,"skipped":false}],"suites":[],"passes":["527d69bf-d6c0-48ff-a087-ad067b677bfc"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"79c97a58-2da4-45a8-ae11-7223bbede584","title":"getDeviceState()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getDeviceState() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n device_state: 'seeking'\n });\n })\n });\n const result = yield device.getDeviceState();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVDeviceState.seeking);\n assert_1.default.deepStrictEqual(result, 'seeking');\n});","err":{},"uuid":"25fa0fbe-4d9a-4864-9dd5-f168d829792b","parentUUID":"79c97a58-2da4-45a8-ae11-7223bbede584","isHook":false,"skipped":false}],"suites":[],"passes":["25fa0fbe-4d9a-4864-9dd5-f168d829792b"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"4ff46432-2f77-4629-ae4c-a35506d147d1","title":"getTitle()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getTitle() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const result = yield device.getTitle();\n assert_1.default.strictEqual(result, 'My Movie');\n});","err":{},"uuid":"2c1b0985-0494-478e-b3af-22d61e7bee17","parentUUID":"4ff46432-2f77-4629-ae4c-a35506d147d1","isHook":false,"skipped":false}],"suites":[],"passes":["2c1b0985-0494-478e-b3af-22d61e7bee17"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"077412d4-2c26-4a72-9125-ef8769de0186","title":"getArtist()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getArtist() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n artist: 'My Artist'\n });\n })\n });\n const result = yield device.getArtist();\n assert_1.default.strictEqual(result, 'My Artist');\n});","err":{},"uuid":"4c0d3d16-853a-4187-be84-a650cd3e8473","parentUUID":"077412d4-2c26-4a72-9125-ef8769de0186","isHook":false,"skipped":false}],"suites":[],"passes":["4c0d3d16-853a-4187-be84-a650cd3e8473"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"bbd62c63-4106-4f2c-af20-acca75657e6b","title":"getAlbum()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getAlbum() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n album: 'My ALbum'\n });\n })\n });\n const result = yield device.getAlbum();\n assert_1.default.strictEqual(result, 'My ALbum');\n});","err":{},"uuid":"17b5eb45-73ff-4820-bb02-2feb539c6ee3","parentUUID":"bbd62c63-4106-4f2c-af20-acca75657e6b","isHook":false,"skipped":false}],"suites":[],"passes":["17b5eb45-73ff-4820-bb02-2feb539c6ee3"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"74f1098f-422f-4b2f-9422-f7407f46d261","title":"getGenre()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getGenre() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n genre: 'My Genre'\n });\n })\n });\n const result = yield device.getGenre();\n assert_1.default.strictEqual(result, 'My Genre');\n});","err":{},"uuid":"3867eac3-2ad8-4c74-9e00-12e12655ddc9","parentUUID":"74f1098f-422f-4b2f-9422-f7407f46d261","isHook":false,"skipped":false}],"suites":[],"passes":["3867eac3-2ad8-4c74-9e00-12e12655ddc9"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"a2f4c2c6-ac61-41f8-9f0e-cf09c66b8e66","title":"getTotalTime()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getTotalTime() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n total_time: 45\n });\n })\n });\n const result = yield device.getTotalTime();\n assert_1.default.strictEqual(result, 45);\n});","err":{},"uuid":"a36b434e-e1d6-4234-8c81-1eb94cd0d00c","parentUUID":"a2f4c2c6-ac61-41f8-9f0e-cf09c66b8e66","isHook":false,"skipped":false}],"suites":[],"passes":["a36b434e-e1d6-4234-8c81-1eb94cd0d00c"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"5f38baeb-ffe8-4386-afcd-fcd701cfe9e7","title":"getPosition()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getPosition() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n position: 30\n });\n })\n });\n const result = yield device.getPosition();\n assert_1.default.strictEqual(result, 30);\n});","err":{},"uuid":"4517261c-4e33-48d2-9ed8-5bd60829b0e6","parentUUID":"5f38baeb-ffe8-4386-afcd-fcd701cfe9e7","isHook":false,"skipped":false}],"suites":[],"passes":["4517261c-4e33-48d2-9ed8-5bd60829b0e6"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"f1f56c4f-3256-4faf-a8ef-c706fe46acfd","title":"getShuffle()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getShuffle() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n shuffle: 'songs'\n });\n })\n });\n const result = yield device.getShuffle();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVShuffleState.songs);\n assert_1.default.deepStrictEqual(result, 'songs');\n});","err":{},"uuid":"c62a990d-e48b-4443-ade1-b11c53e013f7","parentUUID":"f1f56c4f-3256-4faf-a8ef-c706fe46acfd","isHook":false,"skipped":false}],"suites":[],"passes":["c62a990d-e48b-4443-ade1-b11c53e013f7"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"16ffce6c-4275-4788-9d03-bfe15a00876f","title":"getRepeat()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getRepeat() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n repeat: 'all'\n });\n })\n });\n const result = yield device.getRepeat();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVRepeatState.all);\n assert_1.default.deepStrictEqual(result, 'all');\n});","err":{},"uuid":"e7454bce-f916-481c-836c-b7d0ea101433","parentUUID":"16ffce6c-4275-4788-9d03-bfe15a00876f","isHook":false,"skipped":false}],"suites":[],"passes":["e7454bce-f916-481c-836c-b7d0ea101433"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"6ae0389b-343e-4919-982a-cf4e1595a42c","title":"getApp()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getApp() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n app: 'My App'\n });\n })\n });\n const result = yield device.getApp();\n assert_1.default.strictEqual(result, 'My App');\n});","err":{},"uuid":"efcd2f37-6c22-4558-87f0-bd371fda81e2","parentUUID":"6ae0389b-343e-4919-982a-cf4e1595a42c","isHook":false,"skipped":false}],"suites":[],"passes":["efcd2f37-6c22-4558-87f0-bd371fda81e2"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"4f40bd96-bd7c-4f6b-82f1-586b32f7ab87","title":"getAppId()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getAppId() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n app_id: 'app.example.com'\n });\n })\n });\n const result = yield device.getAppId();\n assert_1.default.strictEqual(result, 'app.example.com');\n});","err":{},"uuid":"0bf6a552-1571-47e8-a213-6017c1ad22ff","parentUUID":"4f40bd96-bd7c-4f6b-82f1-586b32f7ab87","isHook":false,"skipped":false}],"suites":[],"passes":["0bf6a552-1571-47e8-a213-6017c1ad22ff"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"8e11d78d-c7f2-43b3-a173-bdcbe37bb249","title":"pressKey()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work with valid key","fullTitle":"NodePyATVDevice pressKey() should work with valid key","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n yield device.pressKey(types_1.NodePyATVKeys.home);\n});","err":{},"uuid":"ecbcb66c-48f7-41ea-87f1-f34ef3f8595e","parentUUID":"8e11d78d-c7f2-43b3-a173-bdcbe37bb249","isHook":false,"skipped":false},{"title":"should throw error with invalid key","fullTitle":"NodePyATVDevice pressKey() should throw error with invalid key","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n // @ts-ignore\n yield device.pressKey('foo');\n }), /Unsupported key value foo/);\n});","err":{},"uuid":"28ec0255-2e3f-4d99-ae06-547c4dd7cb1e","parentUUID":"8e11d78d-c7f2-43b3-a173-bdcbe37bb249","isHook":false,"skipped":false},{"title":"should throw error if pyatv result is not success","fullTitle":"NodePyATVDevice pressKey() should throw error if pyatv result is not success","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"failure\"}');\n })\n });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield device.pressKey(types_1.NodePyATVKeys.home);\n }), /Unable to parse pyatv response/);\n});","err":{},"uuid":"4afd86fc-d40d-47b5-a358-ba43ed89b058","parentUUID":"8e11d78d-c7f2-43b3-a173-bdcbe37bb249","isHook":false,"skipped":false}],"suites":[],"passes":["ecbcb66c-48f7-41ea-87f1-f34ef3f8595e","28ec0255-2e3f-4d99-ae06-547c4dd7cb1e","4afd86fc-d40d-47b5-a358-ba43ed89b058"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"4f47a39e-46a6-4d6a-bcfd-a67c70d4f642","title":"down()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice down() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"4ce8f2de-366a-4aa7-a801-0e38d8ed138d","parentUUID":"4f47a39e-46a6-4d6a-bcfd-a67c70d4f642","isHook":false,"skipped":false}],"suites":[],"passes":["4ce8f2de-366a-4aa7-a801-0e38d8ed138d"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"fb5b729b-5b8a-49cf-87d0-0fcba9d0e5db","title":"home()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice home() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"e7cf28db-c3b3-46df-9c4d-508779f17961","parentUUID":"fb5b729b-5b8a-49cf-87d0-0fcba9d0e5db","isHook":false,"skipped":false}],"suites":[],"passes":["e7cf28db-c3b3-46df-9c4d-508779f17961"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"f4f73fa4-c74f-4997-b196-df54fdca1b2a","title":"homeHold()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice homeHold() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"6dfaf63b-1936-409b-b352-3e5954083698","parentUUID":"f4f73fa4-c74f-4997-b196-df54fdca1b2a","isHook":false,"skipped":false}],"suites":[],"passes":["6dfaf63b-1936-409b-b352-3e5954083698"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"b0f47a03-361b-4eb6-8476-09038b022424","title":"left()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice left() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"f5c72af6-d3bb-40c5-8de8-93a4e0a009b8","parentUUID":"b0f47a03-361b-4eb6-8476-09038b022424","isHook":false,"skipped":false}],"suites":[],"passes":["f5c72af6-d3bb-40c5-8de8-93a4e0a009b8"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"2d6a0982-7e62-43c4-ad79-401d37dd341d","title":"menu()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice menu() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"df685286-5895-4011-8c2f-fe275ff7f805","parentUUID":"2d6a0982-7e62-43c4-ad79-401d37dd341d","isHook":false,"skipped":false}],"suites":[],"passes":["df685286-5895-4011-8c2f-fe275ff7f805"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"2fdd0045-0ae0-404b-80d4-9f90f535a4e6","title":"next()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice next() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"cf1914c3-23e5-4735-93e1-b2c60609aece","parentUUID":"2fdd0045-0ae0-404b-80d4-9f90f535a4e6","isHook":false,"skipped":false}],"suites":[],"passes":["cf1914c3-23e5-4735-93e1-b2c60609aece"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"626f2cf2-bb1c-484c-949c-6ad29e3e61ee","title":"pause()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice pause() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"a3359ef0-536a-4041-9c0f-5ca88efda656","parentUUID":"626f2cf2-bb1c-484c-949c-6ad29e3e61ee","isHook":false,"skipped":false}],"suites":[],"passes":["a3359ef0-536a-4041-9c0f-5ca88efda656"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"35bbe985-a345-4879-8e00-36408daa4741","title":"play()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice play() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"63eb8734-077f-4c17-a8c6-b7ff5816993d","parentUUID":"35bbe985-a345-4879-8e00-36408daa4741","isHook":false,"skipped":false}],"suites":[],"passes":["63eb8734-077f-4c17-a8c6-b7ff5816993d"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"51a73b3b-2dd2-4228-aa71-50dae7859593","title":"playPause()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice playPause() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"3c08e31f-1cbb-4382-ae71-2b0d27832a3a","parentUUID":"51a73b3b-2dd2-4228-aa71-50dae7859593","isHook":false,"skipped":false}],"suites":[],"passes":["3c08e31f-1cbb-4382-ae71-2b0d27832a3a"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"e352d860-419a-45cc-a077-124ea2f9de8d","title":"previous()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice previous() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"91913bd1-3bce-4c55-b020-c115f803999c","parentUUID":"e352d860-419a-45cc-a077-124ea2f9de8d","isHook":false,"skipped":false}],"suites":[],"passes":["91913bd1-3bce-4c55-b020-c115f803999c"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"673e79dc-3bd0-4f4e-b238-c8b32a5ab2a7","title":"right()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice right() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"9ba93fbe-d0c2-4deb-a642-21bb1123987b","parentUUID":"673e79dc-3bd0-4f4e-b238-c8b32a5ab2a7","isHook":false,"skipped":false}],"suites":[],"passes":["9ba93fbe-d0c2-4deb-a642-21bb1123987b"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"bcd580ab-ca36-493d-b381-d70a123b3c0b","title":"select()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice select() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"2df42191-8d7e-4574-bc11-fdd0289d7ff1","parentUUID":"bcd580ab-ca36-493d-b381-d70a123b3c0b","isHook":false,"skipped":false}],"suites":[],"passes":["2df42191-8d7e-4574-bc11-fdd0289d7ff1"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"0d658594-60f2-4d68-a5c9-66cd0a002f16","title":"skipBackward()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice skipBackward() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"e363ce5e-017a-47f5-b2d2-e2a3fade280a","parentUUID":"0d658594-60f2-4d68-a5c9-66cd0a002f16","isHook":false,"skipped":false}],"suites":[],"passes":["e363ce5e-017a-47f5-b2d2-e2a3fade280a"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"f39d5677-d8e0-45e0-9146-14d836160cc6","title":"skipForward()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice skipForward() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"72481b75-867e-44ef-921b-aee032ef0ee1","parentUUID":"f39d5677-d8e0-45e0-9146-14d836160cc6","isHook":false,"skipped":false}],"suites":[],"passes":["72481b75-867e-44ef-921b-aee032ef0ee1"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"0bd620d1-898d-4cc2-ac6f-a82ab4233f94","title":"stop()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice stop() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"c0b10ef7-485f-43af-a4bd-e65e35ff91b8","parentUUID":"0bd620d1-898d-4cc2-ac6f-a82ab4233f94","isHook":false,"skipped":false}],"suites":[],"passes":["c0b10ef7-485f-43af-a4bd-e65e35ff91b8"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"7130792d-9766-4e6c-973d-ae8ab5b9d64e","title":"suspend()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice suspend() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"45d04413-5336-40fa-9301-97df95a4398d","parentUUID":"7130792d-9766-4e6c-973d-ae8ab5b9d64e","isHook":false,"skipped":false}],"suites":[],"passes":["45d04413-5336-40fa-9301-97df95a4398d"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"7f3311d1-4187-40ab-8d80-50309609153b","title":"topMenu()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice topMenu() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"557cbd87-db93-4ee4-adca-25c11074d1fd","parentUUID":"7f3311d1-4187-40ab-8d80-50309609153b","isHook":false,"skipped":false}],"suites":[],"passes":["557cbd87-db93-4ee4-adca-25c11074d1fd"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"b5156439-9def-40b7-b8ea-d0e1f28fc719","title":"up()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice up() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"ae291ae8-9552-4b53-ac9f-ce515c6189f6","parentUUID":"b5156439-9def-40b7-b8ea-d0e1f28fc719","isHook":false,"skipped":false}],"suites":[],"passes":["ae291ae8-9552-4b53-ac9f-ce515c6189f6"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"4a67f6f2-997e-4aa8-8f05-675718200229","title":"volumeDown()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice volumeDown() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"fb8601d3-d0a2-4537-b8b1-0c58d127dff1","parentUUID":"4a67f6f2-997e-4aa8-8f05-675718200229","isHook":false,"skipped":false}],"suites":[],"passes":["fb8601d3-d0a2-4537-b8b1-0c58d127dff1"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"bfdca229-157f-4070-a199-f50779776dbb","title":"volumeUp()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice volumeUp() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"d5e453d4-93dd-458e-8b78-e68fa11458f4","parentUUID":"bfdca229-157f-4070-a199-f50779776dbb","isHook":false,"skipped":false}],"suites":[],"passes":["d5e453d4-93dd-458e-8b78-e68fa11458f4"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"736d32a2-4b6a-4bb5-87d9-21084a6e4710","title":"wakeup()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice wakeup() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"689548a8-36d6-4484-9b0d-67b3e73cde19","parentUUID":"736d32a2-4b6a-4bb5-87d9-21084a6e4710","isHook":false,"skipped":false}],"suites":[],"passes":["689548a8-36d6-4484-9b0d-67b3e73cde19"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000}],"passes":[],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"67775118-d032-44c2-85ae-85bffbd5f746","title":"NodePyATVInstance","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[],"suites":[{"uuid":"9b3cd6ef-52e8-4f4f-949d-b485b80a0530","title":"static version()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work with pyatv [L]","fullTitle":"NodePyATVInstance static version() should work with pyatv [L]","timedOut":false,"duration":455,"state":"passed","speed":"slow","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n this.timeout(4000);\n const result = yield index_1.default.version();\n if (result.pyatv === null) {\n throw new Error('No version found for pyatv. Is it installed in test environment?');\n }\n assert_1.default.equal(typeof result.pyatv, 'string', 'result.pyatv is a string');\n assert_1.default.ok(result.pyatv.length >= 5, 'result.pyatv has content');\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n assert_1.default.strictEqual(result.module, require(__dirname + '/../package.json').version || null);\n});","err":{},"uuid":"c08f52bb-7f82-42c6-b403-50ad2fec96ec","parentUUID":"9b3cd6ef-52e8-4f4f-949d-b485b80a0530","isHook":false,"skipped":false},{"title":"should return the pyatv version","fullTitle":"NodePyATVInstance static version() should return the pyatv version","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.code(1);\n cp.end('atvremote 0.7.4');\n })\n });\n assert_1.default.ok(result.pyatv);\n assert_1.default.strictEqual(result.pyatv, '0.7.4');\n});","err":{},"uuid":"fac2f162-1bbc-4c26-86ac-a79ef70a2d8c","parentUUID":"9b3cd6ef-52e8-4f4f-949d-b485b80a0530","isHook":false,"skipped":false},{"title":"should return the module version","fullTitle":"NodePyATVInstance static version() should return the module version","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n noColors: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n assert_1.default.strictEqual(result.module, require(__dirname + '/../package.json').version || null);\n});","err":{},"uuid":"93822085-7585-42e9-9a1e-1a355eac3a9f","parentUUID":"9b3cd6ef-52e8-4f4f-949d-b485b80a0530","isHook":false,"skipped":false},{"title":"should handle option.atvremotePath","fullTitle":"NodePyATVInstance static version() should handle option.atvremotePath","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n atvremotePath: '/foo/bar',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), '/foo/bar');\n cp.code(1).end();\n })\n });\n});","err":{},"uuid":"69f00bec-69a2-407c-91ed-efc4746ba790","parentUUID":"9b3cd6ef-52e8-4f4f-949d-b485b80a0530","isHook":false,"skipped":false},{"title":"should work with option.debug = true","fullTitle":"NodePyATVInstance static version() should work with option.debug = true","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n debug: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n});","err":{},"uuid":"09a82137-3861-417f-9932-e65076b5baa2","parentUUID":"9b3cd6ef-52e8-4f4f-949d-b485b80a0530","isHook":false,"skipped":false},{"title":"should work with option.noColors","fullTitle":"NodePyATVInstance static version() should work with option.noColors","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n debug: () => { },\n noColors: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n});","err":{},"uuid":"8a014ceb-98b0-4078-8248-1a369821c862","parentUUID":"9b3cd6ef-52e8-4f4f-949d-b485b80a0530","isHook":false,"skipped":false},{"title":"should return null on pyatv stderr output","fullTitle":"NodePyATVInstance static version() should return null on pyatv stderr output","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.stderr('Hello World!').code(123).end())\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});","err":{},"uuid":"d2da2d9d-db6a-42a1-a24a-ebe0020a13bb","parentUUID":"9b3cd6ef-52e8-4f4f-949d-b485b80a0530","isHook":false,"skipped":false},{"title":"should return null on pyatv error","fullTitle":"NodePyATVInstance static version() should return null on pyatv error","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('Hello world!')).end();\n })\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});","err":{},"uuid":"d151656f-4f30-4b80-afaa-d5bf2c9c2f4c","parentUUID":"9b3cd6ef-52e8-4f4f-949d-b485b80a0530","isHook":false,"skipped":false},{"title":"should return null on invalid pyatv version","fullTitle":"NodePyATVInstance static version() should return null on invalid pyatv version","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 42').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});","err":{},"uuid":"5b8448b5-f6da-4aa6-a586-51f60f54cee0","parentUUID":"9b3cd6ef-52e8-4f4f-949d-b485b80a0530","isHook":false,"skipped":false},{"title":"should return null on empty module version","fullTitle":"NodePyATVInstance static version() should return null on empty module version","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const path = require.resolve(__dirname + '/../package.json');\n require(path);\n const cache = require.cache[path];\n assert_1.default.ok(cache, 'package.json is in require cache');\n cache.exports = {};\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.7.4').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.module, null);\n});","err":{},"uuid":"fa071d74-5b56-42c1-9ee2-951956d33396","parentUUID":"9b3cd6ef-52e8-4f4f-949d-b485b80a0530","isHook":false,"skipped":false},{"title":"should return null on invalid module version","fullTitle":"NodePyATVInstance static version() should return null on invalid module version","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const path = require.resolve(__dirname + '/../package.json');\n require(path);\n const cache = require.cache[path];\n assert_1.default.ok(cache, 'package.json is in require cache');\n cache.exports = { version: 42 };\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.7.4').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.module, null);\n});","err":{},"uuid":"f1a91637-7eed-4067-afb4-92ece9a829b9","parentUUID":"9b3cd6ef-52e8-4f4f-949d-b485b80a0530","isHook":false,"skipped":false}],"suites":[],"passes":["c08f52bb-7f82-42c6-b403-50ad2fec96ec","fac2f162-1bbc-4c26-86ac-a79ef70a2d8c","93822085-7585-42e9-9a1e-1a355eac3a9f","69f00bec-69a2-407c-91ed-efc4746ba790","09a82137-3861-417f-9932-e65076b5baa2","8a014ceb-98b0-4078-8248-1a369821c862","d2da2d9d-db6a-42a1-a24a-ebe0020a13bb","d151656f-4f30-4b80-afaa-d5bf2c9c2f4c","5b8448b5-f6da-4aa6-a586-51f60f54cee0","fa071d74-5b56-42c1-9ee2-951956d33396","f1a91637-7eed-4067-afb4-92ece9a829b9"],"failures":[],"pending":[],"skipped":[],"duration":467,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"27ae802e-3594-41dd-a211-864001235325","title":"static check()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should resolve in test environment [L]","fullTitle":"NodePyATVInstance static check() should resolve in test environment [L]","timedOut":false,"duration":5796,"state":"passed","speed":"slow","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n this.timeout(12000);\n yield index_1.default.check();\n});","err":{},"uuid":"45627602-894d-4150-868b-47600572237c","parentUUID":"27ae802e-3594-41dd-a211-864001235325","isHook":false,"skipped":false},{"title":"should return nice error message if pyatv was not found","fullTitle":"NodePyATVInstance static check() should return nice error message if pyatv was not found","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});","err":{},"uuid":"5ada61a7-eed1-474b-b9d9-409bacc40ca9","parentUUID":"27ae802e-3594-41dd-a211-864001235325","isHook":false,"skipped":false},{"title":"should return nice error message if myatv is too old","fullTitle":"NodePyATVInstance static check() should return nice error message if myatv is too old","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.5.1').code(1).end();\n })\n });\n }), /Found pyatv, but unforunately it's too old. Please update pyatv./);\n});","err":{},"uuid":"6f0c8364-f0e2-459a-8ca8-55dcffa2f1a4","parentUUID":"27ae802e-3594-41dd-a211-864001235325","isHook":false,"skipped":false},{"title":"should return nice error message if scan failed","fullTitle":"NodePyATVInstance static check() should return nice error message if scan failed","timedOut":false,"duration":3,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n let i = 0;\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n if (i === 0) {\n cp.stdout('atvremote 0.7.0').code(1).end();\n i++;\n }\n else {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n }\n })\n });\n }), /Unable to scan for devices/);\n});","err":{},"uuid":"c908150c-7b29-4002-b844-47e487c65338","parentUUID":"27ae802e-3594-41dd-a211-864001235325","isHook":false,"skipped":false}],"suites":[],"passes":["45627602-894d-4150-868b-47600572237c","5ada61a7-eed1-474b-b9d9-409bacc40ca9","6f0c8364-f0e2-459a-8ca8-55dcffa2f1a4","c908150c-7b29-4002-b844-47e487c65338"],"failures":[],"pending":[],"skipped":[],"duration":5802,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"47bb96df-c754-4716-b155-98e6fbc41840","title":"static find()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work [L]","fullTitle":"NodePyATVInstance static find() should work [L]","timedOut":false,"duration":5392,"state":"passed","speed":"slow","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n this.timeout(8000);\n const result = yield index_1.default.find();\n assert_1.default.ok(Array.isArray(result));\n});","err":{},"uuid":"45c653ff-d469-4d0e-9216-1e3119446341","parentUUID":"47bb96df-c754-4716-b155-98e6fbc41840","isHook":false,"skipped":false},{"title":"should handle option.atvscriptPath","fullTitle":"NodePyATVInstance static find() should handle option.atvscriptPath","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n atvscriptPath: '/foo/bar',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), '/foo/bar');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});","err":{},"uuid":"dc1a4885-348d-45d1-874c-a47c32cc3654","parentUUID":"47bb96df-c754-4716-b155-98e6fbc41840","isHook":false,"skipped":false},{"title":"should throw error on stderr output","fullTitle":"NodePyATVInstance static find() should throw error on stderr output","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stderr('Hello World!').code(1).end();\n })\n });\n }), /Unable to execute request/);\n});","err":{},"uuid":"437d8caf-7eb6-4ce7-b68c-4557003f516e","parentUUID":"47bb96df-c754-4716-b155-98e6fbc41840","isHook":false,"skipped":false},{"title":"should throw error on error","fullTitle":"NodePyATVInstance static find() should throw error on error","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('Hello world!')).code(1).end();\n })\n });\n }), /Hello world!/);\n});","err":{},"uuid":"076f020a-c1d7-4ff0-a9e6-1342f43d19f5","parentUUID":"47bb96df-c754-4716-b155-98e6fbc41840","isHook":false,"skipped":false},{"title":"should throw error if atvscript result is not valid json","fullTitle":"NodePyATVInstance static find() should throw error if atvscript result is not valid json","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout(JSON.stringify({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).substr(1)).end();\n })\n });\n }), /Unable to parse result/);\n});","err":{},"uuid":"abf51d1f-5c25-4638-a45d-8c4cd237feec","parentUUID":"47bb96df-c754-4716-b155-98e6fbc41840","isHook":false,"skipped":false},{"title":"should throw error if atvscript result is not successfull","fullTitle":"NodePyATVInstance static find() should throw error if atvscript result is not successfull","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout({\n result: 'error'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});","err":{},"uuid":"f7544d77-0604-4296-9681-d9a50700e398","parentUUID":"47bb96df-c754-4716-b155-98e6fbc41840","isHook":false,"skipped":false},{"title":"should throw error if atvscript result is without device array","fullTitle":"NodePyATVInstance static find() should throw error if atvscript result is without device array","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout({\n result: 'success'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});","err":{},"uuid":"4dbdfe82-1518-437a-ba22-852bd2a6ed24","parentUUID":"47bb96df-c754-4716-b155-98e6fbc41840","isHook":false,"skipped":false}],"suites":[],"passes":["45c653ff-d469-4d0e-9216-1e3119446341","dc1a4885-348d-45d1-874c-a47c32cc3654","437d8caf-7eb6-4ce7-b68c-4557003f516e","076f020a-c1d7-4ff0-a9e6-1342f43d19f5","abf51d1f-5c25-4638-a45d-8c4cd237feec","f7544d77-0604-4296-9681-d9a50700e398","4dbdfe82-1518-437a-ba22-852bd2a6ed24"],"failures":[],"pending":[],"skipped":[],"duration":5398,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"6af8d6d8-4b49-4fd9-8e51-a9d79a0158c4","title":"static device()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should pass options to constructor","fullTitle":"NodePyATVInstance static device() should pass options to constructor","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = index_1.default.device({ host: '192.168.178.6', name: 'My Testdevice' });\nassert_1.default.strictEqual(device.host, '192.168.178.6');\nassert_1.default.strictEqual(device.name, 'My Testdevice');","err":{},"uuid":"c8577c5b-7d0e-4a88-95d1-fd14fb6e4300","parentUUID":"6af8d6d8-4b49-4fd9-8e51-a9d79a0158c4","isHook":false,"skipped":false}],"suites":[],"passes":["c8577c5b-7d0e-4a88-95d1-fd14fb6e4300"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"77658edd-bade-4ab3-bea7-4c930daf9ddc","title":"version()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should merge options from constructor","fullTitle":"NodePyATVInstance version() should merge options from constructor","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvremotePath: 'test' });\n yield i.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.code(1).end();\n })\n });\n});","err":{},"uuid":"71b4e340-483d-48fb-b6a9-14d268147308","parentUUID":"77658edd-bade-4ab3-bea7-4c930daf9ddc","isHook":false,"skipped":false}],"suites":[],"passes":["71b4e340-483d-48fb-b6a9-14d268147308"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"0121277a-98b2-4ced-82fa-db467186d915","title":"check()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should merge options from constructor","fullTitle":"NodePyATVInstance check() should merge options from constructor","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvremotePath: 'test' });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield i.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});","err":{},"uuid":"6d45c4f6-21cd-453e-a5fb-bf5da7c43b0d","parentUUID":"0121277a-98b2-4ced-82fa-db467186d915","isHook":false,"skipped":false}],"suites":[],"passes":["6d45c4f6-21cd-453e-a5fb-bf5da7c43b0d"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"37985751-186e-4189-b203-5ede247f9d08","title":"find()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should merge options from constructor","fullTitle":"NodePyATVInstance find() should merge options from constructor","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvscriptPath: 'test' });\n yield i.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});","err":{},"uuid":"e6da914c-5f8b-40f3-8b11-a8394ba1f4ee","parentUUID":"37985751-186e-4189-b203-5ede247f9d08","isHook":false,"skipped":false}],"suites":[],"passes":["e6da914c-5f8b-40f3-8b11-a8394ba1f4ee"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"0c0601c2-3487-4b01-90ed-aa85dec0329b","title":"device()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should merge options from constructor","fullTitle":"NodePyATVInstance device() should merge options from constructor","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ debug: true });\n const d = i.device({ name: 'My Testdevice', host: '192.168.178.2' });\n assert_1.default.deepStrictEqual(d.debug, true);\n});","err":{},"uuid":"416e0d8d-01c4-4f40-80d5-7b186501feb4","parentUUID":"0c0601c2-3487-4b01-90ed-aa85dec0329b","isHook":false,"skipped":false}],"suites":[],"passes":["416e0d8d-01c4-4f40-80d5-7b186501feb4"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"a43792a0-1a78-4115-949b-38678b4c1f4f","title":"Type Exports","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"Type NodePyATVProtocol should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVProtocol should be exported","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVProtocol);","err":{},"uuid":"9bd5ceea-910c-4416-940e-15efd9ccbfef","parentUUID":"a43792a0-1a78-4115-949b-38678b4c1f4f","isHook":false,"skipped":false},{"title":"Type NodePyATVMediaType should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVMediaType should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVMediaType);","err":{},"uuid":"732a497c-911f-4284-a759-dfa434552d41","parentUUID":"a43792a0-1a78-4115-949b-38678b4c1f4f","isHook":false,"skipped":false},{"title":"Type NodePyATVDeviceEvent should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVDeviceEvent should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVDeviceEvent);","err":{},"uuid":"4c23f5cd-3aea-401e-aea9-9ec19922d0ac","parentUUID":"a43792a0-1a78-4115-949b-38678b4c1f4f","isHook":false,"skipped":false},{"title":"Type NodePyATVDeviceState should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVDeviceState should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVDeviceState);","err":{},"uuid":"0879c615-5337-41c9-b5c1-b02417252e6e","parentUUID":"a43792a0-1a78-4115-949b-38678b4c1f4f","isHook":false,"skipped":false},{"title":"Type NodePyATVRepeatState should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVRepeatState should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVRepeatState);","err":{},"uuid":"c9ced316-57de-464a-9c01-a9b6db3031ee","parentUUID":"a43792a0-1a78-4115-949b-38678b4c1f4f","isHook":false,"skipped":false},{"title":"Type NodePyATVShuffleState should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVShuffleState should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVShuffleState);","err":{},"uuid":"0adf68aa-1333-4bfc-8b8c-4fd65c5fc824","parentUUID":"a43792a0-1a78-4115-949b-38678b4c1f4f","isHook":false,"skipped":false},{"title":"Type NodePyATVKeys should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVKeys should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVKeys);","err":{},"uuid":"52ede4de-07ca-41a3-a195-be8b111004b4","parentUUID":"a43792a0-1a78-4115-949b-38678b4c1f4f","isHook":false,"skipped":false}],"suites":[],"passes":["9bd5ceea-910c-4416-940e-15efd9ccbfef","732a497c-911f-4284-a759-dfa434552d41","4c23f5cd-3aea-401e-aea9-9ec19922d0ac","0879c615-5337-41c9-b5c1-b02417252e6e","c9ced316-57de-464a-9c01-a9b6db3031ee","0adf68aa-1333-4bfc-8b8c-4fd65c5fc824","52ede4de-07ca-41a3-a195-be8b111004b4"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000}],"passes":[],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"a84a70f0-8dc5-46ad-bab9-a85b130b0f73","title":"Tools","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/tools.ts","file":"/test/tools.ts","beforeHooks":[],"afterHooks":[],"tests":[],"suites":[{"uuid":"727c35ad-2d6a-4857-86f7-ed4e460da7be","title":"addRequestId() / removeRequestId()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/tools.ts","file":"/test/tools.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return a string","fullTitle":"Tools addRequestId() / removeRequestId() should return a string","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const id = (0, tools_1.addRequestId)();\nassert_1.default.strictEqual(typeof id, 'string');\n(0, tools_1.removeRequestId)(id);","err":{},"uuid":"1cb4cc65-b5f2-4ff9-a63c-413394f334f8","parentUUID":"727c35ad-2d6a-4857-86f7-ed4e460da7be","isHook":false,"skipped":false},{"title":"should work if given id is not in index","fullTitle":"Tools addRequestId() / removeRequestId() should work if given id is not in index","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"(0, tools_1.removeRequestId)('FOO');","err":{},"uuid":"a7fd58fd-e785-481d-840f-5cf52f6fb7e7","parentUUID":"727c35ad-2d6a-4857-86f7-ed4e460da7be","isHook":false,"skipped":false}],"suites":[],"passes":["1cb4cc65-b5f2-4ff9-a63c-413394f334f8","a7fd58fd-e785-481d-840f-5cf52f6fb7e7"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"96237052-da1c-4840-89fa-afaa41abe822","title":"debug()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/tools.ts","file":"/test/tools.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work without any options","fullTitle":"Tools debug() should work without any options","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"(0, tools_1.debug)('TEST', 'Hello World.', {});","err":{},"uuid":"1f0d03b3-9a35-4ba3-8fc0-70bdc9aeb885","parentUUID":"96237052-da1c-4840-89fa-afaa41abe822","isHook":false,"skipped":false},{"title":"should work with default logger","fullTitle":"Tools debug() should work with default logger","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"(0, tools_1.debug)('TEST', 'Hello World.', { debug: true });","err":{},"uuid":"a5e66f31-d532-473e-80e5-016b596f6475","parentUUID":"96237052-da1c-4840-89fa-afaa41abe822","isHook":false,"skipped":false},{"title":"should work with custom logger","fullTitle":"Tools debug() should work with custom logger","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"(0, tools_1.debug)('TEST', 'Hello World.', {\n debug: function (msg) {\n assert_1.default.strictEqual(this, null);\n assert_1.default.ok(msg.includes('Hello World'));\n }\n});","err":{},"uuid":"21c64870-44b9-420e-b87f-20929c072acd","parentUUID":"96237052-da1c-4840-89fa-afaa41abe822","isHook":false,"skipped":false},{"title":"should work with colors disabled","fullTitle":"Tools debug() should work with colors disabled","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"(0, tools_1.debug)('TEST', 'Hello World.', { noColors: true });","err":{},"uuid":"85ee583b-03e8-419b-98e0-c787afd11f4d","parentUUID":"96237052-da1c-4840-89fa-afaa41abe822","isHook":false,"skipped":false},{"title":"should work with custom logger and colors disabled","fullTitle":"Tools debug() should work with custom logger and colors disabled","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"(0, tools_1.debug)('TEST', 'Hello World.', {\n noColors: true,\n debug: function (msg) {\n assert_1.default.strictEqual(this, null);\n assert_1.default.strictEqual(msg, '[node-pyatv][TEST] Hello World.');\n }\n});","err":{},"uuid":"6f896070-ffb8-4cab-bbcc-3105efaa02e9","parentUUID":"96237052-da1c-4840-89fa-afaa41abe822","isHook":false,"skipped":false}],"suites":[],"passes":["1f0d03b3-9a35-4ba3-8fc0-70bdc9aeb885","a5e66f31-d532-473e-80e5-016b596f6475","21c64870-44b9-420e-b87f-20929c072acd","85ee583b-03e8-419b-98e0-c787afd11f4d","6f896070-ffb8-4cab-bbcc-3105efaa02e9"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"8ed7be58-3632-4fc7-96d8-325a298b3ce4","title":"getExecutable()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/tools.ts","file":"/test/tools.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should handle atvremotePath if set","fullTitle":"Tools getExecutable() should handle atvremotePath if set","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvremote, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert_1.default.strictEqual(result, '/tmp/1');","err":{},"uuid":"2d2cad0f-3a3d-4301-b7b1-63702dbdc471","parentUUID":"8ed7be58-3632-4fc7-96d8-325a298b3ce4","isHook":false,"skipped":false},{"title":"should handle atvscriptPath if set","fullTitle":"Tools getExecutable() should handle atvscriptPath if set","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert_1.default.strictEqual(result, '/tmp/2');","err":{},"uuid":"947f44c3-649a-4e91-a847-c78cfb943e26","parentUUID":"8ed7be58-3632-4fc7-96d8-325a298b3ce4","isHook":false,"skipped":false},{"title":"should handle default for atvremote","fullTitle":"Tools getExecutable() should handle default for atvremote","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvremote, {\n atvscriptPath: '/tmp'\n});\nassert_1.default.strictEqual(result, 'atvremote');","err":{},"uuid":"ecbb34b2-f9b4-4225-8f07-1ca4f05bbc13","parentUUID":"8ed7be58-3632-4fc7-96d8-325a298b3ce4","isHook":false,"skipped":false},{"title":"should handle default for atvscript","fullTitle":"Tools getExecutable() should handle default for atvscript","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp'\n});\nassert_1.default.strictEqual(result, 'atvscript');","err":{},"uuid":"458c6282-9c17-4f7a-a356-457281e06ddc","parentUUID":"8ed7be58-3632-4fc7-96d8-325a298b3ce4","isHook":false,"skipped":false}],"suites":[],"passes":["2d2cad0f-3a3d-4301-b7b1-63702dbdc471","947f44c3-649a-4e91-a847-c78cfb943e26","ecbb34b2-f9b4-4225-8f07-1ca4f05bbc13","458c6282-9c17-4f7a-a356-457281e06ddc"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"41fd1bd7-c648-44be-a215-f5a7d721b42f","title":"getParameters()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/tools.ts","file":"/test/tools.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"empty case","fullTitle":"Tools getParameters() empty case","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)();\n assert_1.default.deepEqual(result, []);\n});","err":{},"uuid":"278b44ad-e91b-414f-b0c3-495e05247f11","parentUUID":"41fd1bd7-c648-44be-a215-f5a7d721b42f","isHook":false,"skipped":false},{"title":"easy case","fullTitle":"Tools getParameters() easy case","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)({\n host: '192.168.178.2'\n });\n assert_1.default.deepEqual(result, ['-s', '192.168.178.2']);\n});","err":{},"uuid":"0f4be18f-c26d-473d-9472-cea490a8ef51","parentUUID":"41fd1bd7-c648-44be-a215-f5a7d721b42f","isHook":false,"skipped":false},{"title":"full case","fullTitle":"Tools getParameters() full case","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)({\n hosts: ['192.168.178.2', '192.168.178.3'],\n id: '****',\n protocol: types_1.NodePyATVProtocol.mrp,\n dmapCredentials: '****',\n mrpCredentials: '****',\n airplayCredentials: '****',\n companionCredentials: '1234',\n raopCredentials: '::foo:'\n });\n assert_1.default.deepEqual(result, [\n '-s', '192.168.178.2,192.168.178.3',\n '-i', '****',\n '--protocol', 'mrp',\n '--dmap-credentials', '****',\n '--mrp-credentials', '****',\n '--airplay-credentials', '****',\n '--companion-credentials', '1234',\n '--raop-credentials', '::foo:'\n ]);\n});","err":{},"uuid":"664e32b4-5e4e-4374-bee5-145fc98062aa","parentUUID":"41fd1bd7-c648-44be-a215-f5a7d721b42f","isHook":false,"skipped":false}],"suites":[],"passes":["278b44ad-e91b-414f-b0c3-495e05247f11","0f4be18f-c26d-473d-9472-cea490a8ef51","664e32b4-5e4e-4374-bee5-145fc98062aa"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"db1af8c7-a908-420b-ae54-38d8c97ed575","title":"parseState()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/tools.ts","file":"/test/tools.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work with empty data","fullTitle":"Tools parseState() should work with empty data","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const input = {};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});","err":{},"uuid":"d91139c9-c7f4-4b49-add2-fe38ab45d034","parentUUID":"db1af8c7-a908-420b-ae54-38d8c97ed575","isHook":false,"skipped":false},{"title":"should work without data","fullTitle":"Tools parseState() should work without data","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"// @ts-ignore\nconst result = (0, tools_1.parseState)(null, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});","err":{},"uuid":"d5e6a469-ebf5-4e27-904c-25637ac102f1","parentUUID":"db1af8c7-a908-420b-ae54-38d8c97ed575","isHook":false,"skipped":false},{"title":"should work with example data","fullTitle":"Tools parseState() should work with example data","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const input = {\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus',\n powerState: null\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: types_1.NodePyATVMediaType.video,\n deviceState: types_1.NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: types_1.NodePyATVShuffleState.off,\n repeat: types_1.NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n});","err":{},"uuid":"60615eee-74b7-44f8-9c97-77378a33ce9f","parentUUID":"db1af8c7-a908-420b-ae54-38d8c97ed575","isHook":false,"skipped":false},{"title":"should ignore date if it's an invalid date","fullTitle":"Tools parseState() should ignore date if it's an invalid date","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const input = { datetime: 'today' };\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});","err":{},"uuid":"bdbb9789-bfe9-4c65-8c22-2d19af64359d","parentUUID":"db1af8c7-a908-420b-ae54-38d8c97ed575","isHook":false,"skipped":false},{"title":"should ignore data if unsupported type","fullTitle":"Tools parseState() should ignore data if unsupported type","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const input = {\n result: 'success',\n datetime: true,\n hash: 1337,\n media_type: false,\n device_state: 43,\n title: undefined,\n artist: 90,\n album: Infinity,\n genre: Math.PI,\n total_time: '23min',\n position: '0:30.123',\n shuffle: false,\n repeat: true,\n app: 0,\n app_id: 891645381647289,\n powerState: null\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});","err":{},"uuid":"eb5ab391-e830-4d75-8a29-5aabbf36f752","parentUUID":"db1af8c7-a908-420b-ae54-38d8c97ed575","isHook":false,"skipped":false},{"title":"should ignore enums with unsupported valid","fullTitle":"Tools parseState() should ignore enums with unsupported valid","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const input = {\n media_type: '3d-experience',\n device_state: 'initiating',\n shuffle: 'everything',\n repeat: 'nothing'\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});","err":{},"uuid":"3f787787-83dc-4918-967f-39707f8b4a18","parentUUID":"db1af8c7-a908-420b-ae54-38d8c97ed575","isHook":false,"skipped":false}],"suites":[],"passes":["d91139c9-c7f4-4b49-add2-fe38ab45d034","d5e6a469-ebf5-4e27-904c-25637ac102f1","60615eee-74b7-44f8-9c97-77378a33ce9f","bdbb9789-bfe9-4c65-8c22-2d19af64359d","eb5ab391-e830-4d75-8a29-5aabbf36f752","3f787787-83dc-4918-967f-39707f8b4a18"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000}],"passes":[],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000}],"passes":[],"failures":[],"pending":[],"skipped":[],"duration":0,"root":true,"rootEmpty":true,"_timeout":2000}],"meta":{"mocha":{"version":"9.1.2"},"mochawesome":{"options":{"quiet":false,"reportFilename":"mochawesome","saveHtml":true,"saveJson":true,"consoleReporter":"spec","useInlineDiffs":false,"code":true},"version":"6.2.2"},"marge":{"version":"5.2.0"}}}" data-config="{"reportFilename":"mochawesome","reportDir":"mochawesome-report","reportTitle":"node-pyatv","reportPageTitle":"Mochawesome Report","inline":false,"inlineAssets":false,"cdn":false,"charts":false,"enableCharts":false,"code":true,"enableCode":true,"autoOpen":false,"overwrite":true,"timestamp":false,"ts":false,"showPassed":true,"showFailed":true,"showPending":true,"showSkipped":false,"showHooks":"failed","saveJson":true,"saveHtml":true,"dev":false,"assetsDir":"mochawesome-report/assets","jsonFile":"/home/runner/work/node-pyatv/node-pyatv/mochawesome-report/mochawesome.json","htmlFile":"/home/runner/work/node-pyatv/node-pyatv/mochawesome-report/mochawesome.html"}"><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="{"stats":{"suites":82,"tests":141,"passes":139,"pending":2,"failures":0,"start":"2021-11-29T21:57:38.053Z","end":"2021-11-29T21:57:50.229Z","duration":12176,"testsRegistered":141,"passPercent":100,"pendingPercent":1.4184397163120568,"other":0,"hasOther":false,"skipped":0,"hasSkipped":false},"results":[{"uuid":"f3928a0f-a264-4676-b51a-c9ffb42a5ee0","title":"","fullFile":"","file":"","beforeHooks":[],"afterHooks":[],"tests":[],"suites":[{"uuid":"1a5db6af-45b0-4a39-8d1c-d57d2f4e23a4","title":"NodePyATVDeviceEvent","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts","file":"/test/device-event.ts","beforeHooks":[],"afterHooks":[],"tests":[],"suites":[{"uuid":"e1564b59-b8c7-4bd9-b036-2359528e727f","title":"get key()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts","file":"/test/device-event.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvent get key() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.key, 'genre');","err":{},"uuid":"703c91bd-2e40-4d9f-865a-426762630351","parentUUID":"e1564b59-b8c7-4bd9-b036-2359528e727f","isHook":false,"skipped":false}],"suites":[],"passes":["703c91bd-2e40-4d9f-865a-426762630351"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"33b09442-65eb-4b08-ae4b-7ba33b1e3256","title":"get oldValue()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts","file":"/test/device-event.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvent get oldValue() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.oldValue, 'Jazz');","err":{},"uuid":"6ce3e6ae-027b-4006-8813-3ac7e44363a9","parentUUID":"33b09442-65eb-4b08-ae4b-7ba33b1e3256","isHook":false,"skipped":false}],"suites":[],"passes":["6ce3e6ae-027b-4006-8813-3ac7e44363a9"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"029cae62-8938-4ae3-bbbc-39c757e35461","title":"get newValue()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts","file":"/test/device-event.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvent get newValue() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.newValue, 'Rock');","err":{},"uuid":"5c128fb9-1620-4947-8932-b03ce4adb778","parentUUID":"029cae62-8938-4ae3-bbbc-39c757e35461","isHook":false,"skipped":false}],"suites":[],"passes":["5c128fb9-1620-4947-8932-b03ce4adb778"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"90ca571b-3b4c-4332-a114-0110bcfd6ac2","title":"get value()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts","file":"/test/device-event.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvent get value() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device: new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n })\n});\nassert_1.default.strictEqual(event.value, 'Rock');","err":{},"uuid":"74b213f5-0c13-4645-a8fc-8d344e42d4c4","parentUUID":"90ca571b-3b4c-4332-a114-0110bcfd6ac2","isHook":false,"skipped":false}],"suites":[],"passes":["74b213f5-0c13-4645-a8fc-8d344e42d4c4"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"d960305a-7b15-45bd-b20f-bc1ba7c94125","title":"get device()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-event.ts","file":"/test/device-event.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvent get device() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n host: '192.168.178.2',\n name: 'My Testinstance'\n});\nconst event = new device_event_1.default({\n key: 'genre',\n old: 'Jazz',\n new: 'Rock',\n device\n});\nassert_1.default.deepEqual(event.device, device);","err":{},"uuid":"76c17767-9f45-493e-831b-c2b236102aaa","parentUUID":"d960305a-7b15-45bd-b20f-bc1ba7c94125","isHook":false,"skipped":false}],"suites":[],"passes":["76c17767-9f45-493e-831b-c2b236102aaa"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000}],"passes":[],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"5cb02131-40f1-4d9d-ba42-05e4d5a653d0","title":"NodePyATVDeviceEvents","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[],"suites":[{"uuid":"0a494c09-989e-4ef5-ba3d-6f57475feb5c","title":"applyStateAndEmitEvents()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should emit update:key event","fullTitle":"NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update:key event","timedOut":false,"duration":3,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:title', event => {\n assert_1.default.ok(event instanceof lib_1.NodePyATVDeviceEvent);\n assert_1.default.strictEqual(event.key, 'title');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'My Movie');\n assert_1.default.strictEqual(event.value, 'My Movie');\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});","err":{},"uuid":"b8650b58-3137-43d8-b382-08680f39442e","parentUUID":"0a494c09-989e-4ef5-ba3d-6f57475feb5c","isHook":false,"skipped":false},{"title":"should emit update event","fullTitle":"NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update event","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update', event => {\n assert_1.default.ok(event instanceof lib_1.NodePyATVDeviceEvent);\n assert_1.default.strictEqual(event.key, 'title');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'My Movie');\n assert_1.default.strictEqual(event.value, 'My Movie');\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});","err":{},"uuid":"a0e7967e-0522-49d3-83aa-4ad34d304c02","parentUUID":"0a494c09-989e-4ef5-ba3d-6f57475feb5c","isHook":false,"skipped":false},{"title":"should emit update:key event before update","fullTitle":"NodePyATVDeviceEvents applyStateAndEmitEvents() should emit update:key event before update","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const sort = [];\n yield Promise.race([\n new Promise(cb => {\n device.once('update', () => {\n sort.push('update');\n cb(undefined);\n });\n }),\n new Promise(cb => {\n device.once('update:title', () => {\n sort.push('update:title');\n cb(undefined);\n });\n })\n ]);\n assert_1.default.deepStrictEqual(sort, ['update:title', 'update']);\n});","err":{},"uuid":"b6fd4ce8-42b2-4d51-873c-d5ec4bc7aea4","parentUUID":"0a494c09-989e-4ef5-ba3d-6f57475feb5c","isHook":false,"skipped":false},{"title":"should emit error events on failures","fullTitle":"NodePyATVDeviceEvents applyStateAndEmitEvents() should emit error events on failures","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n });\n })\n });\n yield new Promise(cb => {\n device.once('error', error => {\n assert_1.default.ok(error instanceof Error);\n assert_1.default.ok(error.toString().includes('invalid credentials: 321'));\n cb(undefined);\n });\n });\n});","err":{},"uuid":"b84ca3fe-764c-4ff8-bb1a-e2d455bfb9fb","parentUUID":"0a494c09-989e-4ef5-ba3d-6f57475feb5c","isHook":false,"skipped":false},{"title":"should not emit an update if new value is same as old one","fullTitle":"NodePyATVDeviceEvents applyStateAndEmitEvents() should not emit an update if new value is same as old one","timedOut":false,"duration":3,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n let spawnCounter = 0;\n let eventCounter = 0;\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n if (spawnCounter === 0) {\n cp.onStdIn(() => cp.end());\n }\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n spawnCounter++;\n if (spawnCounter >= 2) {\n cp.end();\n }\n })\n });\n const listener = () => {\n eventCounter++;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n yield device.getState();\n device.off('update', listener);\n assert_1.default.strictEqual(spawnCounter, 2);\n assert_1.default.strictEqual(eventCounter, 1);\n});","err":{},"uuid":"9e7729ee-2211-45a9-a3ac-b628ccdc6c68","parentUUID":"0a494c09-989e-4ef5-ba3d-6f57475feb5c","isHook":false,"skipped":false},{"title":"should emit error event if event listener throws an exception","fullTitle":"NodePyATVDeviceEvents applyStateAndEmitEvents() should emit error event if event listener throws an exception","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n let callCounter = 0;\n const error = new Error('This is an error. Be nice.');\n device.once('error', err => {\n assert_1.default.strictEqual(err, error);\n callCounter++;\n });\n const listener = () => {\n throw error;\n };\n device.on('update', listener);\n yield new Promise(cb => setTimeout(cb, 0));\n device.off('update', listener);\n assert_1.default.strictEqual(callCounter, 1);\n});","err":{},"uuid":"4edd13f6-a3e6-4d87-b9ea-1714519bae68","parentUUID":"0a494c09-989e-4ef5-ba3d-6f57475feb5c","isHook":false,"skipped":false},{"title":"should also work with powerState","fullTitle":"NodePyATVDeviceEvents applyStateAndEmitEvents() should also work with powerState","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n datetime: new Date().toJSON(),\n power_state: 'off'\n });\n })\n });\n yield new Promise(cb => {\n device.once('update:powerState', event => {\n assert_1.default.ok(event instanceof lib_1.NodePyATVDeviceEvent);\n assert_1.default.strictEqual(event.key, 'powerState');\n assert_1.default.strictEqual(event.oldValue, null);\n assert_1.default.strictEqual(event.newValue, 'off');\n assert_1.default.strictEqual(event.newValue, lib_1.NodePyATVPowerState.off);\n assert_1.default.strictEqual(event.value, 'off');\n assert_1.default.strictEqual(event.value, lib_1.NodePyATVPowerState.off);\n assert_1.default.deepStrictEqual(event.device, device);\n cb(undefined);\n });\n });\n});","err":{},"uuid":"1b637ac1-cbdb-4b30-9aa7-238274757cae","parentUUID":"0a494c09-989e-4ef5-ba3d-6f57475feb5c","isHook":false,"skipped":false}],"suites":[],"passes":["b8650b58-3137-43d8-b382-08680f39442e","a0e7967e-0522-49d3-83aa-4ad34d304c02","b6fd4ce8-42b2-4d51-873c-d5ec4bc7aea4","b84ca3fe-764c-4ff8-bb1a-e2d455bfb9fb","9e7729ee-2211-45a9-a3ac-b628ccdc6c68","4edd13f6-a3e6-4d87-b9ea-1714519bae68","1b637ac1-cbdb-4b30-9aa7-238274757cae"],"failures":[],"pending":[],"skipped":[],"duration":14,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"8b1d8bab-2211-4d64-8b78-47afe0722789","title":"start|stopListening()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should emit error if spawn fails","fullTitle":"NodePyATVDeviceEvents start|stopListening() should emit error if spawn fails","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const error = new Error();\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(error).end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.strictEqual(err, error);\n cb(undefined);\n });\n });\n device.off('update', listener);\n});","err":{},"uuid":"21a5eb21-26af-4632-a1ae-3cd64420e6fb","parentUUID":"8b1d8bab-2211-4d64-8b78-47afe0722789","isHook":false,"skipped":false},{"title":"should emit error on stderr data","fullTitle":"NodePyATVDeviceEvents start|stopListening() should emit error on stderr data","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stderr('Hello World!').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.ok(err instanceof Error);\n assert_1.default.ok(err.toString().includes('Got stderr output from pyatv: Hello World!'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});","err":{},"uuid":"ebf0107c-5db1-4132-9568-4d5ed3c43df2","parentUUID":"8b1d8bab-2211-4d64-8b78-47afe0722789","isHook":false,"skipped":false},{"title":"should emit error if stdout is not valid json","fullTitle":"NodePyATVDeviceEvents start|stopListening() should emit error if stdout is not valid json","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('#').end();\n })\n });\n const listener = () => {\n // empty listener\n };\n device.on('update', listener);\n yield new Promise(cb => {\n device.once('error', err => {\n assert_1.default.ok(err instanceof Error);\n assert_1.default.ok(err.toString().includes('Unable to parse stdout json: SyntaxError: ' +\n 'Unexpected token # in JSON at position 0'));\n cb(undefined);\n });\n });\n device.off('update', listener);\n});","err":{},"uuid":"40fce6b4-7ee3-4f54-82ed-09da1bb19ded","parentUUID":"8b1d8bab-2211-4d64-8b78-47afe0722789","isHook":false,"skipped":false},{"title":"should restart the process if it gets killed","fullTitle":"NodePyATVDeviceEvents start|stopListening() should restart the process if it gets killed","timedOut":false,"duration":0,"state":"pending","pass":false,"fail":false,"pending":true,"code":"","err":{},"uuid":"ab8ec48d-a11b-448d-bc9c-3801c8495e29","parentUUID":"8b1d8bab-2211-4d64-8b78-47afe0722789","isHook":false,"skipped":false}],"suites":[],"passes":["21a5eb21-26af-4632-a1ae-3cd64420e6fb","ebf0107c-5db1-4132-9568-4d5ed3c43df2","40fce6b4-7ee3-4f54-82ed-09da1bb19ded"],"failures":[],"pending":["ab8ec48d-a11b-448d-bc9c-3801c8495e29"],"skipped":[],"duration":6,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"9bf7d73d-1dca-49f8-9f2c-5ea6a598a18f","title":"addListener() / removeAllListeners()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work without any exceptions","fullTitle":"NodePyATVDeviceEvents addListener() / removeAllListeners() should work without any exceptions","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n device.removeAllListeners('update');\n});","err":{},"uuid":"4be171a1-0ebf-4cee-b0e4-67bc33555bf6","parentUUID":"9bf7d73d-1dca-49f8-9f2c-5ea6a598a18f","isHook":false,"skipped":false}],"suites":[],"passes":["4be171a1-0ebf-4cee-b0e4-67bc33555bf6"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"fa1eacb0-89b3-4bda-b659-401bc9cef727","title":"emit()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents emit() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst event = new lib_1.NodePyATVDeviceEvent({\n key: 'dateTime',\n old: 'foo',\n new: 'bar',\n device\n});\nlet executions = 0;\ndevice.once('test', (e) => {\n executions++;\n assert_1.default.strictEqual(e, event);\n assert_1.default.strictEqual(executions, 1);\n done();\n});\ndevice.emit('test', event);","err":{},"uuid":"eebfba55-0151-44f2-856a-0890b60115ba","parentUUID":"fa1eacb0-89b3-4bda-b659-401bc9cef727","isHook":false,"skipped":false}],"suites":[],"passes":["eebfba55-0151-44f2-856a-0890b60115ba"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"36e09bc6-72fe-41d5-bbc5-5184be92998d","title":"eventNames()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents eventNames() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.eventNames(), ['test']);\ndevice.off('test', listener);","err":{},"uuid":"1691ffdd-d9a9-48c7-8fbd-5ff54976491b","parentUUID":"36e09bc6-72fe-41d5-bbc5-5184be92998d","isHook":false,"skipped":false}],"suites":[],"passes":["1691ffdd-d9a9-48c7-8fbd-5ff54976491b"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"d9be95a1-f948-4200-b5ff-8bd91ab2aa4c","title":"getMaxListeners()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents getMaxListeners() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst result = device.getMaxListeners();\nassert_1.default.ok(typeof result, 'number');\nassert_1.default.ok(result >= 10);","err":{},"uuid":"eec72335-b692-433d-9343-0d8f75e3dae7","parentUUID":"d9be95a1-f948-4200-b5ff-8bd91ab2aa4c","isHook":false,"skipped":false}],"suites":[],"passes":["eec72335-b692-433d-9343-0d8f75e3dae7"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"1f7af3b3-59de-4736-8b3c-c1d740ab872c","title":"listenerCount()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents listenerCount() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.listenerCount('test'), 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.listenerCount('test'), 1);\ndevice.off('test', listener);","err":{},"uuid":"b950d484-f86e-4a0d-9e99-e39ee6755175","parentUUID":"1f7af3b3-59de-4736-8b3c-c1d740ab872c","isHook":false,"skipped":false}],"suites":[],"passes":["b950d484-f86e-4a0d-9e99-e39ee6755175"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"1f666fe3-bc7a-4b37-a8fd-e6ecb64891cd","title":"listeners()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents listeners() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.listeners('test').length, 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.listeners('test').length, 1);\nassert_1.default.deepStrictEqual(device.listeners('test')[0], listener);\ndevice.off('test', listener);","err":{},"uuid":"8f7ef931-0aa5-4b4e-8f6d-607808740fc7","parentUUID":"1f666fe3-bc7a-4b37-a8fd-e6ecb64891cd","isHook":false,"skipped":false}],"suites":[],"passes":["8f7ef931-0aa5-4b4e-8f6d-607808740fc7"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"7e2cf74b-4c87-4845-afd8-9fc241f8ddb7","title":"prependListener()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents prependListener() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\nconst listener = () => {\n device.removeAllListeners('update');\n done();\n};\ndevice.prependListener('update', listener);","err":{},"uuid":"503ea339-b090-429a-8a87-86d3842e06f7","parentUUID":"7e2cf74b-4c87-4845-afd8-9fc241f8ddb7","isHook":false,"skipped":false}],"suites":[],"passes":["503ea339-b090-429a-8a87-86d3842e06f7"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"1a19443e-5242-4f43-bd66-5f0d32221001","title":"prependOnceListener()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents prependOnceListener() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n});\ndevice.prependOnceListener('update', () => done());","err":{},"uuid":"cc8c7d0f-15c5-49a2-8335-279610f03c54","parentUUID":"1a19443e-5242-4f43-bd66-5f0d32221001","isHook":false,"skipped":false}],"suites":[],"passes":["cc8c7d0f-15c5-49a2-8335-279610f03c54"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"2c804050-11ab-4502-9ba3-1a7b76719e79","title":"rawListeners()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDeviceEvents rawListeners() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n })\n});\nconst listener = () => {\n // ignore\n};\nassert_1.default.deepStrictEqual(device.rawListeners('test').length, 0);\ndevice.on('test', listener);\nassert_1.default.deepStrictEqual(device.rawListeners('test').length, 1);\nassert_1.default.deepStrictEqual(device.rawListeners('test')[0], listener);\ndevice.off('test', listener);","err":{},"uuid":"e7e5d83b-e327-416f-b359-3eaccdce7ec7","parentUUID":"2c804050-11ab-4502-9ba3-1a7b76719e79","isHook":false,"skipped":false}],"suites":[],"passes":["e7e5d83b-e327-416f-b359-3eaccdce7ec7"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"8edd7fb7-2e8d-4718-bccf-f1c03c680020","title":"removeListener()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device-events.ts","file":"/test/device-events.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work without any exceptions","fullTitle":"NodePyATVDeviceEvents removeListener() should work without any exceptions","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new lib_1.NodePyATVDevice({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.onStdIn(() => cp.end());\n cp.stdout({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const listener = () => {\n // empty listener\n };\n device.addListener('update', listener);\n assert_1.default.deepStrictEqual(device.listenerCount('update'), 1);\n device.removeListener('update', listener);\n assert_1.default.deepStrictEqual(device.listenerCount('update'), 0);\n});","err":{},"uuid":"a9590f54-b4cd-4ae6-8043-895338e77faf","parentUUID":"8edd7fb7-2e8d-4718-bccf-f1c03c680020","isHook":false,"skipped":false}],"suites":[],"passes":["a9590f54-b4cd-4ae6-8043-895338e77faf"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000}],"passes":[],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"1ea5a9d0-3730-4802-b370-b61af8ebf469","title":"NodePyATVDevice","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[],"suites":[{"uuid":"9812a57c-3bfc-489d-8dd7-8b9e6402a266","title":"get name()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return the name","fullTitle":"NodePyATVDevice get name() should return the name","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.name, 'My Testdevice');","err":{},"uuid":"651af698-577d-4cb5-826c-c856ed816fa9","parentUUID":"9812a57c-3bfc-489d-8dd7-8b9e6402a266","isHook":false,"skipped":false}],"suites":[],"passes":["651af698-577d-4cb5-826c-c856ed816fa9"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"5f071690-ea60-43ee-89a3-6bd66ee05201","title":"get host()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return the host","fullTitle":"NodePyATVDevice get host() should return the host","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.host, '192.168.178.2');","err":{},"uuid":"a614a115-f8a6-4658-99c4-921103c56d76","parentUUID":"5f071690-ea60-43ee-89a3-6bd66ee05201","isHook":false,"skipped":false}],"suites":[],"passes":["a614a115-f8a6-4658-99c4-921103c56d76"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"217875fa-53fd-4422-a038-7eb1d0a842ac","title":"get id()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return the id","fullTitle":"NodePyATVDevice get id() should return the id","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****'\n});\nassert_1.default.strictEqual(device.id, '*****');","err":{},"uuid":"4ad6b762-c971-40e9-8a71-d85699cd979c","parentUUID":"217875fa-53fd-4422-a038-7eb1d0a842ac","isHook":false,"skipped":false}],"suites":[],"passes":["4ad6b762-c971-40e9-8a71-d85699cd979c"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"f1d2d8f3-4915-42a9-8444-c88ebc24586f","title":"get protocol()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return the protocol","fullTitle":"NodePyATVDevice get protocol() should return the protocol","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n protocol: types_1.NodePyATVProtocol.airplay\n});\nassert_1.default.strictEqual(device.protocol, types_1.NodePyATVProtocol.airplay);","err":{},"uuid":"a1263ad8-2149-445d-94f7-733401baa1c8","parentUUID":"f1d2d8f3-4915-42a9-8444-c88ebc24586f","isHook":false,"skipped":false}],"suites":[],"passes":["a1263ad8-2149-445d-94f7-733401baa1c8"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"d17fc287-1d41-4273-a329-c7786bf71ff2","title":"get debug()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return true if set to true","fullTitle":"NodePyATVDevice get debug() should return true if set to true","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);","err":{},"uuid":"a8f7a507-98db-4be8-9c15-3d2707fcb572","parentUUID":"d17fc287-1d41-4273-a329-c7786bf71ff2","isHook":false,"skipped":false},{"title":"should return fn if set to custom function","fullTitle":"NodePyATVDevice get debug() should return fn if set to custom function","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nconst device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: fn\n});\nassert_1.default.strictEqual(device.debug, fn);","err":{},"uuid":"b8e8ccc9-b488-4244-87ce-8867cdb44863","parentUUID":"d17fc287-1d41-4273-a329-c7786bf71ff2","isHook":false,"skipped":false},{"title":"should return false if unset","fullTitle":"NodePyATVDevice get debug() should return false if unset","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.debug, undefined);","err":{},"uuid":"260c2ab6-893c-4e24-8f30-dc7ac5d332a6","parentUUID":"d17fc287-1d41-4273-a329-c7786bf71ff2","isHook":false,"skipped":false}],"suites":[],"passes":["a8f7a507-98db-4be8-9c15-3d2707fcb572","b8e8ccc9-b488-4244-87ce-8867cdb44863","260c2ab6-893c-4e24-8f30-dc7ac5d332a6"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"bac9f29a-8419-4f18-806f-9d2ffd97f65a","title":"set debug()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work for debug = true","fullTitle":"NodePyATVDevice set debug() should work for debug = true","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.debug, undefined);\ndevice.debug = true;\nassert_1.default.strictEqual(device.debug, true);","err":{},"uuid":"184f6a3b-e74d-47b2-b1c5-b60a7b487b84","parentUUID":"bac9f29a-8419-4f18-806f-9d2ffd97f65a","isHook":false,"skipped":false},{"title":"should work for debug = undefined","fullTitle":"NodePyATVDevice set debug() should work for debug = undefined","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert_1.default.strictEqual(device.debug, undefined);","err":{},"uuid":"b3a95188-15c6-4d4f-9c9d-fb4b717fe801","parentUUID":"bac9f29a-8419-4f18-806f-9d2ffd97f65a","isHook":false,"skipped":false},{"title":"should work for debug = undefined","fullTitle":"NodePyATVDevice set debug() should work for debug = undefined","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n debug: true\n});\nassert_1.default.strictEqual(device.debug, true);\ndevice.debug = undefined;\nassert_1.default.strictEqual(device.debug, undefined);","err":{},"uuid":"38d44480-8cd0-406a-9e54-7587efc28804","parentUUID":"bac9f29a-8419-4f18-806f-9d2ffd97f65a","isHook":false,"skipped":false},{"title":"should work for debug = fn","fullTitle":"NodePyATVDevice set debug() should work for debug = fn","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst fn = () => {\n};\nassert_1.default.strictEqual(device.debug, undefined);\ndevice.debug = fn;\nassert_1.default.strictEqual(device.debug, fn);","err":{},"uuid":"aceb7d16-1c75-4a6b-9da6-715ae564fe1a","parentUUID":"bac9f29a-8419-4f18-806f-9d2ffd97f65a","isHook":false,"skipped":false}],"suites":[],"passes":["184f6a3b-e74d-47b2-b1c5-b60a7b487b84","b3a95188-15c6-4d4f-9c9d-fb4b717fe801","38d44480-8cd0-406a-9e54-7587efc28804","aceb7d16-1c75-4a6b-9da6-715ae564fe1a"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"2adeb690-a823-4388-a3ed-c5a39e42190e","title":"toJSON()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return a object representation","fullTitle":"NodePyATVDevice toJSON() should return a object representation","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n});\nassert_1.default.deepEqual(device.toJSON(), {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n});","err":{},"uuid":"f7ba2f36-dfbe-44c5-8792-bd32f61a0a92","parentUUID":"2adeb690-a823-4388-a3ed-c5a39e42190e","isHook":false,"skipped":false},{"title":"should be possible to create a new device from this","fullTitle":"NodePyATVDevice toJSON() should be possible to create a new device from this","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const config = {\n name: 'My Testdevice',\n host: '192.168.178.2',\n id: '*****',\n protocol: types_1.NodePyATVProtocol.airplay\n};\nconst deviceA = new device_1.default(config);\nconst deviceB = new device_1.default(deviceA.toJSON());\nassert_1.default.deepEqual(deviceB.toJSON(), config);","err":{},"uuid":"f6ad9b8c-5b2d-47a8-80ca-69852e60c3e9","parentUUID":"2adeb690-a823-4388-a3ed-c5a39e42190e","isHook":false,"skipped":false}],"suites":[],"passes":["f7ba2f36-dfbe-44c5-8792-bd32f61a0a92","f6ad9b8c-5b2d-47a8-80ca-69852e60c3e9"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"edb40c7a-dd89-4b31-ba78-ee397a6c6aa5","title":"toString()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice toString() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n});\nassert_1.default.strictEqual(device.toString(), 'NodePyATVDevice(My Testdevice, 192.168.178.2)');","err":{},"uuid":"f2613c05-7422-47ff-a7c1-8d4621d54cd4","parentUUID":"edb40c7a-dd89-4b31-ba78-ee397a6c6aa5","isHook":false,"skipped":false}],"suites":[],"passes":["f2613c05-7422-47ff-a7c1-8d4621d54cd4"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"9b532d55-d0a9-41f4-8c0e-1175c8a310da","title":"getState()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work [I]","fullTitle":"NodePyATVDevice getState() should work [I]","timedOut":false,"duration":0,"state":"pending","pass":false,"fail":false,"pending":true,"code":"","err":{},"uuid":"4e8adfc6-fb63-4c6b-90b0-a43508e48203","parentUUID":"9b532d55-d0a9-41f4-8c0e-1175c8a310da","isHook":false,"skipped":false},{"title":"should work","fullTitle":"NodePyATVDevice getState() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const result = yield device.getState();\n assert_1.default.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: types_1.NodePyATVMediaType.video,\n deviceState: types_1.NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: types_1.NodePyATVShuffleState.off,\n repeat: types_1.NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n });\n});","err":{},"uuid":"eceec493-e7ba-4953-8279-3fc71ae6b814","parentUUID":"9b532d55-d0a9-41f4-8c0e-1175c8a310da","isHook":false,"skipped":false},{"title":"should reject with error if pyatv fails","fullTitle":"NodePyATVDevice getState() should reject with error if pyatv fails","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n });\n })\n });\n assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield device.getState();\n }), /Got pyatv Error: invalid credentials: 321/);\n});","err":{},"uuid":"d91aafee-4981-4f7b-add9-ab1c1a2a970a","parentUUID":"9b532d55-d0a9-41f4-8c0e-1175c8a310da","isHook":false,"skipped":false},{"title":"should cache requests for a bit","fullTitle":"NodePyATVDevice getState() should cache requests for a bit","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: new Date().toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n const secondResult = yield device.getState();\n assert_1.default.strictEqual(firstResult.dateTime, secondResult.dateTime);\n assert_1.default.strictEqual(executions, 1);\n});","err":{},"uuid":"f0404b67-2619-418c-8f5f-c3961a12cd74","parentUUID":"9b532d55-d0a9-41f4-8c0e-1175c8a310da","isHook":false,"skipped":false},{"title":"should update the position if cache was used","fullTitle":"NodePyATVDevice getState() should update the position if cache was used","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: new Date(new Date().getTime() - 1000).toJSON(),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus'\n });\n })\n });\n const firstResult = yield device.getState();\n assert_1.default.strictEqual(firstResult.position, 27);\n const secondResult = yield device.getState();\n assert_1.default.ok(secondResult.position);\n assert_1.default.ok(secondResult.position > 27, `Position should be > 27, was ${secondResult.position}`);\n assert_1.default.ok(secondResult.position < 30, `Position should be > 27, was ${secondResult.position}`);\n});","err":{},"uuid":"f65415eb-1ee8-42dc-b954-065caaa9804e","parentUUID":"9b532d55-d0a9-41f4-8c0e-1175c8a310da","isHook":false,"skipped":false}],"suites":[],"passes":["eceec493-e7ba-4953-8279-3fc71ae6b814","d91aafee-4981-4f7b-add9-ab1c1a2a970a","f0404b67-2619-418c-8f5f-c3961a12cd74","f65415eb-1ee8-42dc-b954-065caaa9804e"],"failures":[],"pending":["4e8adfc6-fb63-4c6b-90b0-a43508e48203"],"skipped":[],"duration":4,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"48b4350f-ce9c-4f3a-a65b-c73c43e1a305","title":"clearState()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice clearState() should work","timedOut":false,"duration":3,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n let executions = 0;\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n executions++;\n cp.end({\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n title: 'Solo: A Star Wars Story'\n });\n })\n });\n assert_1.default.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n device.clearState();\n assert_1.default.deepStrictEqual(yield device.getTitle(), 'Solo: A Star Wars Story');\n assert_1.default.strictEqual(executions, 2);\n});","err":{},"uuid":"d1f64fbf-c91a-46b6-9c13-add52c3b21e2","parentUUID":"48b4350f-ce9c-4f3a-a65b-c73c43e1a305","isHook":false,"skipped":false}],"suites":[],"passes":["d1f64fbf-c91a-46b6-9c13-add52c3b21e2"],"failures":[],"pending":[],"skipped":[],"duration":3,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"dc597ed6-5c46-444a-a915-84c2322ba378","title":"getDateTime()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getDateTime() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n datetime: new Date().toJSON()\n });\n })\n });\n const result = yield device.getDateTime();\n assert_1.default.ok(result instanceof Date);\n});","err":{},"uuid":"928c33e3-b196-4f3a-a7f5-a8449aa9bec0","parentUUID":"dc597ed6-5c46-444a-a915-84c2322ba378","isHook":false,"skipped":false}],"suites":[],"passes":["928c33e3-b196-4f3a-a7f5-a8449aa9bec0"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"1daf759c-369e-4b50-a687-ba71c771d6c2","title":"getHash()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getHash() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n hash: '12345'\n });\n })\n });\n const result = yield device.getHash();\n assert_1.default.strictEqual(result, '12345');\n});","err":{},"uuid":"7521724b-ae55-46bb-b837-16b8d9de7238","parentUUID":"1daf759c-369e-4b50-a687-ba71c771d6c2","isHook":false,"skipped":false}],"suites":[],"passes":["7521724b-ae55-46bb-b837-16b8d9de7238"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"ae54cbf6-7393-443d-9c08-8e49c8dc3f73","title":"getMediaType()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getMediaType() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n media_type: 'video'\n });\n })\n });\n const result = yield device.getMediaType();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVMediaType.video);\n assert_1.default.deepStrictEqual(result, 'video');\n});","err":{},"uuid":"7478d827-cfd1-4348-8271-fee04d2640c4","parentUUID":"ae54cbf6-7393-443d-9c08-8e49c8dc3f73","isHook":false,"skipped":false}],"suites":[],"passes":["7478d827-cfd1-4348-8271-fee04d2640c4"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"0676ae49-a396-4428-bd18-8eda311c5850","title":"getDeviceState()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getDeviceState() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n device_state: 'seeking'\n });\n })\n });\n const result = yield device.getDeviceState();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVDeviceState.seeking);\n assert_1.default.deepStrictEqual(result, 'seeking');\n});","err":{},"uuid":"643913bf-5c16-47e5-94be-0246b5c96eb0","parentUUID":"0676ae49-a396-4428-bd18-8eda311c5850","isHook":false,"skipped":false}],"suites":[],"passes":["643913bf-5c16-47e5-94be-0246b5c96eb0"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"25f8c764-8c4e-425e-98c5-385c8da6e4d8","title":"getTitle()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getTitle() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n title: 'My Movie'\n });\n })\n });\n const result = yield device.getTitle();\n assert_1.default.strictEqual(result, 'My Movie');\n});","err":{},"uuid":"c824fe0b-8127-4046-9ccf-7adb7d07af3c","parentUUID":"25f8c764-8c4e-425e-98c5-385c8da6e4d8","isHook":false,"skipped":false}],"suites":[],"passes":["c824fe0b-8127-4046-9ccf-7adb7d07af3c"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"bc958652-f6f7-4533-978f-ed89203630e6","title":"getArtist()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getArtist() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n artist: 'My Artist'\n });\n })\n });\n const result = yield device.getArtist();\n assert_1.default.strictEqual(result, 'My Artist');\n});","err":{},"uuid":"2ec63618-09a6-4f81-b9be-ca852b343ec6","parentUUID":"bc958652-f6f7-4533-978f-ed89203630e6","isHook":false,"skipped":false}],"suites":[],"passes":["2ec63618-09a6-4f81-b9be-ca852b343ec6"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"b1322436-003d-46fc-b285-33b989225b51","title":"getAlbum()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getAlbum() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n album: 'My ALbum'\n });\n })\n });\n const result = yield device.getAlbum();\n assert_1.default.strictEqual(result, 'My ALbum');\n});","err":{},"uuid":"41bb4e78-5cf1-4c8e-a32f-1618a24dcdab","parentUUID":"b1322436-003d-46fc-b285-33b989225b51","isHook":false,"skipped":false}],"suites":[],"passes":["41bb4e78-5cf1-4c8e-a32f-1618a24dcdab"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"7155ff39-d299-47e3-b4e2-e28db4192d73","title":"getGenre()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getGenre() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n genre: 'My Genre'\n });\n })\n });\n const result = yield device.getGenre();\n assert_1.default.strictEqual(result, 'My Genre');\n});","err":{},"uuid":"698aefdd-5863-4606-8a82-ad4a926b7642","parentUUID":"7155ff39-d299-47e3-b4e2-e28db4192d73","isHook":false,"skipped":false}],"suites":[],"passes":["698aefdd-5863-4606-8a82-ad4a926b7642"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"b755e418-2b90-496f-8ca2-9271bc6654bc","title":"getTotalTime()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getTotalTime() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n total_time: 45\n });\n })\n });\n const result = yield device.getTotalTime();\n assert_1.default.strictEqual(result, 45);\n});","err":{},"uuid":"6842dbeb-16fc-4c66-a2a5-bc65c587a1bc","parentUUID":"b755e418-2b90-496f-8ca2-9271bc6654bc","isHook":false,"skipped":false}],"suites":[],"passes":["6842dbeb-16fc-4c66-a2a5-bc65c587a1bc"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"884651be-8116-4185-adf2-d79401801dd0","title":"getPosition()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getPosition() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n position: 30\n });\n })\n });\n const result = yield device.getPosition();\n assert_1.default.strictEqual(result, 30);\n});","err":{},"uuid":"3c5216e7-8ae6-42da-b799-c00918417ea7","parentUUID":"884651be-8116-4185-adf2-d79401801dd0","isHook":false,"skipped":false}],"suites":[],"passes":["3c5216e7-8ae6-42da-b799-c00918417ea7"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"68dd1346-0680-436d-b181-c055f6e07dcd","title":"getShuffle()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getShuffle() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n shuffle: 'songs'\n });\n })\n });\n const result = yield device.getShuffle();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVShuffleState.songs);\n assert_1.default.deepStrictEqual(result, 'songs');\n});","err":{},"uuid":"4afff1d8-93a8-4dcb-a0b0-2da9cbde4a7d","parentUUID":"68dd1346-0680-436d-b181-c055f6e07dcd","isHook":false,"skipped":false}],"suites":[],"passes":["4afff1d8-93a8-4dcb-a0b0-2da9cbde4a7d"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"12b50fe6-1002-4e1e-9358-f96cdf6ff617","title":"getRepeat()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getRepeat() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n repeat: 'all'\n });\n })\n });\n const result = yield device.getRepeat();\n assert_1.default.deepStrictEqual(result, types_1.NodePyATVRepeatState.all);\n assert_1.default.deepStrictEqual(result, 'all');\n});","err":{},"uuid":"7f3ce69a-f2bb-4702-9e05-53c386b479b0","parentUUID":"12b50fe6-1002-4e1e-9358-f96cdf6ff617","isHook":false,"skipped":false}],"suites":[],"passes":["7f3ce69a-f2bb-4702-9e05-53c386b479b0"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"f8a920c8-e2f3-414b-a53c-92cdba621033","title":"getApp()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getApp() should work","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n app: 'My App'\n });\n })\n });\n const result = yield device.getApp();\n assert_1.default.strictEqual(result, 'My App');\n});","err":{},"uuid":"c39678fd-5ac6-4846-a43c-5833b28d53e6","parentUUID":"f8a920c8-e2f3-414b-a53c-92cdba621033","isHook":false,"skipped":false}],"suites":[],"passes":["c39678fd-5ac6-4846-a43c-5833b28d53e6"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"3f386be8-185e-4964-a634-d8853b7edf86","title":"getAppId()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice getAppId() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end({\n result: 'success',\n app_id: 'app.example.com'\n });\n })\n });\n const result = yield device.getAppId();\n assert_1.default.strictEqual(result, 'app.example.com');\n});","err":{},"uuid":"3d304771-31b4-4d60-bb64-f6c36d5f6a2c","parentUUID":"3f386be8-185e-4964-a634-d8853b7edf86","isHook":false,"skipped":false}],"suites":[],"passes":["3d304771-31b4-4d60-bb64-f6c36d5f6a2c"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"9ef087e0-a04f-4f60-92b6-b59f7895aee9","title":"pressKey()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work with valid key","fullTitle":"NodePyATVDevice pressKey() should work with valid key","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n yield device.pressKey(types_1.NodePyATVKeys.home);\n});","err":{},"uuid":"48783653-d9af-48b3-9ef6-3f17a06b10d3","parentUUID":"9ef087e0-a04f-4f60-92b6-b59f7895aee9","isHook":false,"skipped":false},{"title":"should throw error with invalid key","fullTitle":"NodePyATVDevice pressKey() should throw error with invalid key","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2'\n });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n // @ts-ignore\n yield device.pressKey('foo');\n }), /Unsupported key value foo/);\n});","err":{},"uuid":"f38afbf6-2e69-4338-ae7b-d2dc0b7caeb3","parentUUID":"9ef087e0-a04f-4f60-92b6-b59f7895aee9","isHook":false,"skipped":false},{"title":"should throw error if pyatv result is not success","fullTitle":"NodePyATVDevice pressKey() should throw error if pyatv result is not success","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"failure\"}');\n })\n });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield device.pressKey(types_1.NodePyATVKeys.home);\n }), /Unable to parse pyatv response/);\n});","err":{},"uuid":"0d5d1f7d-03c4-45bd-9c97-803e658015e9","parentUUID":"9ef087e0-a04f-4f60-92b6-b59f7895aee9","isHook":false,"skipped":false}],"suites":[],"passes":["48783653-d9af-48b3-9ef6-3f17a06b10d3","f38afbf6-2e69-4338-ae7b-d2dc0b7caeb3","0d5d1f7d-03c4-45bd-9c97-803e658015e9"],"failures":[],"pending":[],"skipped":[],"duration":4,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"6bf4c75a-39bc-45da-9c60-c87e85070bea","title":"down()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice down() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"6ab2b699-d351-4a05-af24-45142f6204c0","parentUUID":"6bf4c75a-39bc-45da-9c60-c87e85070bea","isHook":false,"skipped":false}],"suites":[],"passes":["6ab2b699-d351-4a05-af24-45142f6204c0"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"bea24fbe-978f-4400-9a10-0c20b9163d0f","title":"home()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice home() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"e3b5b761-81c2-4560-bc74-f3f46677088c","parentUUID":"bea24fbe-978f-4400-9a10-0c20b9163d0f","isHook":false,"skipped":false}],"suites":[],"passes":["e3b5b761-81c2-4560-bc74-f3f46677088c"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"abd5f9fb-a8fb-4210-a74d-e9b97da9096f","title":"homeHold()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice homeHold() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"ad36ecfc-035a-4dec-9981-47b90baa9c18","parentUUID":"abd5f9fb-a8fb-4210-a74d-e9b97da9096f","isHook":false,"skipped":false}],"suites":[],"passes":["ad36ecfc-035a-4dec-9981-47b90baa9c18"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"532f0846-a14e-40c2-a466-27b5bf9fb429","title":"left()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice left() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"3fdfb742-370f-4146-9720-d0c5dbb4c5e2","parentUUID":"532f0846-a14e-40c2-a466-27b5bf9fb429","isHook":false,"skipped":false}],"suites":[],"passes":["3fdfb742-370f-4146-9720-d0c5dbb4c5e2"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"d4c38b32-9980-479a-be62-588fc797478e","title":"menu()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice menu() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"b99e6a7b-b5ba-45c7-b9ea-e7d479e579e6","parentUUID":"d4c38b32-9980-479a-be62-588fc797478e","isHook":false,"skipped":false}],"suites":[],"passes":["b99e6a7b-b5ba-45c7-b9ea-e7d479e579e6"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"46653fa1-2550-44b9-a191-a4e8d4b70b76","title":"next()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice next() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"4068195a-afa5-440e-bbc8-78052d05b0b7","parentUUID":"46653fa1-2550-44b9-a191-a4e8d4b70b76","isHook":false,"skipped":false}],"suites":[],"passes":["4068195a-afa5-440e-bbc8-78052d05b0b7"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"8e9152e3-9e32-4147-97c0-32aa972528e5","title":"pause()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice pause() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"62ead88e-2737-4f26-9cc7-d77d3671ed61","parentUUID":"8e9152e3-9e32-4147-97c0-32aa972528e5","isHook":false,"skipped":false}],"suites":[],"passes":["62ead88e-2737-4f26-9cc7-d77d3671ed61"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"713fe620-5280-4005-a421-8b9d7304e547","title":"play()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice play() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"6702c3bf-8efb-4e77-bf82-ffe95686d300","parentUUID":"713fe620-5280-4005-a421-8b9d7304e547","isHook":false,"skipped":false}],"suites":[],"passes":["6702c3bf-8efb-4e77-bf82-ffe95686d300"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"a2a9c847-091c-4bf6-8bf5-3a3b153f5370","title":"playPause()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice playPause() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"94e72bc3-23f1-4389-a743-34b06d00eb02","parentUUID":"a2a9c847-091c-4bf6-8bf5-3a3b153f5370","isHook":false,"skipped":false}],"suites":[],"passes":["94e72bc3-23f1-4389-a743-34b06d00eb02"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"0eaa6727-94e4-4750-98b5-aafe8e234de6","title":"previous()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice previous() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"8b10db83-b0d4-4b29-98b8-8fb1c6858d7c","parentUUID":"0eaa6727-94e4-4750-98b5-aafe8e234de6","isHook":false,"skipped":false}],"suites":[],"passes":["8b10db83-b0d4-4b29-98b8-8fb1c6858d7c"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"5e4ea771-a8a9-4a85-8aa2-22ac948a01f2","title":"right()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice right() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"7f36a61f-fe88-4fcc-a546-c15fb339485f","parentUUID":"5e4ea771-a8a9-4a85-8aa2-22ac948a01f2","isHook":false,"skipped":false}],"suites":[],"passes":["7f36a61f-fe88-4fcc-a546-c15fb339485f"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"526205c3-90dd-44f0-b200-8a89c77bb32c","title":"select()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice select() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"1ab9061c-9c0b-4753-a293-f5b127dbf890","parentUUID":"526205c3-90dd-44f0-b200-8a89c77bb32c","isHook":false,"skipped":false}],"suites":[],"passes":["1ab9061c-9c0b-4753-a293-f5b127dbf890"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"ceac39ab-ed59-4846-bdd7-ead0a798009c","title":"skipBackward()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice skipBackward() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"2dbfe6e2-5ed7-450a-a571-8028462ccea0","parentUUID":"ceac39ab-ed59-4846-bdd7-ead0a798009c","isHook":false,"skipped":false}],"suites":[],"passes":["2dbfe6e2-5ed7-450a-a571-8028462ccea0"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"91185665-6e4e-40c1-9bc7-a7a267f998bf","title":"skipForward()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice skipForward() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"e5549d16-9612-4b30-8274-94612752e7f3","parentUUID":"91185665-6e4e-40c1-9bc7-a7a267f998bf","isHook":false,"skipped":false}],"suites":[],"passes":["e5549d16-9612-4b30-8274-94612752e7f3"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"3cec0678-2836-4106-aa9e-8337f161b202","title":"stop()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice stop() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"37753af8-3e57-4e52-a49c-8e6289056d89","parentUUID":"3cec0678-2836-4106-aa9e-8337f161b202","isHook":false,"skipped":false}],"suites":[],"passes":["37753af8-3e57-4e52-a49c-8e6289056d89"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"a0419dda-99db-4ea9-8bc7-d5c8cfabc78b","title":"suspend()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice suspend() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"1b7646ce-9e64-4edf-ae7c-a90f2668b26a","parentUUID":"a0419dda-99db-4ea9-8bc7-d5c8cfabc78b","isHook":false,"skipped":false}],"suites":[],"passes":["1b7646ce-9e64-4edf-ae7c-a90f2668b26a"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"32906798-88dc-48eb-acca-f7ba12b2d57b","title":"topMenu()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice topMenu() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"563ea26e-4f2d-4ba0-a070-c2c4139935a1","parentUUID":"32906798-88dc-48eb-acca-f7ba12b2d57b","isHook":false,"skipped":false}],"suites":[],"passes":["563ea26e-4f2d-4ba0-a070-c2c4139935a1"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"08450232-7f94-4311-b174-bc2b02007b30","title":"up()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice up() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"c33f7de6-dee8-4bdf-b41c-adeafe2b6434","parentUUID":"08450232-7f94-4311-b174-bc2b02007b30","isHook":false,"skipped":false}],"suites":[],"passes":["c33f7de6-dee8-4bdf-b41c-adeafe2b6434"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"c70fed91-6fce-43e0-96eb-3250e044ed99","title":"volumeDown()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice volumeDown() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"8fbe1bcf-c5b9-4a43-ae09-b533bf652703","parentUUID":"c70fed91-6fce-43e0-96eb-3250e044ed99","isHook":false,"skipped":false}],"suites":[],"passes":["8fbe1bcf-c5b9-4a43-ae09-b533bf652703"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"88aaff08-bda5-4629-825d-39441eaa2f19","title":"volumeUp()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice volumeUp() should work","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"83536c6a-91ac-4b20-b0b4-b59f6ac915c8","parentUUID":"88aaff08-bda5-4629-825d-39441eaa2f19","isHook":false,"skipped":false}],"suites":[],"passes":["83536c6a-91ac-4b20-b0b4-b59f6ac915c8"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"8ccf2111-9fe1-4829-aa14-9d339d0dd365","title":"wakeup()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/device.ts","file":"/test/device.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work","fullTitle":"NodePyATVDevice wakeup() should work","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const device = new device_1.default({\n name: 'My Testdevice',\n host: '192.168.178.2',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.end('{\"result\":\"success\"}');\n })\n });\n // @ts-ignore\n yield device[key]();\n});","err":{},"uuid":"118ce868-8e11-4cdf-8486-910f4871b349","parentUUID":"8ccf2111-9fe1-4829-aa14-9d339d0dd365","isHook":false,"skipped":false}],"suites":[],"passes":["118ce868-8e11-4cdf-8486-910f4871b349"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000}],"passes":[],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"0a4d61e1-bbd9-4bbf-a335-ecba6b804a7e","title":"NodePyATVInstance","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[],"suites":[{"uuid":"d8376a07-8eb2-4e4a-b9bb-9413a8b68626","title":"static version()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work with pyatv [L]","fullTitle":"NodePyATVInstance static version() should work with pyatv [L]","timedOut":false,"duration":683,"state":"passed","speed":"slow","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n this.timeout(4000);\n const result = yield index_1.default.version();\n if (result.pyatv === null) {\n throw new Error('No version found for pyatv. Is it installed in test environment?');\n }\n assert_1.default.equal(typeof result.pyatv, 'string', 'result.pyatv is a string');\n assert_1.default.ok(result.pyatv.length >= 5, 'result.pyatv has content');\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n assert_1.default.strictEqual(result.module, require(__dirname + '/../package.json').version || null);\n});","err":{},"uuid":"bde93e87-49d5-423e-9412-8aee7cda14f0","parentUUID":"d8376a07-8eb2-4e4a-b9bb-9413a8b68626","isHook":false,"skipped":false},{"title":"should return the pyatv version","fullTitle":"NodePyATVInstance static version() should return the pyatv version","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.code(1);\n cp.end('atvremote 0.7.4');\n })\n });\n assert_1.default.ok(result.pyatv);\n assert_1.default.strictEqual(result.pyatv, '0.7.4');\n});","err":{},"uuid":"c009c1ca-371e-4a33-a16c-fc929e6592fa","parentUUID":"d8376a07-8eb2-4e4a-b9bb-9413a8b68626","isHook":false,"skipped":false},{"title":"should return the module version","fullTitle":"NodePyATVInstance static version() should return the module version","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n noColors: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n assert_1.default.strictEqual(result.module, require(__dirname + '/../package.json').version || null);\n});","err":{},"uuid":"b0dcf7b0-262b-48a3-a4a9-26d8229fbc7f","parentUUID":"d8376a07-8eb2-4e4a-b9bb-9413a8b68626","isHook":false,"skipped":false},{"title":"should handle option.atvremotePath","fullTitle":"NodePyATVInstance static version() should handle option.atvremotePath","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n atvremotePath: '/foo/bar',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), '/foo/bar');\n cp.code(1).end();\n })\n });\n});","err":{},"uuid":"cebccf82-30c8-486b-b5eb-b25cd37bec13","parentUUID":"d8376a07-8eb2-4e4a-b9bb-9413a8b68626","isHook":false,"skipped":false},{"title":"should work with option.debug = true","fullTitle":"NodePyATVInstance static version() should work with option.debug = true","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n debug: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n});","err":{},"uuid":"dad23fc9-16fe-4524-a127-cc46135106a4","parentUUID":"d8376a07-8eb2-4e4a-b9bb-9413a8b68626","isHook":false,"skipped":false},{"title":"should work with option.noColors","fullTitle":"NodePyATVInstance static version() should work with option.noColors","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.version({\n debug: () => { },\n noColors: true,\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.code(1).end())\n });\n});","err":{},"uuid":"22fb6ef8-0c1f-40bf-bd12-3bb2fc57d31a","parentUUID":"d8376a07-8eb2-4e4a-b9bb-9413a8b68626","isHook":false,"skipped":false},{"title":"should return null on pyatv stderr output","fullTitle":"NodePyATVInstance static version() should return null on pyatv stderr output","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => cp.stderr('Hello World!').code(123).end())\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});","err":{},"uuid":"7e099935-0384-4211-9ed7-ce4827f9b5f5","parentUUID":"d8376a07-8eb2-4e4a-b9bb-9413a8b68626","isHook":false,"skipped":false},{"title":"should return null on pyatv error","fullTitle":"NodePyATVInstance static version() should return null on pyatv error","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('Hello world!')).end();\n })\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});","err":{},"uuid":"bffd869d-e7e8-4f1d-9f4e-df135c89ef66","parentUUID":"d8376a07-8eb2-4e4a-b9bb-9413a8b68626","isHook":false,"skipped":false},{"title":"should return null on invalid pyatv version","fullTitle":"NodePyATVInstance static version() should return null on invalid pyatv version","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 42').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.pyatv, null);\n});","err":{},"uuid":"fdcf4108-1df5-4825-9b8e-d08c78b2be0f","parentUUID":"d8376a07-8eb2-4e4a-b9bb-9413a8b68626","isHook":false,"skipped":false},{"title":"should return null on empty module version","fullTitle":"NodePyATVInstance static version() should return null on empty module version","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const path = require.resolve(__dirname + '/../package.json');\n require(path);\n const cache = require.cache[path];\n assert_1.default.ok(cache, 'package.json is in require cache');\n cache.exports = {};\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.7.4').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.module, null);\n});","err":{},"uuid":"7bc1225f-249d-47e9-b7eb-63ac9eced819","parentUUID":"d8376a07-8eb2-4e4a-b9bb-9413a8b68626","isHook":false,"skipped":false},{"title":"should return null on invalid module version","fullTitle":"NodePyATVInstance static version() should return null on invalid module version","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const path = require.resolve(__dirname + '/../package.json');\n require(path);\n const cache = require.cache[path];\n assert_1.default.ok(cache, 'package.json is in require cache');\n cache.exports = { version: 42 };\n const result = yield index_1.default.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.7.4').code(1).end();\n })\n });\n assert_1.default.strictEqual(result.module, null);\n});","err":{},"uuid":"6a1b0ed0-ac12-4ed7-97ac-ecc3c298556f","parentUUID":"d8376a07-8eb2-4e4a-b9bb-9413a8b68626","isHook":false,"skipped":false}],"suites":[],"passes":["bde93e87-49d5-423e-9412-8aee7cda14f0","c009c1ca-371e-4a33-a16c-fc929e6592fa","b0dcf7b0-262b-48a3-a4a9-26d8229fbc7f","cebccf82-30c8-486b-b5eb-b25cd37bec13","dad23fc9-16fe-4524-a127-cc46135106a4","22fb6ef8-0c1f-40bf-bd12-3bb2fc57d31a","7e099935-0384-4211-9ed7-ce4827f9b5f5","bffd869d-e7e8-4f1d-9f4e-df135c89ef66","fdcf4108-1df5-4825-9b8e-d08c78b2be0f","7bc1225f-249d-47e9-b7eb-63ac9eced819","6a1b0ed0-ac12-4ed7-97ac-ecc3c298556f"],"failures":[],"pending":[],"skipped":[],"duration":698,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"cf7512f0-a3b3-4ed0-b6b7-fc5597e45dba","title":"static check()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should resolve in test environment [L]","fullTitle":"NodePyATVInstance static check() should resolve in test environment [L]","timedOut":false,"duration":5881,"state":"passed","speed":"slow","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n this.timeout(12000);\n yield index_1.default.check();\n});","err":{},"uuid":"3bd6b99f-308b-4db6-bf5f-10d33e0a9f2e","parentUUID":"cf7512f0-a3b3-4ed0-b6b7-fc5597e45dba","isHook":false,"skipped":false},{"title":"should return nice error message if pyatv was not found","fullTitle":"NodePyATVInstance static check() should return nice error message if pyatv was not found","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});","err":{},"uuid":"a9e094d8-90ca-4b9f-bbac-120aab41f994","parentUUID":"cf7512f0-a3b3-4ed0-b6b7-fc5597e45dba","isHook":false,"skipped":false},{"title":"should return nice error message if myatv is too old","fullTitle":"NodePyATVInstance static check() should return nice error message if myatv is too old","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout('atvremote 0.5.1').code(1).end();\n })\n });\n }), /Found pyatv, but unforunately it's too old. Please update pyatv./);\n});","err":{},"uuid":"47ed9b2e-c0f4-420a-b352-5ce33f3f9ea5","parentUUID":"cf7512f0-a3b3-4ed0-b6b7-fc5597e45dba","isHook":false,"skipped":false},{"title":"should return nice error message if scan failed","fullTitle":"NodePyATVInstance static check() should return nice error message if scan failed","timedOut":false,"duration":3,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n let i = 0;\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n if (i === 0) {\n cp.stdout('atvremote 0.7.0').code(1).end();\n i++;\n }\n else {\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n }\n })\n });\n }), /Unable to scan for devices/);\n});","err":{},"uuid":"d1e27c87-d1b4-4015-9ec0-da01361eb3ea","parentUUID":"cf7512f0-a3b3-4ed0-b6b7-fc5597e45dba","isHook":false,"skipped":false}],"suites":[],"passes":["3bd6b99f-308b-4db6-bf5f-10d33e0a9f2e","a9e094d8-90ca-4b9f-bbac-120aab41f994","47ed9b2e-c0f4-420a-b352-5ce33f3f9ea5","d1e27c87-d1b4-4015-9ec0-da01361eb3ea"],"failures":[],"pending":[],"skipped":[],"duration":5888,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"4ad6b81a-4a80-417a-a05d-278c304e7543","title":"static find()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work [L]","fullTitle":"NodePyATVInstance static find() should work [L]","timedOut":false,"duration":5442,"state":"passed","speed":"slow","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n this.timeout(8000);\n const result = yield index_1.default.find();\n assert_1.default.ok(Array.isArray(result));\n});","err":{},"uuid":"9fd80e5d-6f3c-4caf-a49b-8545cd9337fc","parentUUID":"4ad6b81a-4a80-417a-a05d-278c304e7543","isHook":false,"skipped":false},{"title":"should handle option.atvscriptPath","fullTitle":"NodePyATVInstance static find() should handle option.atvscriptPath","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n atvscriptPath: '/foo/bar',\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), '/foo/bar');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});","err":{},"uuid":"4961efec-2363-4d58-a846-822fe858749e","parentUUID":"4ad6b81a-4a80-417a-a05d-278c304e7543","isHook":false,"skipped":false},{"title":"should throw error on stderr output","fullTitle":"NodePyATVInstance static find() should throw error on stderr output","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stderr('Hello World!').code(1).end();\n })\n });\n }), /Unable to execute request/);\n});","err":{},"uuid":"92e18c69-9eea-45a6-a4f1-797dfd20e2fe","parentUUID":"4ad6b81a-4a80-417a-a05d-278c304e7543","isHook":false,"skipped":false},{"title":"should throw error on error","fullTitle":"NodePyATVInstance static find() should throw error on error","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.error(new Error('Hello world!')).code(1).end();\n })\n });\n }), /Hello world!/);\n});","err":{},"uuid":"6dca71ea-aca6-492f-b001-4f62b35a11be","parentUUID":"4ad6b81a-4a80-417a-a05d-278c304e7543","isHook":false,"skipped":false},{"title":"should throw error if atvscript result is not valid json","fullTitle":"NodePyATVInstance static find() should throw error if atvscript result is not valid json","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout(JSON.stringify({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).substr(1)).end();\n })\n });\n }), /Unable to parse result/);\n});","err":{},"uuid":"3a9d1e3a-eb8b-4214-8cac-902935be014a","parentUUID":"4ad6b81a-4a80-417a-a05d-278c304e7543","isHook":false,"skipped":false},{"title":"should throw error if atvscript result is not successfull","fullTitle":"NodePyATVInstance static find() should throw error if atvscript result is not successfull","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout({\n result: 'error'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});","err":{},"uuid":"1bc0b4bc-1a95-44db-92dd-d4cdc2873064","parentUUID":"4ad6b81a-4a80-417a-a05d-278c304e7543","isHook":false,"skipped":false},{"title":"should throw error if atvscript result is without device array","fullTitle":"NodePyATVInstance static find() should throw error if atvscript result is without device array","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield index_1.default.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n cp.stdout({\n result: 'success'\n }).code(1).end();\n })\n });\n }), /Unable to parse pyatv response: /);\n});","err":{},"uuid":"bd6dc2d6-b4a8-4772-9b0c-8cd75a205745","parentUUID":"4ad6b81a-4a80-417a-a05d-278c304e7543","isHook":false,"skipped":false}],"suites":[],"passes":["9fd80e5d-6f3c-4caf-a49b-8545cd9337fc","4961efec-2363-4d58-a846-822fe858749e","92e18c69-9eea-45a6-a4f1-797dfd20e2fe","6dca71ea-aca6-492f-b001-4f62b35a11be","3a9d1e3a-eb8b-4214-8cac-902935be014a","1bc0b4bc-1a95-44db-92dd-d4cdc2873064","bd6dc2d6-b4a8-4772-9b0c-8cd75a205745"],"failures":[],"pending":[],"skipped":[],"duration":5449,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"9b04a9e7-8618-46d9-9f74-920da58ded9d","title":"static device()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should pass options to constructor","fullTitle":"NodePyATVInstance static device() should pass options to constructor","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const device = index_1.default.device({ host: '192.168.178.6', name: 'My Testdevice' });\nassert_1.default.strictEqual(device.host, '192.168.178.6');\nassert_1.default.strictEqual(device.name, 'My Testdevice');","err":{},"uuid":"d495ce27-7547-487c-b3d5-9596a6564f99","parentUUID":"9b04a9e7-8618-46d9-9f74-920da58ded9d","isHook":false,"skipped":false}],"suites":[],"passes":["d495ce27-7547-487c-b3d5-9596a6564f99"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"3103e135-1983-402f-9654-1e94f174d12e","title":"version()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should merge options from constructor","fullTitle":"NodePyATVInstance version() should merge options from constructor","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvremotePath: 'test' });\n yield i.version({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.code(1).end();\n })\n });\n});","err":{},"uuid":"f64c2f00-addc-4395-b61c-c554a155cc82","parentUUID":"3103e135-1983-402f-9654-1e94f174d12e","isHook":false,"skipped":false}],"suites":[],"passes":["f64c2f00-addc-4395-b61c-c554a155cc82"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"b8c1d033-82c0-4b12-b272-1c8cc0347db2","title":"check()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should merge options from constructor","fullTitle":"NodePyATVInstance check() should merge options from constructor","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvremotePath: 'test' });\n yield assert_1.default.rejects(() => __awaiter(this, void 0, void 0, function* () {\n yield i.check({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.error(new Error('spawn atvremote ENOENT')).code(1).end();\n })\n });\n }), /Unable to find pyatv. Is it installed?/);\n});","err":{},"uuid":"28e0155c-e5de-4e3d-910e-7604483e01f9","parentUUID":"b8c1d033-82c0-4b12-b272-1c8cc0347db2","isHook":false,"skipped":false}],"suites":[],"passes":["28e0155c-e5de-4e3d-910e-7604483e01f9"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"34acfb0e-d7bb-4a01-9114-cba946e22767","title":"find()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should merge options from constructor","fullTitle":"NodePyATVInstance find() should merge options from constructor","timedOut":false,"duration":2,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ atvscriptPath: 'test' });\n yield i.find({\n spawn: (0, fake_spawn_1.createFakeSpawn)(cp => {\n assert_1.default.strictEqual(cp.cmd(), 'test');\n cp.stdout({\n 'result': 'success',\n 'datetime': '2020-11-06T20:47:30.840022+01:00',\n 'devices': []\n }).end();\n })\n });\n});","err":{},"uuid":"cf479b1c-1f57-42d1-8b7f-96fd4da2ce50","parentUUID":"34acfb0e-d7bb-4a01-9114-cba946e22767","isHook":false,"skipped":false}],"suites":[],"passes":["cf479b1c-1f57-42d1-8b7f-96fd4da2ce50"],"failures":[],"pending":[],"skipped":[],"duration":2,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"ceab2fd6-3bc6-4fbe-adf6-4a8e946e7ee3","title":"device()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should merge options from constructor","fullTitle":"NodePyATVInstance device() should merge options from constructor","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const i = new index_1.default({ debug: true });\n const d = i.device({ name: 'My Testdevice', host: '192.168.178.2' });\n assert_1.default.deepStrictEqual(d.debug, true);\n});","err":{},"uuid":"2e0b74c1-a74e-4f81-8e14-3c9f20e7718c","parentUUID":"ceab2fd6-3bc6-4fbe-adf6-4a8e946e7ee3","isHook":false,"skipped":false}],"suites":[],"passes":["2e0b74c1-a74e-4f81-8e14-3c9f20e7718c"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"d2f0977a-2a95-455e-a238-f11c25794fae","title":"Type Exports","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/instance.ts","file":"/test/instance.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"Type NodePyATVProtocol should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVProtocol should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVProtocol);","err":{},"uuid":"4a4bda08-8d32-4d78-b2e1-ce45b884fae0","parentUUID":"d2f0977a-2a95-455e-a238-f11c25794fae","isHook":false,"skipped":false},{"title":"Type NodePyATVMediaType should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVMediaType should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVMediaType);","err":{},"uuid":"a824cd9e-4d8c-4516-b68b-5d7777a0123f","parentUUID":"d2f0977a-2a95-455e-a238-f11c25794fae","isHook":false,"skipped":false},{"title":"Type NodePyATVDeviceEvent should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVDeviceEvent should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVDeviceEvent);","err":{},"uuid":"35ac0dd2-a7b3-4ae9-af85-2c00e5864039","parentUUID":"d2f0977a-2a95-455e-a238-f11c25794fae","isHook":false,"skipped":false},{"title":"Type NodePyATVDeviceState should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVDeviceState should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVDeviceState);","err":{},"uuid":"76e6ed08-80a0-4e63-b6c6-5da87d9ac4ab","parentUUID":"d2f0977a-2a95-455e-a238-f11c25794fae","isHook":false,"skipped":false},{"title":"Type NodePyATVRepeatState should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVRepeatState should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVRepeatState);","err":{},"uuid":"db7147c1-a42a-4769-ac1e-9f03095a077f","parentUUID":"d2f0977a-2a95-455e-a238-f11c25794fae","isHook":false,"skipped":false},{"title":"Type NodePyATVShuffleState should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVShuffleState should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVShuffleState);","err":{},"uuid":"0ac986a6-46a4-45fa-bff2-a74bb8f99876","parentUUID":"d2f0977a-2a95-455e-a238-f11c25794fae","isHook":false,"skipped":false},{"title":"Type NodePyATVKeys should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVKeys should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVKeys);","err":{},"uuid":"287c1659-1661-4d36-9678-9019c5b805f6","parentUUID":"d2f0977a-2a95-455e-a238-f11c25794fae","isHook":false,"skipped":false},{"title":"Type NodePyATVInstanceOptions should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVInstanceOptions should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVListenerState);","err":{},"uuid":"303ef86e-94a6-4437-a5e0-885d088ef102","parentUUID":"d2f0977a-2a95-455e-a238-f11c25794fae","isHook":false,"skipped":false},{"title":"Type NodePyATVPowerState should be exported","fullTitle":"NodePyATVInstance Type Exports Type NodePyATVPowerState should be exported","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"assert_1.default.ok(index_1.NodePyATVPowerState);","err":{},"uuid":"6598080c-1461-4406-b24c-84cfe720a4cb","parentUUID":"d2f0977a-2a95-455e-a238-f11c25794fae","isHook":false,"skipped":false}],"suites":[],"passes":["4a4bda08-8d32-4d78-b2e1-ce45b884fae0","a824cd9e-4d8c-4516-b68b-5d7777a0123f","35ac0dd2-a7b3-4ae9-af85-2c00e5864039","76e6ed08-80a0-4e63-b6c6-5da87d9ac4ab","db7147c1-a42a-4769-ac1e-9f03095a077f","0ac986a6-46a4-45fa-bff2-a74bb8f99876","287c1659-1661-4d36-9678-9019c5b805f6","303ef86e-94a6-4437-a5e0-885d088ef102","6598080c-1461-4406-b24c-84cfe720a4cb"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000}],"passes":[],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"26536cdd-ddbb-46af-ab9a-6184e2fd40a1","title":"Tools","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/tools.ts","file":"/test/tools.ts","beforeHooks":[],"afterHooks":[],"tests":[],"suites":[{"uuid":"df5171c3-426d-4b4f-a917-1e22b1f34b77","title":"addRequestId() / removeRequestId()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/tools.ts","file":"/test/tools.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should return a string","fullTitle":"Tools addRequestId() / removeRequestId() should return a string","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const id = (0, tools_1.addRequestId)();\nassert_1.default.strictEqual(typeof id, 'string');\n(0, tools_1.removeRequestId)(id);","err":{},"uuid":"57407bf5-1574-4e5d-bd81-a13ffb0709e8","parentUUID":"df5171c3-426d-4b4f-a917-1e22b1f34b77","isHook":false,"skipped":false},{"title":"should work if given id is not in index","fullTitle":"Tools addRequestId() / removeRequestId() should work if given id is not in index","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"(0, tools_1.removeRequestId)('FOO');","err":{},"uuid":"5a28f79e-30ba-4fa9-b542-f6c4902f9874","parentUUID":"df5171c3-426d-4b4f-a917-1e22b1f34b77","isHook":false,"skipped":false}],"suites":[],"passes":["57407bf5-1574-4e5d-bd81-a13ffb0709e8","5a28f79e-30ba-4fa9-b542-f6c4902f9874"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"917969c3-44e5-4931-b6f5-6ba9ffde86ad","title":"debug()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/tools.ts","file":"/test/tools.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work without any options","fullTitle":"Tools debug() should work without any options","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"(0, tools_1.debug)('TEST', 'Hello World.', {});","err":{},"uuid":"2916960e-c12a-4713-b12f-b03ca983a583","parentUUID":"917969c3-44e5-4931-b6f5-6ba9ffde86ad","isHook":false,"skipped":false},{"title":"should work with default logger","fullTitle":"Tools debug() should work with default logger","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"(0, tools_1.debug)('TEST', 'Hello World.', { debug: true });","err":{},"uuid":"8a67ce71-6bd8-40d6-bf8b-243bf1cbb10e","parentUUID":"917969c3-44e5-4931-b6f5-6ba9ffde86ad","isHook":false,"skipped":false},{"title":"should work with custom logger","fullTitle":"Tools debug() should work with custom logger","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"(0, tools_1.debug)('TEST', 'Hello World.', {\n debug: function (msg) {\n assert_1.default.strictEqual(this, null);\n assert_1.default.ok(msg.includes('Hello World'));\n }\n});","err":{},"uuid":"ace799f1-df29-43a5-96d8-4f70ac6f8554","parentUUID":"917969c3-44e5-4931-b6f5-6ba9ffde86ad","isHook":false,"skipped":false},{"title":"should work with colors disabled","fullTitle":"Tools debug() should work with colors disabled","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"(0, tools_1.debug)('TEST', 'Hello World.', { noColors: true });","err":{},"uuid":"3806b50e-3327-4160-bb87-01558cd135c3","parentUUID":"917969c3-44e5-4931-b6f5-6ba9ffde86ad","isHook":false,"skipped":false},{"title":"should work with custom logger and colors disabled","fullTitle":"Tools debug() should work with custom logger and colors disabled","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"(0, tools_1.debug)('TEST', 'Hello World.', {\n noColors: true,\n debug: function (msg) {\n assert_1.default.strictEqual(this, null);\n assert_1.default.strictEqual(msg, '[node-pyatv][TEST] Hello World.');\n }\n});","err":{},"uuid":"279b7c15-cd6b-4d04-91d1-c32e23a92f88","parentUUID":"917969c3-44e5-4931-b6f5-6ba9ffde86ad","isHook":false,"skipped":false}],"suites":[],"passes":["2916960e-c12a-4713-b12f-b03ca983a583","8a67ce71-6bd8-40d6-bf8b-243bf1cbb10e","ace799f1-df29-43a5-96d8-4f70ac6f8554","3806b50e-3327-4160-bb87-01558cd135c3","279b7c15-cd6b-4d04-91d1-c32e23a92f88"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"75dc20f4-8cf0-4ba7-b291-c3400a30305d","title":"getExecutable()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/tools.ts","file":"/test/tools.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should handle atvremotePath if set","fullTitle":"Tools getExecutable() should handle atvremotePath if set","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvremote, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert_1.default.strictEqual(result, '/tmp/1');","err":{},"uuid":"51d4c667-37f0-45cd-8afa-0f91b9b6725b","parentUUID":"75dc20f4-8cf0-4ba7-b291-c3400a30305d","isHook":false,"skipped":false},{"title":"should handle atvscriptPath if set","fullTitle":"Tools getExecutable() should handle atvscriptPath if set","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp/1',\n atvscriptPath: '/tmp/2'\n});\nassert_1.default.strictEqual(result, '/tmp/2');","err":{},"uuid":"61ddfbe0-f813-46b2-bfc9-7b0c64024896","parentUUID":"75dc20f4-8cf0-4ba7-b291-c3400a30305d","isHook":false,"skipped":false},{"title":"should handle default for atvremote","fullTitle":"Tools getExecutable() should handle default for atvremote","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvremote, {\n atvscriptPath: '/tmp'\n});\nassert_1.default.strictEqual(result, 'atvremote');","err":{},"uuid":"8ba984bc-8f0c-4d30-97f2-2413706c0f95","parentUUID":"75dc20f4-8cf0-4ba7-b291-c3400a30305d","isHook":false,"skipped":false},{"title":"should handle default for atvscript","fullTitle":"Tools getExecutable() should handle default for atvscript","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const result = (0, tools_1.getExecutable)(types_1.NodePyATVExecutableType.atvscript, {\n atvremotePath: '/tmp'\n});\nassert_1.default.strictEqual(result, 'atvscript');","err":{},"uuid":"74c93663-a438-4f44-8d16-6321038330a5","parentUUID":"75dc20f4-8cf0-4ba7-b291-c3400a30305d","isHook":false,"skipped":false}],"suites":[],"passes":["51d4c667-37f0-45cd-8afa-0f91b9b6725b","61ddfbe0-f813-46b2-bfc9-7b0c64024896","8ba984bc-8f0c-4d30-97f2-2413706c0f95","74c93663-a438-4f44-8d16-6321038330a5"],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"cde5c4ea-86f0-45de-8db6-7567849d8aab","title":"getParameters()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/tools.ts","file":"/test/tools.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"empty case","fullTitle":"Tools getParameters() empty case","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)();\n assert_1.default.deepEqual(result, []);\n});","err":{},"uuid":"0184b681-7bf6-4481-a23c-c044733db160","parentUUID":"cde5c4ea-86f0-45de-8db6-7567849d8aab","isHook":false,"skipped":false},{"title":"easy case","fullTitle":"Tools getParameters() easy case","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)({\n host: '192.168.178.2'\n });\n assert_1.default.deepEqual(result, ['-s', '192.168.178.2']);\n});","err":{},"uuid":"ce2ed557-3eed-4698-a8a0-2446160253dc","parentUUID":"cde5c4ea-86f0-45de-8db6-7567849d8aab","isHook":false,"skipped":false},{"title":"full case","fullTitle":"Tools getParameters() full case","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"return __awaiter(this, void 0, void 0, function* () {\n const result = yield (0, tools_1.getParamters)({\n hosts: ['192.168.178.2', '192.168.178.3'],\n id: '****',\n protocol: types_1.NodePyATVProtocol.mrp,\n dmapCredentials: '****',\n mrpCredentials: '****',\n airplayCredentials: '****',\n companionCredentials: '1234',\n raopCredentials: '::foo:'\n });\n assert_1.default.deepEqual(result, [\n '-s', '192.168.178.2,192.168.178.3',\n '-i', '****',\n '--protocol', 'mrp',\n '--dmap-credentials', '****',\n '--mrp-credentials', '****',\n '--airplay-credentials', '****',\n '--companion-credentials', '1234',\n '--raop-credentials', '::foo:'\n ]);\n});","err":{},"uuid":"4d03d97a-b057-4fb3-a672-a97c4d145443","parentUUID":"cde5c4ea-86f0-45de-8db6-7567849d8aab","isHook":false,"skipped":false}],"suites":[],"passes":["0184b681-7bf6-4481-a23c-c044733db160","ce2ed557-3eed-4698-a8a0-2446160253dc","4d03d97a-b057-4fb3-a672-a97c4d145443"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000},{"uuid":"1c68dc90-f1d7-4295-b2a8-36f2587e7d28","title":"parseState()","fullFile":"/home/runner/work/node-pyatv/node-pyatv/test/tools.ts","file":"/test/tools.ts","beforeHooks":[],"afterHooks":[],"tests":[{"title":"should work with empty data","fullTitle":"Tools parseState() should work with empty data","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const input = {};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});","err":{},"uuid":"62ca1b27-15c2-4e1b-918e-9a1f28fce370","parentUUID":"1c68dc90-f1d7-4295-b2a8-36f2587e7d28","isHook":false,"skipped":false},{"title":"should work without data","fullTitle":"Tools parseState() should work without data","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"// @ts-ignore\nconst result = (0, tools_1.parseState)(null, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});","err":{},"uuid":"cc6df7aa-f515-4544-ab42-9e65b5028d80","parentUUID":"1c68dc90-f1d7-4295-b2a8-36f2587e7d28","isHook":false,"skipped":false},{"title":"should work with example data","fullTitle":"Tools parseState() should work with example data","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const input = {\n result: 'success',\n datetime: '2020-11-07T22:38:43.608030+01:00',\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n media_type: 'video',\n device_state: 'playing',\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n total_time: 8097,\n position: 27,\n shuffle: 'off',\n repeat: 'off',\n app: 'Disney+',\n app_id: 'com.disney.disneyplus',\n powerState: null\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: new Date('2020-11-07T22:38:43.608030+01:00'),\n hash: '100e0ab6-6ff5-4199-9c04-a7107ff78712',\n mediaType: types_1.NodePyATVMediaType.video,\n deviceState: types_1.NodePyATVDeviceState.playing,\n title: 'Solo: A Star Wars Story',\n artist: null,\n album: null,\n genre: null,\n totalTime: 8097,\n position: 27,\n shuffle: types_1.NodePyATVShuffleState.off,\n repeat: types_1.NodePyATVRepeatState.off,\n app: 'Disney+',\n appId: 'com.disney.disneyplus',\n powerState: null\n});","err":{},"uuid":"31600746-565d-4b12-9e5b-d8fd95cc0d3d","parentUUID":"1c68dc90-f1d7-4295-b2a8-36f2587e7d28","isHook":false,"skipped":false},{"title":"should throw an error for pyatv exceptions","fullTitle":"Tools parseState() should throw an error for pyatv exceptions","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const input = {\n result: 'failure',\n datetime: '2021-11-24T21:13:36.424576+03:00',\n exception: 'invalid credentials: 321',\n stacktrace: 'Traceback (most recent call last):\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 302, in appstart\\n print(args.output(await _handle_command(args, abort_sem, loop)), flush=True)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/scripts/atvscript.py\\\", line 196, in _handle_command\\n atv = await connect(config, loop, protocol=Protocol.MRP)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/__init__.py\\\", line 96, in connect\\n for setup_data in proto_methods.setup(\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 192, in setup\\n stream = AirPlayStream(config, service)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/protocols/airplay/__init__.py\\\", line 79, in __init__\\n self._credentials: HapCredentials = parse_credentials(self.service.credentials)\\n File \\\"/Users/free/Library/Python/3.8/lib/python/site-packages/pyatv/auth/hap_pairing.py\\\", line 139, in parse_credentials\\n raise exceptions.InvalidCredentialsError(\\\"invalid credentials: \\\" + detail_string)\\npyatv.exceptions.InvalidCredentialsError: invalid credentials: 321\\n'\n};\nassert_1.default.throws(() => {\n (0, tools_1.parseState)(input, '', {});\n}, /Got pyatv Error: invalid credentials: 321/);","err":{},"uuid":"ab38b0f9-cee0-4360-800e-2438cf6e8a24","parentUUID":"1c68dc90-f1d7-4295-b2a8-36f2587e7d28","isHook":false,"skipped":false},{"title":"should ignore date if it's an invalid date","fullTitle":"Tools parseState() should ignore date if it's an invalid date","timedOut":false,"duration":1,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const input = { datetime: 'today' };\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});","err":{},"uuid":"3391dc03-000c-487e-9c31-4e359f64d60e","parentUUID":"1c68dc90-f1d7-4295-b2a8-36f2587e7d28","isHook":false,"skipped":false},{"title":"should ignore data if unsupported type","fullTitle":"Tools parseState() should ignore data if unsupported type","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const input = {\n result: 'success',\n datetime: true,\n hash: 1337,\n media_type: false,\n device_state: 43,\n title: undefined,\n artist: 90,\n album: Infinity,\n genre: Math.PI,\n total_time: '23min',\n position: '0:30.123',\n shuffle: false,\n repeat: true,\n app: 0,\n app_id: 891645381647289,\n powerState: null\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});","err":{},"uuid":"90f317b4-ebc5-4144-a616-85a9e53ed810","parentUUID":"1c68dc90-f1d7-4295-b2a8-36f2587e7d28","isHook":false,"skipped":false},{"title":"should ignore enums with unsupported valid","fullTitle":"Tools parseState() should ignore enums with unsupported valid","timedOut":false,"duration":0,"state":"passed","speed":"fast","pass":true,"fail":false,"pending":false,"code":"const input = {\n media_type: '3d-experience',\n device_state: 'initiating',\n shuffle: 'everything',\n repeat: 'nothing'\n};\nconst result = (0, tools_1.parseState)(input, '', {});\nassert_1.default.deepStrictEqual(result, {\n dateTime: null,\n hash: null,\n mediaType: null,\n deviceState: null,\n title: null,\n artist: null,\n album: null,\n genre: null,\n totalTime: null,\n position: null,\n shuffle: null,\n repeat: null,\n app: null,\n appId: null,\n powerState: null\n});","err":{},"uuid":"a82fd440-a6b3-445b-9aa0-5c7f8eab37d0","parentUUID":"1c68dc90-f1d7-4295-b2a8-36f2587e7d28","isHook":false,"skipped":false}],"suites":[],"passes":["62ca1b27-15c2-4e1b-918e-9a1f28fce370","cc6df7aa-f515-4544-ab42-9e65b5028d80","31600746-565d-4b12-9e5b-d8fd95cc0d3d","ab38b0f9-cee0-4360-800e-2438cf6e8a24","3391dc03-000c-487e-9c31-4e359f64d60e","90f317b4-ebc5-4144-a616-85a9e53ed810","a82fd440-a6b3-445b-9aa0-5c7f8eab37d0"],"failures":[],"pending":[],"skipped":[],"duration":1,"root":false,"rootEmpty":false,"_timeout":2000}],"passes":[],"failures":[],"pending":[],"skipped":[],"duration":0,"root":false,"rootEmpty":false,"_timeout":2000}],"passes":[],"failures":[],"pending":[],"skipped":[],"duration":0,"root":true,"rootEmpty":true,"_timeout":2000}],"meta":{"mocha":{"version":"9.1.3"},"mochawesome":{"options":{"quiet":false,"reportFilename":"mochawesome","saveHtml":true,"saveJson":true,"consoleReporter":"spec","useInlineDiffs":false,"code":true},"version":"7.0.1"},"marge":{"version":"6.0.1"}}}" data-config="{"reportFilename":"mochawesome","reportDir":"mochawesome-report","reportTitle":"node-pyatv","reportPageTitle":"Mochawesome Report","inline":false,"inlineAssets":false,"cdn":false,"charts":false,"enableCharts":false,"code":true,"enableCode":true,"autoOpen":false,"overwrite":true,"timestamp":false,"ts":false,"showPassed":true,"showFailed":true,"showPending":true,"showSkipped":false,"showHooks":"failed","saveJson":true,"saveHtml":true,"dev":false,"assetsDir":"mochawesome-report/assets","jsonFile":"/home/runner/work/node-pyatv/node-pyatv/mochawesome-report/mochawesome.json","htmlFile":"/home/runner/work/node-pyatv/node-pyatv/mochawesome-report/mochawesome.html"}"><div id="report"></div><script src="assets/app.js"></script></body></html>
|