mirror of
https://github.com/Kong/insomnia
synced 2024-11-12 17:26:32 +00:00
09c219fb6d
* Playing around with pre-request hooks * Added response hooks * More flow types * Flow types on wrapper.js * Flow types on plugin folder * Basic tests for plugin hooks * Make DB initilize for all tests no matter what * Touch
23 lines
414 B
JavaScript
23 lines
414 B
JavaScript
import 'whatwg-fetch';
|
|
import beforeEach from './before-each';
|
|
|
|
const localStorageMock = (function () {
|
|
let store = {};
|
|
|
|
return {
|
|
getItem (key) {
|
|
return store[key];
|
|
},
|
|
setItem (key, value) {
|
|
store[key] = value.toString();
|
|
},
|
|
clear () {
|
|
store = {};
|
|
}
|
|
};
|
|
})();
|
|
|
|
global.localStorage = localStorageMock;
|
|
global.require = require;
|
|
global.insomniaBeforeEach = beforeEach;
|