mirror of
https://github.com/lordmathis/lemma.git
synced 2025-12-22 09:34:22 +00:00
Compare commits
7 Commits
681b5a857c
...
c98ece29d9
| Author | SHA1 | Date | |
|---|---|---|---|
| c98ece29d9 | |||
|
|
406483c83e | ||
| b285436081 | |||
| aeeab0e37a | |||
| 414000d72f | |||
| ffa10a8411 | |||
| 73a72b64be |
1186
app/package-lock.json
generated
1186
app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -34,10 +34,10 @@
|
|||||||
"@codemirror/state": "^6.5.2",
|
"@codemirror/state": "^6.5.2",
|
||||||
"@codemirror/theme-one-dark": "^6.1.3",
|
"@codemirror/theme-one-dark": "^6.1.3",
|
||||||
"@codemirror/view": "^6.38.6",
|
"@codemirror/view": "^6.38.6",
|
||||||
"@mantine/core": "^7.13.2",
|
"@mantine/core": "^8.3.7",
|
||||||
"@mantine/hooks": "^7.13.2",
|
"@mantine/hooks": "^8.3.7",
|
||||||
"@mantine/modals": "^7.13.2",
|
"@mantine/modals": "^8.3.7",
|
||||||
"@mantine/notifications": "^7.13.2",
|
"@mantine/notifications": "^8.3.7",
|
||||||
"@react-hook/resize-observer": "^2.0.2",
|
"@react-hook/resize-observer": "^2.0.2",
|
||||||
"@tabler/icons-react": "^3.35.0",
|
"@tabler/icons-react": "^3.35.0",
|
||||||
"codemirror": "^6.0.2",
|
"codemirror": "^6.0.2",
|
||||||
@@ -62,10 +62,10 @@
|
|||||||
"@types/node": "^22.14.0",
|
"@types/node": "^22.14.0",
|
||||||
"@types/react": "^18.3.20",
|
"@types/react": "^18.3.20",
|
||||||
"@types/react-dom": "^18.3.6",
|
"@types/react-dom": "^18.3.6",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.46.3",
|
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
||||||
"@typescript-eslint/parser": "^8.32.1",
|
"@typescript-eslint/parser": "^8.32.1",
|
||||||
"@vitejs/plugin-react": "^4.3.4",
|
"@vitejs/plugin-react": "^4.3.4",
|
||||||
"@vitest/coverage-v8": "^3.1.4",
|
"@vitest/coverage-v8": "^4.0.8",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
"eslint-plugin-react": "^7.37.5",
|
"eslint-plugin-react": "^7.37.5",
|
||||||
"eslint-plugin-react-hooks": "^5.2.0",
|
"eslint-plugin-react-hooks": "^5.2.0",
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"vite": "^6.4.1",
|
"vite": "^6.4.1",
|
||||||
"vite-plugin-compression2": "^2.3.1",
|
"vite-plugin-compression2": "^2.3.1",
|
||||||
"vitest": "^3.1.4"
|
"vitest": "^4.0.8"
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"production": [
|
"production": [
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ describe('useFileNavigation', () => {
|
|||||||
id: 1,
|
id: 1,
|
||||||
name: 'test-workspace',
|
name: 'test-workspace',
|
||||||
};
|
};
|
||||||
|
// Default mock implementations
|
||||||
|
mockLastOpenedFile.loadLastOpenedFile.mockResolvedValue(null);
|
||||||
|
mockLastOpenedFile.saveLastOpenedFile.mockResolvedValue(undefined);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|||||||
@@ -1,5 +1,26 @@
|
|||||||
import '@testing-library/jest-dom';
|
import '@testing-library/jest-dom';
|
||||||
import { vi } from 'vitest';
|
import { vi, beforeAll, afterAll } from 'vitest';
|
||||||
|
|
||||||
|
// Suppress console errors during tests
|
||||||
|
const originalConsoleError = console.error;
|
||||||
|
beforeAll(() => {
|
||||||
|
console.error = (...args: any[]) => {
|
||||||
|
// Suppress specific expected errors during tests
|
||||||
|
const errorString = args.join(' ');
|
||||||
|
if (
|
||||||
|
errorString.includes('Failed to initialize auth') ||
|
||||||
|
errorString.includes('Failed to save last opened file') ||
|
||||||
|
errorString.includes('Failed to load last opened file')
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
originalConsoleError(...args);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(() => {
|
||||||
|
console.error = originalConsoleError;
|
||||||
|
});
|
||||||
|
|
||||||
// Mock window.API_BASE_URL
|
// Mock window.API_BASE_URL
|
||||||
Object.defineProperty(window, 'API_BASE_URL', {
|
Object.defineProperty(window, 'API_BASE_URL', {
|
||||||
@@ -23,8 +44,8 @@ Object.defineProperty(window, 'matchMedia', {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Mock ResizeObserver - sometimes needed for Mantine components
|
// Mock ResizeObserver - sometimes needed for Mantine components
|
||||||
global.ResizeObserver = vi.fn().mockImplementation(() => ({
|
global.ResizeObserver = class ResizeObserver {
|
||||||
observe: vi.fn(),
|
observe = vi.fn();
|
||||||
unobserve: vi.fn(),
|
unobserve = vi.fn();
|
||||||
disconnect: vi.fn(),
|
disconnect = vi.fn();
|
||||||
}));
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/// <reference types="vitest" />
|
/// <reference types="vitest" />
|
||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vitest/config';
|
||||||
import react from '@vitejs/plugin-react';
|
import react from '@vitejs/plugin-react';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user