Skip to content
This repository was archived by the owner on Nov 13, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,29 @@
[![npm
version](https://badge.fury.io/js/%40storybook%2Faddon-console.svg)](https://badge.fury.io/js/%40storybook%2Faddon-console)
[![addon-console](https://img.shields.io/npm/dt/@storybook/addon-console.svg)](https://github.com/storybooks/storybook-addon-console)
![status: deprecated](https://img.shields.io/badge/status-deprecated-red)
[![Storybook](https://raw.githubusercontent.com/storybookjs/storybook-addon-console/master/docs/storybook.svg?sanitize=true)](https://storybookjs.github.io/storybook-addon-console)


## Deprecation and migration

> [!NOTE]
> This package has been deprecated with the release of Storybook 9. Its features are now natively supported in Storybook.

You can now log console events globally in your project with a few lines of code:

```ts
// .storybook/preview.ts
import { spyOn } from 'storybook/test';

export const beforeEach(() => {
spyOn(console, 'log').mockName('console.log');
spyOn(console, 'warn').mockName('console.warn');
};
```

See the [official documentation on actions](https://storybook.js.org/docs/essentials/actions) for more advanced use cases, like filtering actions.

## Why

There're some cases when you can't / don't want / forgot to keep browser console opened. This addon helps you to get all
Expand Down
Loading