Skip to content

Commit a237b3d

Browse files
bump
1 parent 30aa1aa commit a237b3d

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tools/failurelogs-utils/app-automate.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import config from "../../config.js";
2-
import {
3-
filterLinesByKeywords,
4-
validateLogResponse,
5-
} from "./utils.js";
2+
import { filterLinesByKeywords, validateLogResponse } from "./utils.js";
63

74
const auth = Buffer.from(
85
`${config.browserstackUsername}:${config.browserstackAccessKey}`,

src/tools/failurelogs-utils/automate.ts

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,29 @@ export async function retrieveNetworkFailures(
3232
(entry: HarEntry) =>
3333
entry.response.status === 0 ||
3434
entry.response.status >= 400 ||
35-
entry.response._error !== undefined
35+
entry.response._error !== undefined,
3636
);
37-
37+
3838
return failureEntries.length > 0
39-
? `Network Failures (${failureEntries.length} found):\n${JSON.stringify(failureEntries.map((entry: any) => ({
40-
startedDateTime: entry.startedDateTime,
41-
request: {
42-
method: entry.request?.method,
43-
url: entry.request?.url,
44-
queryString: entry.request?.queryString,
45-
},
46-
response: {
47-
status: entry.response?.status,
48-
statusText: entry.response?.statusText,
49-
_error: entry.response?._error,
50-
},
51-
serverIPAddress: entry.serverIPAddress,
52-
time: entry.time,
53-
})), null, 2)}`
39+
? `Network Failures (${failureEntries.length} found):\n${JSON.stringify(
40+
failureEntries.map((entry: any) => ({
41+
startedDateTime: entry.startedDateTime,
42+
request: {
43+
method: entry.request?.method,
44+
url: entry.request?.url,
45+
queryString: entry.request?.queryString,
46+
},
47+
response: {
48+
status: entry.response?.status,
49+
statusText: entry.response?.statusText,
50+
_error: entry.response?._error,
51+
},
52+
serverIPAddress: entry.serverIPAddress,
53+
time: entry.time,
54+
})),
55+
null,
56+
2,
57+
)}`
5458
: "No network failures found";
5559
}
5660

0 commit comments

Comments
 (0)