electron-mock-factory — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited electron-mock-factory (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Generate mocks for Electron APIs to enable unit testing of main and renderer process code without running Electron.
{
"type": "object",
"properties": {
"projectPath": { "type": "string" },
"testFramework": { "enum": ["jest", "vitest", "mocha"] },
"modulesToMock": { "type": "array" }
},
"required": ["projectPath"]
}// __mocks__/electron.js
module.exports = {
app: {
getPath: jest.fn(name => `/mock/${name}`),
getVersion: jest.fn(() => '1.0.0'),
quit: jest.fn(),
on: jest.fn()
},
ipcMain: {
on: jest.fn(),
handle: jest.fn(),
removeHandler: jest.fn()
},
ipcRenderer: {
on: jest.fn(),
send: jest.fn(),
invoke: jest.fn()
},
dialog: {
showOpenDialog: jest.fn(() => Promise.resolve({ filePaths: [] })),
showSaveDialog: jest.fn(() => Promise.resolve({ filePath: undefined })),
showMessageBox: jest.fn(() => Promise.resolve({ response: 0 }))
},
BrowserWindow: jest.fn().mockImplementation(() => ({
loadURL: jest.fn(),
on: jest.fn(),
webContents: { send: jest.fn(), on: jest.fn() }
}))
};jest.mock('electron');
const { ipcRenderer } = require('electron');
test('sends message', () => {
myModule.sendMessage('hello');
expect(ipcRenderer.send).toHaveBeenCalledWith('channel', 'hello');
});playwright-electron-configdesktop-unit-testing process~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.