MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / resetStateForTests

Function resetStateForTests

source code/bootstrap/state.ts:921–932  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

getInitialStateFunction · 0.85
entriesMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected