insomnia/app/__mocks__/electron.js

20 lines
336 B
JavaScript
Raw Normal View History

import mkdirp from 'mkdirp';
const RANDOM_STRING = Math.random().toString().replace('.', '');
module.exports = {
remote: {
app: {
getPath (name) {
const dir = `/tmp/insomnia-tests-${RANDOM_STRING}/${name}`;
mkdirp.sync(dir);
return dir;
}
}
2016-11-23 23:42:10 +00:00
},
ipcRenderer: {
on () {
}
}
};