mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 16:04:23 +00:00
Refactor workspace settings handling in tests and components to use currentWorkspace directly
This commit is contained in:
@@ -70,7 +70,6 @@ describe('ContentView', () => {
|
||||
vi.mocked(useWorkspace).mockReturnValue({
|
||||
currentWorkspace: mockCurrentWorkspace,
|
||||
workspaces: [],
|
||||
settings: mockCurrentWorkspace,
|
||||
updateSettings: vi.fn(),
|
||||
loading: false,
|
||||
colorScheme: 'light',
|
||||
@@ -88,7 +87,6 @@ describe('ContentView', () => {
|
||||
vi.mocked(useWorkspace).mockReturnValue({
|
||||
currentWorkspace: null,
|
||||
workspaces: [],
|
||||
settings: mockCurrentWorkspace,
|
||||
updateSettings: vi.fn(),
|
||||
loading: false,
|
||||
colorScheme: 'light',
|
||||
|
||||
@@ -9,7 +9,7 @@ import React from 'react';
|
||||
import { MantineProvider } from '@mantine/core';
|
||||
import MarkdownPreview from './MarkdownPreview';
|
||||
import { notifications } from '@mantine/notifications';
|
||||
import { Theme, DEFAULT_WORKSPACE_SETTINGS } from '../../types/models';
|
||||
import { Theme } from '../../types/models';
|
||||
|
||||
// Mock notifications
|
||||
vi.mock('@mantine/notifications', () => ({
|
||||
@@ -70,7 +70,6 @@ describe('MarkdownPreview', () => {
|
||||
lastOpenedFilePath: '',
|
||||
},
|
||||
workspaces: [],
|
||||
settings: DEFAULT_WORKSPACE_SETTINGS,
|
||||
updateSettings: vi.fn(),
|
||||
loading: false,
|
||||
colorScheme: 'light',
|
||||
@@ -213,7 +212,6 @@ describe('MarkdownPreview', () => {
|
||||
vi.mocked(useWorkspace).mockReturnValue({
|
||||
currentWorkspace: null,
|
||||
workspaces: [],
|
||||
settings: DEFAULT_WORKSPACE_SETTINGS,
|
||||
updateSettings: vi.fn(),
|
||||
loading: false,
|
||||
colorScheme: 'light',
|
||||
|
||||
Reference in New Issue
Block a user