close
Rstest
Search
K
Guide
Config
API
English
简体中文
Search
K
Guide
Config
API
English
简体中文
Menu
API Overview
Filter
This page lists all the testing APIs for Rstest.
Test API
Expect
expect
expect.not
expect.soft
expect.poll
expect.unreachable
expect.assertions
expect.hasAssertions
expect.addEqualityTesters
expect.addSnapshotSerializer
expect.getState / expect.setState
Matchers
Common matchers
Mock matchers
Snapshot matchers
Promise matchers
Asymmetric matchers
Custom matchers
Test
test
test.only
test.skip
test.todo
test.each
test.for
test.fails
test.concurrent
test.sequential
test.runIf
test.skipIf
test.extend
Describe
describe
describe.only
describe.skip
describe.todo
describe.each
describe.for
describe.runIf
describe.skipIf
describe.concurrent
describe.sequential
Hooks
beforeAll
afterAll
beforeEach
afterEach
Rstest Utility
Mock functions
rstest.fn
rstest.spyOn
rstest.isMockFunction
rstest.clearAllMocks
rstest.resetAllMocks
rstest.restoreAllMocks
More
MockInstance
getMockName
mockName
mockClear
mockReset
mockRestore
getMockImplementation
mockImplementation
mockImplementationOnce
withImplementation
mockReturnThis
mockReturnValue
mockReturnValueOnce
mockResolvedValue
mockResolvedValueOnce
mockRejectedValue
mockRejectedValueOnce
mock
mock.calls
mock.instances
mock.contexts
mock.invocationCallOrder
mock.lastCall
mock.results
mock.settledResults
Fake timers
rstest.useFakeTimers
rstest.useRealTimers
rstest.isFakeTimers
rstest.setSystemTime
rstest.getRealSystemTime
rstest.runAllTicks
rstest.runAllTimers
rstest.runAllTimersAsync
rstest.runOnlyPendingTimers
rstest.runOnlyPendingTimersAsync
rstest.advanceTimersByTime
rstest.advanceTimersByTimeAsync
rstest.advanceTimersToNextTimer
rstest.advanceTimersToNextTimerAsync
rstest.advanceTimersToNextFrame
rstest.getTimerCount
rstest.clearAllTimers
Utilities
rstest.stubEnv
rstest.unstubAllEnvs
rstest.stubGlobal
rstest.unstubAllGlobals
rstest.setConfig
rstest.resetConfig