File Conventions
Two options:
- End fixture file names with
.fixture.{js,jsx,ts,tsx,md,mdx}. - Put fixture files inside
__fixtures__directories.
Examples:
blankState.fixture.jsx__fixtures__/blankState.jsx
The file paths of your fixture files (relative to your project root) are used to create a tree view explorer in the React Cosmos UI.
Configuration
You can customize these file conventions in your Cosmos config:
| Option | Description | Default |
|---|---|---|
fixturesDir | Name for directories that contain fixture files (eg. __fixtures__/example.jsx). | "__fixtures__" |
fixtureFileSuffix | Suffix for fixture files (eg. example.fixture.jsx). | "fixture" |
ignore | Patterns for ignoring fixture and decorator files (eg. ["**/dist/**"]). |