Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
add import i18n to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenFern committed Apr 14, 2024
1 parent 96dc5e3 commit 7ad455b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions webapp/src/components/game/Game.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {render, screen, fireEvent, act, waitFor} from '@testing-library/react';
import '@testing-library/jest-dom';
import {Game} from './Game';
import { MemoryRouter, Route } from 'react-router-dom';
import "../../i18n";

jest.mock('../../services/game.service', () => ({
startNewGame: () => Promise.resolve(""),
Expand Down
1 change: 1 addition & 0 deletions webapp/src/components/game/SuddenDeath.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {SuddenDeath} from './SuddenDeath';
import Game from "./Game";
import { MemoryRouter, Route } from 'react-router-dom';
import * as router from "react-router";
import "../../i18n";

jest.mock('../../services/game.service', () => ({
startNewGame: () => Promise.resolve(""),
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/profile/Profile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { render, screen, act, waitFor } from '@testing-library/react';
import '@testing-library/jest-dom';
import { Profile } from './Profile';
import { MemoryRouter } from 'react-router-dom';

import "../../i18n";

jest.mock('../../services/user.service', () => ({
getCurrentUser: () => {
Expand Down
1 change: 1 addition & 0 deletions webapp/src/components/settings/Settings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { render, screen, fireEvent, act } from '@testing-library/react';
import '@testing-library/jest-dom';
import { MemoryRouter } from 'react-router-dom';
import { Settings } from './Settings';
import "../../i18n";

jest.mock('../../services/game.service', () => ({
getGameSettings: () => Promise.resolve({ durationQuestion: 30, numberOfQuestions: 10 }),
Expand Down

0 comments on commit 7ad455b

Please sign in to comment.