mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
Fix i18next warning in frontend tests
- Initialize i18n in test setup to suppress 'NO_I18NEXT_INSTANCE' warning - Update AMSHistoryModal tests to use actual translated text 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
76795b5fe2
commit
dc92816515
@@ -243,7 +243,7 @@ describe('AMSHistoryModal', () => {
|
||||
render(<AMSHistoryModal {...defaultProps} />);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Error loading data')).toBeInTheDocument();
|
||||
expect(screen.getByText('Error')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -261,7 +261,7 @@ describe('AMSHistoryModal', () => {
|
||||
render(<AMSHistoryModal {...defaultProps} />);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('No data available for this time range')).toBeInTheDocument();
|
||||
expect(screen.getByText('No data available')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ import { afterAll, afterEach, beforeAll, vi } from 'vitest';
|
||||
import { cleanup } from '@testing-library/react';
|
||||
import { server } from './mocks/server';
|
||||
|
||||
// Initialize i18n for tests (suppresses react-i18next warnings)
|
||||
import '../i18n';
|
||||
|
||||
// Setup MSW server - bypass WebSocket requests so our mock handles them
|
||||
beforeAll(() =>
|
||||
server.listen({
|
||||
|
||||
Reference in New Issue
Block a user