-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
25 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"entry": ["src/index.ts", "src/contracts/index.ts"], | ||
"ignore": [".eslintrc.json"] | ||
"entry": ["src/index.ts!", "src/contracts/index.ts!"], | ||
"project": ["src/**/*.ts!", "!src/test/**!"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { getWithdrawalVaultUUID, getVaultUUID } from "src/utils/withdrawals"; | ||
import { describe, it, expect } from "vitest"; | ||
|
||
const uuid = BigInt(17179869217); // Hex is 0x400000021 | ||
|
||
describe("src/utils/withdrawals", function () { | ||
describe("getWithdrawalVaultUUID", function () { | ||
it("should return the lower 32 bits of the UUID", function () { | ||
const result = getWithdrawalVaultUUID(uuid); | ||
// 21 in hex is 33 in decimal | ||
expect(result).toBe(BigInt(33)); | ||
}); | ||
}); | ||
|
||
describe("getVaultUUID", function () { | ||
it("should return the upper 32 bits of the UUID", function () { | ||
const result = getVaultUUID(uuid); | ||
expect(result).toBe(BigInt(4)); | ||
}); | ||
}); | ||
}); |