'use strict' ; import * as sinon from 'sinon' ; import { ModuleUtil } from '../../extension/util/ModuleUtil' ; export class ModuleUtilHelper { mySandBox : sinon . SinonSandbox ; getCoreNodeModuleStub : sinon . SinonStub ; setPasswordStub : sinon . SinonStub ; getPasswordStub : sinon . SinonStub ; constructor ( sandbox ) { this . mySandBox = sandbox ; this . setPasswordStub = this . mySandBox . stub ( ) . resolves ( ) ; this . getPasswordStub = this . mySandBox . stub ( ) . resolves ( `${ process . env . MAP_OPSTOOLS_KEY }:${ process . env . MAP_OPSTOOLS_SECRET }:false` ) ; this . getCoreNodeModuleStub = this . mySandBox . stub ( ModuleUtil , 'getCoreNodeModule' ) . withArgs ( 'keytar' ) . returns ( { setPassword : this . setPasswordStub , getPassword : this . getPasswordStub } ) ; } }