method

test.Expect.setState

state: Partial<ExpectState> & Record<string, unknown>
): void;

Merges state into the object that Expect.getState returns.

assertionCalls, expectedAssertionsNumber and isExpectingAssertions are the counters behind expect.assertions() and expect.hasAssertions(). currentTestName and testPath can't be changed.

Referenced types

interface ExpectState