mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
21 lines
301 B
JavaScript
21 lines
301 B
JavaScript
|
const __constructorMock = jest.fn();
|
||
|
let returnValue = 'test';
|
||
|
|
||
|
class Prompt {
|
||
|
constructor(options) {
|
||
|
__constructorMock(options);
|
||
|
}
|
||
|
|
||
|
run() {
|
||
|
return returnValue;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
__constructorMock,
|
||
|
__mockPromptRun: v => {
|
||
|
returnValue = v;
|
||
|
},
|
||
|
AutoComplete: Prompt,
|
||
|
};
|