
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
spectron-fake-dialog
Advanced tools
Mock dialog module in your spectron's specs.
npm install --save-dev spectron-fake-dialog
Using mocha example.
const Application = require('spectron').Application;
const electron = require('electron');
const path = require('path');
const fakeDialog = require('spectron-fake-dialog');
const assert = require('assert');
const app = new Application({ path: electron, args: [ path.join(__dirname, '.') ] });
fakeDialog.apply(app);
describe('mock showOpenDialog', function() {
this.timeout(10000);
beforeEach(function() {
return app.start().then(() =>
fakeDialog.mock([ { method: 'showOpenDialog', value: ['faked.txt'] } ])
);;
});
afterEach(function() {
return app.stop();
});
it('should return faked.txt', () => {
return app.client.waitForExist('#show-open-dialog-button')
.then(() => app.client.click('#show-open-dialog-button'))
.then(() => app.client.getText('#return-value'))
.then(text => assert.equal(text, JSON.stringify(['faked.txt'])));
});
});
initialize spectronFakeDialog
NOTE: mock must call after Electron app started.
MIT
FAQs
Mock dialog module in your spectron's specs.
We found that spectron-fake-dialog demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.