mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 07:01:53 +08:00
See https://github.com/storybookjs/storybook/issues/12079 We never shipped `renderStory` and this change got lost in the mix.
15 lines
381 B
Plaintext
15 lines
381 B
Plaintext
```js
|
||
// Button.test.js
|
||
|
||
import React from 'react';
|
||
import { render, screen } from '@testing-library/react';
|
||
import '@testing-library/jest-dom/extend-expect';
|
||
|
||
import { Primary } from './Button.stories';
|
||
|
||
it('renders the button in the primary state’, () => {
|
||
render(<Primary {...Primary.args} />);
|
||
expect(screen.getByRole('button')).toHaveTextContent(‘Primary’);
|
||
});
|
||
```
|