Merge gmpl main2 #55
@@ -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,
|
||||
}));
|
||||
|
||||
@@ -216,7 +216,7 @@ const GlpPage = () => {
|
||||
|
||||
} catch (err) {
|
||||
setIsLoading(false);
|
||||
//addMessage("<div class='alert alert-danger'>" + err.toString() + "</div>");
|
||||
addMessage("<div class='alert alert-danger'>" + (err as Error).toString() + "</div>");
|
||||
console.log(err);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user