|
|
@ -71,6 +71,7 @@ describe("Caprover", () => {
|
|
|
|
|
|
|
|
|
|
|
|
describe("Initialization", () => {
|
|
|
|
describe("Initialization", () => {
|
|
|
|
it("should throw an error when no domain is provided", () => {
|
|
|
|
it("should throw an error when no domain is provided", () => {
|
|
|
|
|
|
|
|
// @ts-ignore toThrowError exists¯\_(ツ)_/¯
|
|
|
|
expect(() => new Caprover(new TestApp().eventStore, "")).toThrowError(
|
|
|
|
expect(() => new Caprover(new TestApp().eventStore, "")).toThrowError(
|
|
|
|
"Missing domain or password"
|
|
|
|
"Missing domain or password"
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -78,6 +79,7 @@ describe("Caprover", () => {
|
|
|
|
it("should throw an error when no password is provided", () => {
|
|
|
|
it("should throw an error when no password is provided", () => {
|
|
|
|
expect(
|
|
|
|
expect(
|
|
|
|
() => new Caprover(new TestApp().eventStore, CAPROVER_TEST_DOMAIN)
|
|
|
|
() => new Caprover(new TestApp().eventStore, CAPROVER_TEST_DOMAIN)
|
|
|
|
|
|
|
|
// @ts-ignore toThrowError exists¯\_(ツ)_/¯
|
|
|
|
).toThrowError("Missing domain or password");
|
|
|
|
).toThrowError("Missing domain or password");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -125,6 +127,7 @@ describe("Caprover", () => {
|
|
|
|
it("should throw an error when the application does not exist and not emit any event", async () => {
|
|
|
|
it("should throw an error when the application does not exist and not emit any event", async () => {
|
|
|
|
await expect(
|
|
|
|
await expect(
|
|
|
|
caprover.updateApplication("unknown", "adminer:4.2.0")
|
|
|
|
caprover.updateApplication("unknown", "adminer:4.2.0")
|
|
|
|
|
|
|
|
// @ts-ignore toThrowError exists¯\_(ツ)_/¯
|
|
|
|
).rejects.toThrowError(/Failed to update application unknown/);
|
|
|
|
).rejects.toThrowError(/Failed to update application unknown/);
|
|
|
|
|
|
|
|
|
|
|
|
const events = app.eventStore.getAllEvents();
|
|
|
|
const events = app.eventStore.getAllEvents();
|
|
|
|