Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
turtledreams committed Jul 27, 2023
1 parent 91cee55 commit 9b70f5e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions cypress/integration/health_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ describe("Health Check tests ", () => {
hp.haltAndClearStorage(() => {
initMain();
cy.intercept("GET", "https://try.count.ly/i?**").as("getXhr");
cy.wait(3000).then(() => {
cy.wait("@getXhr").then((xhr) => {
const url = new URL(xhr.request.url);
cy.wait("@getXhr").then((xhr) => {
const url = new URL(xhr.request.url);

// Test the 'hc' parameter
const hcParam = url.searchParams.get("hc");
const hcParamObj = JSON.parse(hcParam);
expect(hcParamObj).to.eql({el: 0, wl: 0, sc: -1, em: '""'});
// Test the 'hc' parameter
const hcParam = url.searchParams.get("hc");
const hcParamObj = JSON.parse(hcParam);
expect(hcParamObj).to.eql({ el: 0, wl: 0, sc: -1, em: "\"\"" });

// Test the 'metrics' parameter
const metricsParam = url.searchParams.get('metrics');
expect(metricsParam).to.equal('{"_app_version":"0.0","_ua":"abcd"}');
});
// Test the 'metrics' parameter
const metricsParam = url.searchParams.get("metrics");
expect(metricsParam).to.equal("{\"_app_version\":\"0.0\",\"_ua\":\"abcd\"}");

// check nothing in the request queue
cy.fetch_local_request_queue().then((rq) => {
expect(rq.length).to.equal(0);
});
Expand Down

0 comments on commit 9b70f5e

Please sign in to comment.