Skip to content

Fixtures

Julian Müller edited this page Jan 13, 2023 · 2 revisions

Fixtures are Javascript files that contain example input for your components in JSON format.
They make testing and demoing much easier: Instead of specifying input data separately for every test and demo you write, simply import the fixtures - you can even combine components of multiple fixtures to simulate certain scenarios!
Furthermore, fixtures are a great resource for someone else who wants to reuse a component: They serve as an example what information one needs to feed into the component to get it running.
Please put your fixtures into a directory test/fixtures inside your package folder. For examples, check the folders packages/biowc-scatter/test/fixtures and deprecated-vue-components/src/stories/fixtures.

Clone this wiki locally