Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest: switch from Parameters to StorybookInternalParameters #19853

Merged
merged 1 commit into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions code/addons/jest/src/shared.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('defineJestParameter', () => {
});

test('returns null if filename is a module ID that cannot be inferred from', () => {
// @ts-expect-error Storybook's fileName type is string, but according to this test it could be number in case it is a module id.
expect(defineJestParameter({ fileName: 1234 })).toBeNull();
});
});
4 changes: 2 additions & 2 deletions code/addons/jest/src/shared.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Parameters } from '@storybook/types';
import type { StorybookInternalParameters } from '@storybook/types';

// addons, panels and events get unique names using a prefix
export const PARAM_KEY = 'test';
Expand All @@ -7,7 +7,7 @@ export const PANEL_ID = `${ADDON_ID}/panel`;

export const ADD_TESTS = `${ADDON_ID}/add_tests`;

interface AddonParameters extends Parameters {
interface AddonParameters extends StorybookInternalParameters {
jest?: string | string[] | { disabled: true };
}

Expand Down