@sebbo2002/node-pyatv 4.1.1-develop.1 → 4.2.1-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -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 +700 -605
- package/package.json +17 -17
- 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/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"author": "Sebastian Pekarek <
|
|
2
|
+
"author": "Sebastian Pekarek <mail@sebbo.net>",
|
|
3
3
|
"bugs": {
|
|
4
4
|
"email": "sheeboothohmoolaiquu@e.sebbo.net",
|
|
5
5
|
"url": "http://github.com/sebbo2002/node-pyatv/issues"
|
|
@@ -10,27 +10,27 @@
|
|
|
10
10
|
"description": "A lightweight wrapper around pyatv…",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@amanda-mitchell/semantic-release-npm-multiple": "^2.15.0",
|
|
13
|
-
"@qiwi/semantic-release-gh-pages-plugin": "^5.
|
|
14
|
-
"@semantic-release/changelog": "^6.0.
|
|
15
|
-
"@semantic-release/exec": "^6.0.
|
|
16
|
-
"@semantic-release/git": "^10.0.
|
|
13
|
+
"@qiwi/semantic-release-gh-pages-plugin": "^5.2.0",
|
|
14
|
+
"@semantic-release/changelog": "^6.0.1",
|
|
15
|
+
"@semantic-release/exec": "^6.0.2",
|
|
16
|
+
"@semantic-release/git": "^10.0.1",
|
|
17
17
|
"@types/mocha": "^9.0.0",
|
|
18
|
-
"@types/node": "^16.11.
|
|
18
|
+
"@types/node": "^16.11.10",
|
|
19
19
|
"@types/semver": "^7.3.9",
|
|
20
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
21
|
-
"@typescript-eslint/parser": "^5.
|
|
22
|
-
"eslint": "^8.0
|
|
23
|
-
"eslint-plugin-jsonc": "^
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
21
|
+
"@typescript-eslint/parser": "^5.4.0",
|
|
22
|
+
"eslint": "^8.3.0",
|
|
23
|
+
"eslint-plugin-jsonc": "^2.0.0",
|
|
24
24
|
"license-checker": "^25.0.1",
|
|
25
25
|
"mocha": "^9.1.3",
|
|
26
|
-
"mochawesome": "^
|
|
26
|
+
"mochawesome": "^7.0.1",
|
|
27
27
|
"nyc": "^15.1.0",
|
|
28
|
-
"semantic-release": "^18.0.
|
|
28
|
+
"semantic-release": "^18.0.1",
|
|
29
29
|
"semantic-release-license": "^1.0.3",
|
|
30
|
-
"source-map-support": "^0.5.
|
|
31
|
-
"ts-node": "^10.
|
|
32
|
-
"typedoc": "^0.22.
|
|
33
|
-
"typescript": "^4.
|
|
30
|
+
"source-map-support": "^0.5.21",
|
|
31
|
+
"ts-node": "^10.4.0",
|
|
32
|
+
"typedoc": "^0.22.10",
|
|
33
|
+
"typescript": "^4.5.2"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=12.0.0"
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"postinstall": "./check.sh",
|
|
56
56
|
"test": "mocha"
|
|
57
57
|
},
|
|
58
|
-
"version": "4.
|
|
58
|
+
"version": "4.2.1-develop.1"
|
|
59
59
|
}
|
package/src/lib/device-event.ts
CHANGED
package/src/lib/device-events.ts
CHANGED
|
@@ -11,8 +11,7 @@ import {
|
|
|
11
11
|
import {ChildProcess} from 'child_process';
|
|
12
12
|
|
|
13
13
|
import {EventEmitter} from 'events';
|
|
14
|
-
import NodePyATVDevice from '
|
|
15
|
-
import NodePyATVDeviceEvent from './device-event';
|
|
14
|
+
import {NodePyATVDevice, NodePyATVDeviceEvent} from '../lib';
|
|
16
15
|
import {addRequestId, debug, execute, getParamters, parseState, removeRequestId} from './tools';
|
|
17
16
|
import {FakeChildProcess} from './fake-spawn';
|
|
18
17
|
|
|
@@ -91,8 +90,13 @@ export default class NodePyATVDeviceEvents extends EventEmitter {
|
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
private applyPushUpdate(update: NodePyATVInternalState, reqId: string): void {
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
try {
|
|
94
|
+
const newState = parseState(update, reqId, this.options);
|
|
95
|
+
this.applyStateAndEmitEvents(newState);
|
|
96
|
+
}
|
|
97
|
+
catch(error) {
|
|
98
|
+
this.emit('error', error);
|
|
99
|
+
}
|
|
96
100
|
}
|
|
97
101
|
|
|
98
102
|
private checkListener(): void {
|
package/src/lib/device.ts
CHANGED
|
@@ -14,8 +14,7 @@ import {
|
|
|
14
14
|
} from './types';
|
|
15
15
|
|
|
16
16
|
import {addRequestId, getParamters, parseState, removeRequestId, request} from './tools';
|
|
17
|
-
import NodePyATVDeviceEvents from '
|
|
18
|
-
import NodePyATVDeviceEvent from './device-event';
|
|
17
|
+
import {NodePyATVDeviceEvents, NodePyATVDeviceEvent} from '../lib';
|
|
19
18
|
import { EventEmitter } from 'events';
|
|
20
19
|
|
|
21
20
|
/**
|
|
@@ -148,14 +147,19 @@ export default class NodePyATVDevice implements EventEmitter{
|
|
|
148
147
|
}
|
|
149
148
|
|
|
150
149
|
const id = addRequestId();
|
|
151
|
-
const parameters = getParamters(this.options);
|
|
152
150
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
this.applyState(newState);
|
|
151
|
+
try {
|
|
152
|
+
const parameters = getParamters(this.options);
|
|
156
153
|
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
const result = await request(id, NodePyATVExecutableType.atvscript, [...parameters, 'playing'], this.options);
|
|
155
|
+
const newState = parseState(result, id, this.options);
|
|
156
|
+
|
|
157
|
+
this.applyState(newState);
|
|
158
|
+
return newState;
|
|
159
|
+
}
|
|
160
|
+
finally {
|
|
161
|
+
removeRequestId(id);
|
|
162
|
+
}
|
|
159
163
|
}
|
|
160
164
|
|
|
161
165
|
/**
|
package/src/lib/index.ts
CHANGED
|
@@ -13,9 +13,14 @@ export {
|
|
|
13
13
|
NodePyATVFindAndInstanceOptions,
|
|
14
14
|
NodePyATVDeviceOptions,
|
|
15
15
|
NodePyATVGetStateOptions,
|
|
16
|
-
NodePyATVState
|
|
16
|
+
NodePyATVState,
|
|
17
|
+
NodePyATVPowerState,
|
|
18
|
+
NodePyATVListenerState,
|
|
19
|
+
NodePyATVEventValueType,
|
|
17
20
|
} from './types';
|
|
18
21
|
|
|
19
22
|
export {default as NodePyATVDeviceEvent} from './device-event';
|
|
23
|
+
export {default as NodePyATVDeviceEvents} from './device-events';
|
|
24
|
+
export {default as NodePyATVDevice} from './device';
|
|
20
25
|
|
|
21
26
|
export {default} from './instance';
|
package/src/lib/instance.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from './types';
|
|
12
12
|
|
|
13
13
|
import {addRequestId, debug, getParamters, removeRequestId, request} from './tools';
|
|
14
|
-
import NodePyATVDevice from '
|
|
14
|
+
import {NodePyATVDevice} from '../lib';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Default class exported by `@sebbo2002/node-pyatv`. Use [[find]] to scan for devices in your local network. Use
|
package/src/lib/tools.ts
CHANGED
|
@@ -252,6 +252,14 @@ export function parseState(input: NodePyATVInternalState, id: string, options: N
|
|
|
252
252
|
if (!input || typeof input !== 'object') {
|
|
253
253
|
return result;
|
|
254
254
|
}
|
|
255
|
+
if(input.exception) {
|
|
256
|
+
let errorStr = 'Got pyatv Error: ' + input.exception;
|
|
257
|
+
if(input.stacktrace) {
|
|
258
|
+
errorStr += '\n\npyatv Stacktrace:\n' + input.stacktrace;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
throw new Error(errorStr);
|
|
262
|
+
}
|
|
255
263
|
|
|
256
264
|
// datetime
|
|
257
265
|
if (typeof input.datetime === 'string') {
|
package/src/lib/types.ts
CHANGED
package/test/device-events.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
import assert from 'assert';
|
|
4
|
-
import NodePyATVDevice from '../src/lib/device';
|
|
5
4
|
import {createFakeSpawn} from '../src/lib/fake-spawn';
|
|
6
|
-
import NodePyATVDeviceEvent from '../src/lib
|
|
7
|
-
import {NodePyATVPowerState} from '../src/lib/types';
|
|
5
|
+
import {NodePyATVDeviceEvent, NodePyATVPowerState, NodePyATVDevice} from '../src/lib';
|
|
8
6
|
|
|
9
7
|
describe('NodePyATVDeviceEvents', function () {
|
|
10
8
|
describe('applyStateAndEmitEvents()', function () {
|
|
@@ -89,6 +87,29 @@ describe('NodePyATVDeviceEvents', function () {
|
|
|
89
87
|
|
|
90
88
|
assert.deepStrictEqual(sort, ['update:title', 'update']);
|
|
91
89
|
});
|
|
90
|
+
it('should emit error events on failures', async function () {
|
|
91
|
+
const device = new NodePyATVDevice({
|
|
92
|
+
name: 'My Testdevice',
|
|
93
|
+
host: '192.168.178.2',
|
|
94
|
+
spawn: createFakeSpawn(cp => {
|
|
95
|
+
cp.onStdIn(() => cp.end());
|
|
96
|
+
cp.stdout({
|
|
97
|
+
result: 'failure',
|
|
98
|
+
datetime: '2021-11-24T21:13:36.424576+03:00',
|
|
99
|
+
exception: 'invalid credentials: 321',
|
|
100
|
+
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'
|
|
101
|
+
});
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
await new Promise(cb => {
|
|
106
|
+
device.once('error', error => {
|
|
107
|
+
assert.ok(error instanceof Error);
|
|
108
|
+
assert.ok(error.toString().includes('invalid credentials: 321'));
|
|
109
|
+
cb(undefined);
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
});
|
|
92
113
|
it('should not emit an update if new value is same as old one', async function () {
|
|
93
114
|
let spawnCounter = 0;
|
|
94
115
|
let eventCounter = 0;
|
package/test/device.ts
CHANGED
|
@@ -237,6 +237,24 @@ describe('NodePyATVDevice', function () {
|
|
|
237
237
|
powerState: null
|
|
238
238
|
});
|
|
239
239
|
});
|
|
240
|
+
it('should reject with error if pyatv fails', async function () {
|
|
241
|
+
const device = new NodePyATVDevice({
|
|
242
|
+
name: 'My Testdevice',
|
|
243
|
+
host: '192.168.178.2',
|
|
244
|
+
spawn: createFakeSpawn(cp => {
|
|
245
|
+
cp.end({
|
|
246
|
+
result: 'failure',
|
|
247
|
+
datetime: '2021-11-24T21:13:36.424576+03:00',
|
|
248
|
+
exception: 'invalid credentials: 321',
|
|
249
|
+
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'
|
|
250
|
+
});
|
|
251
|
+
})
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
assert.rejects(async () => {
|
|
255
|
+
await device.getState();
|
|
256
|
+
}, /Got pyatv Error: invalid credentials: 321/);
|
|
257
|
+
});
|
|
240
258
|
it('should cache requests for a bit', async function () {
|
|
241
259
|
let executions = 0;
|
|
242
260
|
const device = new NodePyATVDevice({
|
package/test/instance.ts
CHANGED
|
@@ -9,7 +9,9 @@ import NodePyATVInstance, {
|
|
|
9
9
|
NodePyATVDeviceState,
|
|
10
10
|
NodePyATVRepeatState,
|
|
11
11
|
NodePyATVShuffleState,
|
|
12
|
-
NodePyATVKeys
|
|
12
|
+
NodePyATVKeys,
|
|
13
|
+
NodePyATVListenerState,
|
|
14
|
+
NodePyATVPowerState
|
|
13
15
|
} from '../src/lib/index';
|
|
14
16
|
|
|
15
17
|
describe('NodePyATVInstance', function () {
|
|
@@ -330,5 +332,11 @@ describe('NodePyATVInstance', function () {
|
|
|
330
332
|
it('Type NodePyATVKeys should be exported', function() {
|
|
331
333
|
assert.ok(NodePyATVKeys);
|
|
332
334
|
});
|
|
335
|
+
it('Type NodePyATVInstanceOptions should be exported', function() {
|
|
336
|
+
assert.ok(NodePyATVListenerState);
|
|
337
|
+
});
|
|
338
|
+
it('Type NodePyATVPowerState should be exported', function() {
|
|
339
|
+
assert.ok(NodePyATVPowerState);
|
|
340
|
+
});
|
|
333
341
|
});
|
|
334
342
|
});
|
package/test/tools.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
import assert from 'assert';
|
|
4
|
-
import {addRequestId, debug, getExecutable, getParamters, parseState, removeRequestId} from '../src/lib/tools';
|
|
4
|
+
import { addRequestId, debug, getExecutable, getParamters, parseState, removeRequestId } from '../src/lib/tools';
|
|
5
5
|
import {
|
|
6
6
|
NodePyATVDeviceState,
|
|
7
7
|
NodePyATVExecutableType,
|
|
@@ -28,7 +28,7 @@ describe('Tools', function () {
|
|
|
28
28
|
debug('TEST', 'Hello World.', {});
|
|
29
29
|
});
|
|
30
30
|
it('should work with default logger', function () {
|
|
31
|
-
debug('TEST', 'Hello World.', {debug: true});
|
|
31
|
+
debug('TEST', 'Hello World.', { debug: true });
|
|
32
32
|
});
|
|
33
33
|
it('should work with custom logger', function () {
|
|
34
34
|
debug('TEST', 'Hello World.', {
|
|
@@ -39,7 +39,7 @@ describe('Tools', function () {
|
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
it('should work with colors disabled', function () {
|
|
42
|
-
debug('TEST', 'Hello World.', {noColors: true});
|
|
42
|
+
debug('TEST', 'Hello World.', { noColors: true });
|
|
43
43
|
});
|
|
44
44
|
it('should work with custom logger and colors disabled', function () {
|
|
45
45
|
debug('TEST', 'Hello World.', {
|
|
@@ -201,8 +201,19 @@ describe('Tools', function () {
|
|
|
201
201
|
powerState: null
|
|
202
202
|
});
|
|
203
203
|
});
|
|
204
|
+
it('should throw an error for pyatv exceptions', function () {
|
|
205
|
+
const input = {
|
|
206
|
+
result: 'failure',
|
|
207
|
+
datetime: '2021-11-24T21:13:36.424576+03:00',
|
|
208
|
+
exception: 'invalid credentials: 321',
|
|
209
|
+
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'
|
|
210
|
+
};
|
|
211
|
+
assert.throws(() => {
|
|
212
|
+
parseState(input, '', {});
|
|
213
|
+
}, /Got pyatv Error: invalid credentials: 321/);
|
|
214
|
+
});
|
|
204
215
|
it('should ignore date if it\'s an invalid date', function () {
|
|
205
|
-
const input = {datetime: 'today'};
|
|
216
|
+
const input = { datetime: 'today' };
|
|
206
217
|
const result = parseState(input, '', {});
|
|
207
218
|
assert.deepStrictEqual(result, {
|
|
208
219
|
dateTime: null,
|