Skip to content

Commit

Permalink
Committing more unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
derek-cb committed Dec 17, 2024
1 parent 603df2d commit 3087585
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
maxWorkers: 1,
coverageThreshold: {
"./src/coinbase/**": {
branches: 74,
branches: 75,
functions: 85,
statements: 85,
lines: 85,
Expand Down
7 changes: 7 additions & 0 deletions src/tests/wallet_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,13 @@ describe("Wallet Class", () => {
"Wallet ID must be provided",
);
});
it("should throw an error when seed is not provided", async () => {
const walletData = seedWallet.export();
walletData.seed = "";
await expect(async () => await Wallet.load(walletData)).rejects.toThrow(
"Seed must be provided",
);
});
it("should throw an error when wallet data format is invalid", async () => {
const invalidWalletData = {
foo: "bar",
Expand Down

0 comments on commit 3087585

Please sign in to comment.