MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / resetStateForTests

Function resetStateForTests

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

Source from the content-addressed store, hash-verified

899
900// Only used in tests
901export function resetStateForTests(): void {
902 if (process.env.NODE_ENV !== 'test') {
903 throw new Error('resetStateForTests can only be called in tests')
904 }
905 Object.entries(getInitialState()).forEach(([key, value]) => {
906 STATE[key as keyof State] = value as never
907 })
908 outputTokensAtTurnStart = 0
909 currentTurnTokenBudget = null
910 budgetContinuationCount = 0
911 sessionSwitched.clear()
912}
913
914// You shouldn't use this directly. See src/utils/model/modelStrings.ts::getModelStrings()
915export function getModelStrings(): ModelStrings | null {

Calls 3

getInitialStateFunction · 0.85
entriesMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected