Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Aug 26, 2024
1 parent 6b3e578 commit 91441ba
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
30 changes: 27 additions & 3 deletions packages/builder/src/balance/BalanceBuilder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,35 @@ describe('balanceBuilder', () => {
it('should transform correctly with frozen balance', async () => {
await expect(
config.transform({
data: { free: balanceOf(999), frozen: balanceOf(99) },
data: {
free: balanceOf(999),
frozen: balanceOf(99),
reserved: balanceOf(0),
},
}),
).resolves.toMatchSnapshot();
});

it('should transform correctly with reserved balance', async () => {
await expect(
config.transform({
data: {
free: balanceOf(999),
frozen: balanceOf(99),
reserved: balanceOf(99),
},
}),
).resolves.toMatchSnapshot();
});

it('should transform correctly with miscFrozen balance', async () => {
await expect(
config.transform({
data: { free: balanceOf(999), miscFrozen: balanceOf(99) },
data: {
free: balanceOf(999),
miscFrozen: balanceOf(99),
reserved: balanceOf(0),
},
}),
).resolves.toMatchSnapshot();
});
Expand Down Expand Up @@ -164,7 +184,11 @@ describe('balanceBuilder', () => {

it('should transform correctly', async () => {
await expect(
config.transform({ free: balanceOf(999), frozen: balanceOf(99) }),
config.transform({
free: balanceOf(999),
frozen: balanceOf(99),
reserved: balanceOf(0),
}),
).resolves.toMatchSnapshot();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ exports[`balanceBuilder > system > account > should transform correctly with fro

exports[`balanceBuilder > system > account > should transform correctly with miscFrozen balance 1`] = `900n`;

exports[`balanceBuilder > system > account > should transform correctly with reserved balance 1`] = `999n`;

exports[`balanceBuilder > system > accountEquilibrium > should be correct config 1`] = `
SubstrateQueryConfig {
"args": [
Expand Down

0 comments on commit 91441ba

Please sign in to comment.