diff --git a/components/factory/components/__tests__/MyDenoms.test.tsx b/components/factory/components/__tests__/MyDenoms.test.tsx index 7b13eda2..640f6634 100644 --- a/components/factory/components/__tests__/MyDenoms.test.tsx +++ b/components/factory/components/__tests__/MyDenoms.test.tsx @@ -1,4 +1,4 @@ -import { afterEach, describe, expect, test, jest, mock } from 'bun:test'; +import { afterAll, afterEach, describe, expect, test, jest, mock } from 'bun:test'; import React from 'react'; import { screen, cleanup, fireEvent } from '@testing-library/react'; import MyDenoms from '@/components/factory/components/MyDenoms'; @@ -37,6 +37,9 @@ const allDenoms = [mockDenom, mockMfxDenom]; describe('MyDenoms', () => { afterEach(cleanup); + afterAll(() => { + mock.restore(); + }); test('renders loading skeleton when isLoading is true', () => { renderWithProps({ isLoading: true }); diff --git a/components/factory/components/__tests__/metaBox.test.tsx b/components/factory/components/__tests__/metaBox.test.tsx index eb5f5da4..822e86a1 100644 --- a/components/factory/components/__tests__/metaBox.test.tsx +++ b/components/factory/components/__tests__/metaBox.test.tsx @@ -1,4 +1,4 @@ -import { afterEach, describe, expect, test, jest, mock } from 'bun:test'; +import { afterAll, afterEach, describe, expect, test, jest, mock } from 'bun:test'; import React from 'react'; import { screen, cleanup, waitFor, within } from '@testing-library/react'; import MetaBox from '@/components/factory/components/metaBox'; @@ -41,6 +41,9 @@ const renderWithProps = (props = {}) => { describe('MetaBox', () => { afterEach(cleanup); + afterAll(() => { + mock.restore(); + }); test("renders 'Select a token to view options' message when no denom is provided", () => { renderWithProps(); diff --git a/components/groups/components/__tests__/groupInfo.test.tsx b/components/groups/components/__tests__/groupInfo.test.tsx index 1d21312c..c9d3e9b3 100644 --- a/components/groups/components/__tests__/groupInfo.test.tsx +++ b/components/groups/components/__tests__/groupInfo.test.tsx @@ -1,4 +1,4 @@ -import { afterEach, describe, expect, test, jest, mock, beforeAll } from 'bun:test'; +import { afterAll, afterEach, describe, expect, test, jest, mock, beforeAll } from 'bun:test'; import React from 'react'; import { screen, cleanup, fireEvent } from '@testing-library/react'; import { GroupInfo } from '@/components/groups/components/groupInfo'; @@ -34,6 +34,9 @@ describe('GroupInfo', () => { m.mockReturnValue({ balance: { amount: '1000000' } }); }); afterEach(cleanup); + afterAll(() => { + mock.restore(); + }); test('renders initial state correctly', () => { renderWithProps(); diff --git a/components/groups/components/__tests__/myGroups.test.tsx b/components/groups/components/__tests__/myGroups.test.tsx index 021c2740..07a7868c 100644 --- a/components/groups/components/__tests__/myGroups.test.tsx +++ b/components/groups/components/__tests__/myGroups.test.tsx @@ -1,4 +1,4 @@ -import { describe, expect, test, jest, mock, afterEach } from 'bun:test'; +import { afterAll, describe, expect, test, jest, mock, afterEach } from 'bun:test'; import { screen, cleanup, waitFor, fireEvent } from '@testing-library/react'; import { YourGroups } from '@/components/groups/components/myGroups'; import { mockGroup, mockGroup2, mockProposals } from '@/tests/mock'; @@ -33,6 +33,9 @@ function renderWithProps(props = {}) { describe('YourGroups Component', () => { afterEach(cleanup); + afterAll(() => { + mock.restore(); + }); test('renders empty group state correctly', () => { renderWithProps({ groups: { groups: [] } }); diff --git a/components/groups/forms/groups/__tests__/ConfirmationForm.test.tsx b/components/groups/forms/groups/__tests__/ConfirmationForm.test.tsx index 59aa832f..dd2119c3 100644 --- a/components/groups/forms/groups/__tests__/ConfirmationForm.test.tsx +++ b/components/groups/forms/groups/__tests__/ConfirmationForm.test.tsx @@ -1,4 +1,4 @@ -import { describe, test, afterEach, expect, jest, mock } from 'bun:test'; +import { afterAll, describe, test, afterEach, expect, jest, mock } from 'bun:test'; import React from 'react'; import { screen, fireEvent, cleanup } from '@testing-library/react'; import ConfirmationModal from '@/components/groups/forms/groups/ConfirmationForm'; @@ -30,6 +30,9 @@ const mockProps = { describe('ConfirmationModal Component', () => { afterEach(cleanup); + afterAll(() => { + mock.restore(); + }); test('renders component with correct details', () => { renderWithChainProvider();