change test

This commit is contained in:
moebiusl
2024-10-11 22:25:38 +02:00
parent d396197675
commit a692445a12
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -2,12 +2,20 @@ import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import '@testing-library/jest-dom';
import Home from "../src/app/page";
import { customLog, customLogClear } from '../src/app/scripts';
import { useRouter } from 'next/router';
jest.mock('../src/app/scripts', () => ({
customLog: jest.fn(),
customLogClear: jest.fn(),
}));
jest.mock('next/router', () => ({
useRouter: jest.fn().mockReturnValue({
push: jest.fn(),
}),
}));
jest.mock('../src/solver/glpk.min.js', () => ({
LPF_ECOND: 2,
}));