MCPcopy
hub / github.com/codeaashu/claude-code / resetStateForTests

Function resetStateForTests

src/bootstrap/state.ts:919–930  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

917
918// Only used in tests
919export function resetStateForTests(): void {
920 if (process.env.NODE_ENV !== 'test') {
921 throw new Error('resetStateForTests can only be called in tests')
922 }
923 Object.entries(getInitialState()).forEach(([key, value]) => {
924 STATE[key as keyof State] = value as never
925 })
926 outputTokensAtTurnStart = 0
927 currentTurnTokenBudget = null
928 budgetContinuationCount = 0
929 sessionSwitched.clear()
930}
931
932// You shouldn't use this directly. See src/utils/model/modelStrings.ts::getModelStrings()
933export function getModelStrings(): ModelStrings | null {

Callers

nothing calls this directly

Calls 4

getInitialStateFunction · 0.85
forEachMethod · 0.80
entriesMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected