Test Utils

Summary

Lifecycle

setupBeforeAfter(beforeHook, afterHook)

    ctx = getOrCreateMockContext

    beforeEach { 
        stub VSCodeUtils.getInstallStatusForExtension
        stub WorkspaceInitFactory.create
        beforeHook
    }

    afterEach { 
        HistoryService.clearSubscriptions
        afterHook
        sinon.restore
    }

    return ctx
  • runLegacyMultiWorkspaceTest
runLegacyMultiWorkspaceTest { 
    log "enter"
    setupLegacyWorkspaceMulti
    _activate
    onInit
    cleanupVSCodeContextSubscriptions
}

setupLegacyWorkspaceMulti { 
    EngineTestUtilsV4.setupWS // #TODO
    new StateService
    stubWorkspace

    preSetupHook

    DendronExtension.updateWorkspaceFile

    DConfig.getOrCreate

    ConfigUtils.setVaults
    DConfig.writeConfig

}

Reference

Cook

Past Tasks


Backlinks