Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Ability to define default requests for every test #10

@sigfriedCub1990

Description

@sigfriedCub1990

✨ Feature proposal

Ability to define a set of default requests that will be used in every test.

🎯 Motivation

There are some scenarios where we would like to have a set of default requests for every test, i.e. Feature Flags.

👀 Example

import { render } from '@testing-library/react'

configure({
  mount: render,
  defaultResponses: [
     {
       path: '/feature_flags',
       responseBody: { 
         flags: ['flag_1', 'flag_2']
       }
     }
  ]
})

💬 Comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions