Format *.ts, *.js, *.css, *.html, *.json and *.svelte

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Rūdolfs Ošiņš
2022-08-31 17:47:07 +02:00
parent 687174a8e0
commit b3cec1f314
148 changed files with 4040 additions and 2555 deletions
+31 -21
View File
@@ -3,8 +3,7 @@ import { render } from "@testing-library/svelte";
import "@public/index.css";
import type { EventType, Listener } from "@ethersproject/abstract-provider";
describe('BlockTimer', () => {
describe("BlockTimer", () => {
it("increases correctly the loading bar", () => {
let block = 1;
const props = {
@@ -14,33 +13,44 @@ describe('BlockTimer', () => {
if (event === "block") {
listener(block);
}
}
}
},
},
},
startBlock: 1,
duration: 3
duration: 3,
};
const { rerender } = render(BlockTimer, props);
cy.get("div.loader").should("have.attr", "style", "width: 0%;").then(() => {
block += 1;
rerender(props);
});
cy.get("div.loader")
.should("have.attr", "style", "width: 0%;")
.then(() => {
block += 1;
rerender(props);
});
cy.get("div.loader").last().should("have.attr", "style", "width: 33%;").then(() => {
block += 1;
rerender(props);
});
cy.get("div.loader")
.last()
.should("have.attr", "style", "width: 33%;")
.then(() => {
block += 1;
rerender(props);
});
cy.get("div.loader").last().should("have.attr", "style", "width: 66%;").then(() => {
block += 1;
rerender(props);
});
cy.get("div.loader")
.last()
.should("have.attr", "style", "width: 66%;")
.then(() => {
block += 1;
rerender(props);
});
cy.get("div.loader").last().should("have.attr", "style", "width: 99%;").then(() => {
block += 1;
rerender(props);
});
cy.get("div.loader")
.last()
.should("have.attr", "style", "width: 99%;")
.then(() => {
block += 1;
rerender(props);
});
});
});