close
logo
Rstest
Guide
Config
API
English
简体中文
Guide
Config
API
English
简体中文
logo
Rstest
Overview

Test API

Describe
Test
Hooks

Rstest Utility

Mock functions
Fake timers

API Overview

This page lists all the testing APIs for Rstest.

Test API

Describe

  • describe
  • describe.only
  • describe.skip
  • describe.todo
  • describe.each
  • describe.for
  • describe.runIf
  • describe.skipIf
  • describe.concurrent
  • describe.sequential

Test

  • test
  • test.only
  • test.skip
  • test.todo
  • test.each
  • test.for
  • test.fails
  • test.concurrent
  • test.sequential
  • test.runIf
  • test.skipIf
  • test.extend

Hooks

  • beforeAll
  • afterAll
  • beforeEach
  • afterEach

Rstest Utility

Mock functions

  • rstest.fn
  • rstest.spyOn
  • rstest.isMockFunction
  • rstest.clearAllMocks
  • rstest.resetAllMocks
  • rstest.restoreAllMocks

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