Skip to content

Commit

Permalink
Cleanup: run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
ggalmazor committed Mar 8, 2024
1 parent c92549e commit 088ee8a
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 36 deletions.
6 changes: 3 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
preset: "ts-jest",
testEnvironment: "node",
};
8 changes: 6 additions & 2 deletions test/billing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ describe("billing", () => {
expect(error).toBeInstanceOf(ClientError);
const clientError = error as ClientError;
expect(clientError.status).toBe(400);
expect(clientError.data.message).toBe("Invalid date format must be ISO8601 (YYYY-MM-DD)");
expect(clientError.data.message).toBe(
"Invalid date format must be ISO8601 (YYYY-MM-DD)"
);
done();
}
);
Expand All @@ -116,7 +118,9 @@ describe("billing", () => {
expect(error).toBeInstanceOf(ClientError);
const clientError = error as ClientError;
expect(clientError.status).toBe(403);
expect(clientError.data.message).toBe("Permission Denied. Required Scope: billing:*:read");
expect(clientError.data.message).toBe(
"Permission Denied. Required Scope: billing:*:read"
);
done();
}
);
Expand Down
4 changes: 3 additions & 1 deletion test/certificates.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ describe("certificates", () => {
.then(
(response) => {
const certificate = response.data;
expect(certificate.private_key).toMatch(/-----BEGIN RSA PRIVATE KEY-----/);
expect(certificate.private_key).toMatch(
/-----BEGIN RSA PRIVATE KEY-----/
);
done();
},
(error) => {
Expand Down
4 changes: 3 additions & 1 deletion test/client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ describe("response handling", () => {
},
(error) => {
expect(error).toBeInstanceOf(ClientError);
expect(error.data.errors.email).toEqual(expect.arrayContaining(["can't be blank"]));
expect(error.data.errors.email).toEqual(
expect.arrayContaining(["can't be blank"])
);
done();
}
);
Expand Down
12 changes: 3 additions & 9 deletions test/contacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,23 +229,17 @@ describe("contacts", () => {
throw new Error("The promise should follow the rejection path");
},
(error) => {
expect(error.attributeErrors().address1).toEqual([
"can't be blank",
]);
expect(error.attributeErrors().address1).toEqual(["can't be blank"]);
expect(error.attributeErrors().city).toEqual(["can't be blank"]);
expect(error.attributeErrors().country).toEqual([
"can't be blank",
]);
expect(error.attributeErrors().country).toEqual(["can't be blank"]);
expect(error.attributeErrors().email).toEqual([
"can't be blank",
"is an invalid email address",
]);
expect(error.attributeErrors().first_name).toEqual([
"can't be blank",
]);
expect(error.attributeErrors().last_name).toEqual([
"can't be blank",
]);
expect(error.attributeErrors().last_name).toEqual(["can't be blank"]);
expect(error.attributeErrors().phone).toEqual([
"can't be blank",
"is probably not a phone number",
Expand Down
8 changes: 6 additions & 2 deletions test/domain_delegation_signer_records.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ describe("domains", () => {
const dsRecord = response.data;
expect(dsRecord.id).toBe(24);
expect(dsRecord.algorithm).toBe("8");
expect(dsRecord.digest).toBe("C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F");
expect(dsRecord.digest).toBe(
"C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F"
);
expect(dsRecord.digest_type).toBe("2");
expect(dsRecord.keytag).toBe("44620");
expect(dsRecord.public_key).toBe(null);
Expand All @@ -169,7 +171,9 @@ describe("domains", () => {
},
(error) => {
expect(error).toBeInstanceOf(NotFoundError);
expect(error.data.message).toBe("Delegation signer record `0` not found");
expect(error.data.message).toBe(
"Delegation signer record `0` not found"
);
done();
}
);
Expand Down
8 changes: 6 additions & 2 deletions test/oauth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ describe("oauth", () => {
})
.then(
(response) => {
expect(response.access_token).toBe("zKQ7OLqF5N1gylcJweA9WodA000BUNJD");
expect(response.access_token).toBe(
"zKQ7OLqF5N1gylcJweA9WodA000BUNJD"
);
expect(response.token_type).toBe("Bearer");
expect(response.account_id).toBe(1);
done();
Expand Down Expand Up @@ -123,7 +125,9 @@ describe("oauth", () => {

expect(authorizeUrl.protocol).toBe(expectedUrl.protocol);
expect(authorizeUrl.host).toBe(expectedUrl.host);
expect(searchParamsToObj(authorizeUrl.searchParams)).toEqual(searchParamsToObj(expectedUrl.searchParams));
expect(searchParamsToObj(authorizeUrl.searchParams)).toEqual(
searchParamsToObj(expectedUrl.searchParams)
);
});
});
});
8 changes: 6 additions & 2 deletions test/registrar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ describe("registrar", () => {
},
(error) => {
expect(error).toBeInstanceOf(ClientError);
expect(error.data.message).toBe("`example.com` is not a premium domain for registration");
expect(error.data.message).toBe(
"`example.com` is not a premium domain for registration"
);
done();
}
);
Expand Down Expand Up @@ -327,7 +329,9 @@ describe("registrar", () => {
expect(domainTransfer.state).toBe("cancelled");
expect(domainTransfer.auto_renew).toBe(false);
expect(domainTransfer.whois_privacy).toBe(false);
expect(domainTransfer.status_description).toBe("Canceled by customer");
expect(domainTransfer.status_description).toBe(
"Canceled by customer"
);
expect(domainTransfer.created_at).toBe("2020-06-05T18:08:00Z");
expect(domainTransfer.updated_at).toBe("2020-06-05T18:10:01Z");
done();
Expand Down
8 changes: 6 additions & 2 deletions test/tlds.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,16 @@ describe("tlds", () => {
const extendedAttributes = response.data;
expect(extendedAttributes.length).toBe(4);
expect(extendedAttributes[0].name).toBe("uk_legal_type");
expect(extendedAttributes[0].description).toBe("Legal type of registrant contact");
expect(extendedAttributes[0].description).toBe(
"Legal type of registrant contact"
);
expect(extendedAttributes[0].required).toBe(false);
expect(extendedAttributes[0].options.length).toBe(17);
expect(extendedAttributes[0].options[0].title).toBe("UK Individual");
expect(extendedAttributes[0].options[0].value).toBe("IND");
expect(extendedAttributes[0].options[0].description).toBe("UK Individual (our default value)");
expect(extendedAttributes[0].options[0].description).toBe(
"UK Individual (our default value)"
);
done();
},
(error) => {
Expand Down
8 changes: 6 additions & 2 deletions test/vanity_name_servers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ describe("vanity name servers", () => {
expect(vanityNameServers[0].id).toBe(1);
expect(vanityNameServers[0].ipv4).toBe("127.0.0.1");
expect(vanityNameServers[0].ipv6).toBe("::1");
expect(vanityNameServers[0].created_at).toBe("2016-07-14T13:22:17Z");
expect(vanityNameServers[0].updated_at).toBe("2016-07-14T13:22:17Z");
expect(vanityNameServers[0].created_at).toBe(
"2016-07-14T13:22:17Z"
);
expect(vanityNameServers[0].updated_at).toBe(
"2016-07-14T13:22:17Z"
);
done();
},
(error) => {
Expand Down
22 changes: 12 additions & 10 deletions test/zone_records.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ describe("zone records", () => {
expect(records[0].id).toBe(1);
expect(records[0].zone_id).toBe(zoneId);
expect(records[0].name).toBe("");
expect(records[0].content).toBe("ns1.dnsimple.com admin.dnsimple.com 1458642070 86400 7200 604800 300");
expect(records[0].content).toBe(
"ns1.dnsimple.com admin.dnsimple.com 1458642070 86400 7200 604800 300"
);
expect(records[0].ttl).toBe(3600);
expect(records[0].priority).toBe(null);
expect(records[0].type).toBe("SOA");
Expand All @@ -81,7 +83,7 @@ describe("zone records", () => {
},
(error) => {
done(error);
},
}
);
});

Expand All @@ -99,7 +101,7 @@ describe("zone records", () => {
},
(error) => {
done(error);
},
}
);
});
});
Expand Down Expand Up @@ -135,7 +137,7 @@ describe("zone records", () => {
},
(error) => {
done(error);
},
}
)
.catch((error) => {
done(error);
Expand Down Expand Up @@ -164,7 +166,7 @@ describe("zone records", () => {
},
(error) => {
done(error);
},
}
);
});

Expand All @@ -183,7 +185,7 @@ describe("zone records", () => {
expect(error).toBeInstanceOf(NotFoundError);
expect(error.data.message).toBe("Record `0` not found");
done();
},
}
);
});
});
Expand Down Expand Up @@ -224,7 +226,7 @@ describe("zone records", () => {
},
(error) => {
done(error);
},
}
);
});
});
Expand Down Expand Up @@ -282,7 +284,7 @@ describe("zone records", () => {
(error) => {
expect(error).toBeInstanceOf(NotFoundError);
done();
},
}
);
});
});
Expand Down Expand Up @@ -317,7 +319,7 @@ describe("zone records", () => {
},
(error) => {
done(error);
},
}
);
});

Expand All @@ -335,7 +337,7 @@ describe("zone records", () => {
(error) => {
expect(error).toBeInstanceOf(NotFoundError);
done();
},
}
);
});
});
Expand Down

0 comments on commit 088ee8a

Please sign in to comment.