diff --git a/packages/benchpress/src/webdriver/chrome_driver_extension.ts b/packages/benchpress/src/webdriver/chrome_driver_extension.ts index 2297d8b5a6..ab9f29afb4 100644 --- a/packages/benchpress/src/webdriver/chrome_driver_extension.ts +++ b/packages/benchpress/src/webdriver/chrome_driver_extension.ts @@ -86,7 +86,7 @@ export class ChromeDriverExtension extends WebDriverExtension { .then((entries) => { const events: PerfLogEvent[] = []; entries.forEach((entry: any) => { - const message = JSON.parse(entry['message'])['message']; + const message = (JSON.parse(entry['message']) as {message: any})['message']; if (message['method'] === 'Tracing.dataCollected') { events.push(message['params']); } diff --git a/packages/benchpress/src/webdriver/ios_driver_extension.ts b/packages/benchpress/src/webdriver/ios_driver_extension.ts index f2bad64b33..df85000561 100644 --- a/packages/benchpress/src/webdriver/ios_driver_extension.ts +++ b/packages/benchpress/src/webdriver/ios_driver_extension.ts @@ -44,7 +44,7 @@ export class IOsDriverExtension extends WebDriverExtension { .then((entries) => { const records: any[] = []; entries.forEach((entry: any) => { - const message = JSON.parse(entry['message'])['message']; + const message = (JSON.parse(entry['message']) as {message: any})['message']; if (message['method'] === 'Timeline.eventRecorded') { records.push(message['params']['record']); } diff --git a/packages/benchpress/test/reporter/json_file_reporter_spec.ts b/packages/benchpress/test/reporter/json_file_reporter_spec.ts index d8621e7374..a7943a4a48 100644 --- a/packages/benchpress/test/reporter/json_file_reporter_spec.ts +++ b/packages/benchpress/test/reporter/json_file_reporter_spec.ts @@ -50,7 +50,7 @@ import {Injector, JsonFileReporter, MeasureValues, Options, SampleDescription} f [mv(0, 0, {'a': 3, 'b': 6}), mv(1, 1, {'a': 5, 'b': 9})]); const regExp = /somePath\/someId_\d+\.json/; expect(loggedFile['filename'].match(regExp) != null).toBe(true); - const parsedContent = JSON.parse(loggedFile['content']); + const parsedContent = JSON.parse(loggedFile['content']) as any; expect(parsedContent).toEqual({ 'description': { 'id': 'someId',