Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ src/schemas/abstract-protocol.json

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
dist/
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "src/utils/networkQuery"]
path = src/utils/networkQuery
url = https://github.com/complexdatacollective/networkQuery
[submodule "src/utils/protocol/protocol-validation"]
path = src/utils/protocol/protocol-validation
url = https://github.com/complexdatacollective/protocol-validation.git
[submodule "src/utils/network-exporters"]
path = src/utils/network-exporters
url = https://github.com/complexdatacollective/network-exporters
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.21.3
22
91 changes: 0 additions & 91 deletions config/env.js

This file was deleted.

10 changes: 0 additions & 10 deletions config/jest/automock.js

This file was deleted.

14 changes: 0 additions & 14 deletions config/jest/cssTransform.js

This file was deleted.

4 changes: 0 additions & 4 deletions config/jest/enzyme.js

This file was deleted.

12 changes: 0 additions & 12 deletions config/jest/fileTransform.js

This file was deleted.

9 changes: 0 additions & 9 deletions config/jest/matchMedia.js

This file was deleted.

7 changes: 0 additions & 7 deletions config/jest/polyfills.js

This file was deleted.

88 changes: 0 additions & 88 deletions config/nc-dev-utils.js

This file was deleted.

57 changes: 0 additions & 57 deletions config/paths.js

This file was deleted.

78 changes: 78 additions & 0 deletions config/vitest/setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import { vi } from 'vitest';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

// Configure Enzyme
configure({ adapter: new Adapter() });

// Polyfills
global.requestAnimationFrame = (callback) => setTimeout(callback, 0);
global.cancelAnimationFrame = () => {};
global.SVGElement = global.Element;

// window.matchMedia stub
Object.defineProperty(window, 'matchMedia', {
value: () => ({
matches: false,
addListener: () => {},
removeListener: () => {},
}),
});

// Mock window.electronAPI (new IPC architecture)
window.electronAPI = {
ipc: {
send: vi.fn(),
on: vi.fn(() => vi.fn()),
once: vi.fn(),
removeAllListeners: vi.fn(),
},
dialog: {
showOpenDialog: vi.fn(),
showSaveDialog: vi.fn(),
showMessageBox: vi.fn(),
},
app: {
getPath: vi.fn(),
getAppPath: vi.fn(),
getVersion: vi.fn(() => '6.5.4'),
},
fs: {
readFile: vi.fn(),
writeFile: vi.fn(),
pathExists: vi.fn(),
readJson: vi.fn(),
writeJson: vi.fn(),
rmdir: vi.fn(() => Promise.resolve()),
remove: vi.fn(() => Promise.resolve()),
},
path: {
join: vi.fn((...args) => args.join('/')),
basename: vi.fn((p) => p.split('/').pop()),
dirname: vi.fn((p) => p.split('/').slice(0, -1).join('/')),
},
shell: {
openExternal: vi.fn(),
openPath: vi.fn(),
},
env: {
isDevelopment: false,
isProduction: true,
isPreview: false,
platform: 'darwin',
},
platform: 'darwin',
};

// Auto-mocks
vi.mock('electron');
vi.mock('electron-log');
vi.mock('fs');
vi.mock('redux-logger');
vi.mock('uuid');

// Mock console.error
global.console.error = vi.fn();

// Jest compatibility layer - allows existing jest.fn() calls to work
global.jest = vi;
Loading
Loading