Skip to content

Commit

Permalink
Improve test descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
yagopv committed Feb 20, 2025
1 parent 4e382a7 commit 44128e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/sdk-starter-kit/src/SafeClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ describe('SafeClient', () => {
})

describe('confirm', () => {
it('should confirm the transaction using the Transaction service when not having enough signatures', async () => {
it('should execute the transaction after reaching the threshold with the confirmation', async () => {
const TRANSACTION_RESPONSE = {
confirmations: [{ signature: '0x1' }],
confirmationsRequired: 2
Expand Down Expand Up @@ -218,7 +218,7 @@ describe('SafeClient', () => {
})
})

it('should execute the transaction when having enough signatures', async () => {
it('should execute the transaction without confirmation if already having enough signatures', async () => {
const TRANSACTION_RESPONSE = {
confirmations: [{ signature: '0x1' }, { signature: '0x2' }],
confirmationsRequired: 2
Expand All @@ -242,7 +242,7 @@ describe('SafeClient', () => {
})
})

it('should indicate more signatures are required when threshold is not matched', async () => {
it('should return that more signatures are required when threshold is not reached after confirmation', async () => {
const TRANSACTION_RESPONSE = {
confirmations: [{ signature: '0x1' }],
confirmationsRequired: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ describe('SafeOperationClient', () => {
})

describe('confirmSafeOperation', () => {
it('should send the Safe operation to the bundler without confirmation when threshold is already reached', async () => {
it('should send the User operation to the bundler without confirmation when threshold is already reached', async () => {
protocolKit.getThreshold = jest.fn().mockResolvedValue(2)

const safeOperationResult = await safeOperationClient.confirmSafeOperation({
Expand All @@ -176,7 +176,7 @@ describe('SafeOperationClient', () => {
})
})

it('should indicate more signatures are required when threshold is not reached', async () => {
it('should return more signatures are required when threshold is not reached after confirmation', async () => {
protocolKit.getThreshold = jest.fn().mockResolvedValue(3)

const safeOperationResult = await safeOperationClient.confirmSafeOperation({
Expand All @@ -195,7 +195,7 @@ describe('SafeOperationClient', () => {
})
})

it('should confirm and execute when the confirmation ends with the threshold reached', async () => {
it('should send the User operation to the bundler alter reaching the threshold with the confirmation', async () => {
const CONFIRMED_SAFE_OPERATION_RESPONSE = {
...SAFE_OPERATION_RESPONSE,
confirmations: [
Expand Down

0 comments on commit 44128e5

Please sign in to comment.