mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
45861b6393
* Hacked insomnia lib package to get Insomnia's networking in tests * Some small tweaks * Got it mostly working * Tweak * Fix * Fix pkg * Fix some things * Add comment * Comment out log * Some tweaks after doing a self code review * Fix test * Update app name for `insomnia-send-request` * Update package-lock * Update package-locks * Fix tests * Add gitignore * Fix tests hopefully * Fix accidental dep deletions * Fix tests again * Mock for all tests * Update tests again * Don't compile for Electron for tests * Update release scripts to disable tests
30 lines
598 B
JavaScript
30 lines
598 B
JavaScript
// This file implements just enough of the electron module to get sending requests to work
|
|
|
|
const os = require('os');
|
|
const path = require('path');
|
|
|
|
function getPath(name) {
|
|
switch (name) {
|
|
case 'temp':
|
|
return os.tmpdir();
|
|
case 'userData':
|
|
// Will be used to store response bodies and things
|
|
return path.join(os.tmpdir(), 'insomnia-send-request');
|
|
}
|
|
throw new Error('Invalid path:' + name);
|
|
}
|
|
|
|
module.exports = {
|
|
app: {
|
|
getPath,
|
|
},
|
|
ipcMain: {
|
|
on: () => {
|
|
// Don't need this yet
|
|
},
|
|
},
|
|
BrowserWindow: {
|
|
getAllWindows: () => [],
|
|
},
|
|
};
|