Skip to content

Commit

Permalink
feat: update @egjs/imready
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Dec 24, 2021
1 parent aed259d commit fb46ecf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
17 changes: 5 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,6 @@
"dependencies": {
"@egjs/children-differ": "^1.0.1",
"@egjs/component": "^3.0.0",
"@egjs/imready": "^1.1.4"
"@egjs/imready": "^1.3.0"
}
}
10 changes: 10 additions & 0 deletions test/unit/Grid.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ describe("test Grid", () => {
});
Object.defineProperty(loadingImg, "complete", {
value: false,
writable: true,
});

grid.renderItems();
Expand All @@ -201,6 +202,10 @@ describe("test Grid", () => {

// When
// loading is complete
Object.defineProperty(loadingImg, "complete", {
value: true,
writable: true,
});
loadingImg.src = "complete";

const e2 = await waitEvent(grid, "renderComplete");
Expand Down Expand Up @@ -253,6 +258,7 @@ describe("test Grid", () => {
});
Object.defineProperty(loadingImg, "complete", {
value: false,
writable: true,
});

grid.renderItems();
Expand All @@ -265,6 +271,10 @@ describe("test Grid", () => {

// When
// loading is complete
Object.defineProperty(loadingImg, "complete", {
value: true,
writable: true,
});
loadingImg.src = "complete";
loadingImg.style.width = "200px";
loadingImg.style.height = "200px";
Expand Down

0 comments on commit fb46ecf

Please sign in to comment.