SpectronFakeDialog
Mock dialog module in your spectron's specs.
Installation
npm install --save-dev spectron-fake-dialog
Example
Using mocha example.
const Application = Application;const electron = ;const path = ;const fakeDialog = ;const assert = ; const app = path: electron args: path ;fakeDialog; ;
API
#apply(application: Application)
initialize spectronFakeDialog
#mock(params: Array<{ method: stering, value: Object }>)
NOTE: mock must call after Electron app started.
- method: dialog module's method name. ex) showOpenDialog, showSaveDialog...
- value: mocked method return value.
License
MIT