Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
2-towns committed Nov 27, 2024
1 parent 3072622 commit 7bb34ce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/Availability/availability.utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,13 @@ describe("files", () => {

it("checks the availability max value", async () => {
const availability = {
totalSize: GB
totalSizeUnit: "gb",
totalSize: 1
} as AvailabilityState

assert.deepEqual(AvailabilityUtils.isValid(availability, GB * 2), true);
assert.deepEqual(AvailabilityUtils.isValid({ ...availability, totalSize: -1 }, GB), false);
assert.deepEqual(AvailabilityUtils.isValid({ ...availability, totalSize: 2 * GB }, GB), false);
assert.deepEqual(AvailabilityUtils.isValid({ ...availability, totalSize: GB }, 2 * GB), false);
})

it("toggles item in array", async () => {
Expand Down

0 comments on commit 7bb34ce

Please sign in to comment.