-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Register Test addon as TEST_PROVIDER addon type
- Loading branch information
1 parent
b423331
commit cea8021
Showing
4 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export const ADDON_ID = 'storybook/vitest'; | ||
export const ADDON_ID = 'storybook/test'; | ||
export const TEST_PROVIDER_ID = `${ADDON_ID}/test-provider`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
import { type API, addons } from 'storybook/internal/manager-api'; | ||
import React from 'react'; | ||
|
||
import { ADDON_ID } from './constants'; | ||
import { addons } from 'storybook/internal/manager-api'; | ||
import { Addon_TypesEnum } from 'storybook/internal/types'; | ||
|
||
addons.register(ADDON_ID, () => {}); | ||
import { PointerHandIcon } from '@storybook/icons'; | ||
|
||
import { ADDON_ID, TEST_PROVIDER_ID } from './constants'; | ||
|
||
addons.register(ADDON_ID, () => { | ||
addons.add(TEST_PROVIDER_ID, { | ||
type: Addon_TypesEnum.experimental_TEST_PROVIDER, | ||
icon: <PointerHandIcon />, | ||
title: 'Component tests', | ||
description: () => 'Not yet run', | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters