diff --git a/lib/client-api/src/storySort.test.ts b/lib/client-api/src/storySort.test.ts index 74fc0ef990dc..ff9a06468b28 100644 --- a/lib/client-api/src/storySort.test.ts +++ b/lib/client-api/src/storySort.test.ts @@ -1,4 +1,4 @@ -import storySort from './storySort'; +import { storySort } from './storySort'; describe('preview.storySort', () => { const fixture = { diff --git a/lib/client-api/src/storySort.ts b/lib/client-api/src/storySort.ts index a782ab5184a7..f7c167277a3f 100644 --- a/lib/client-api/src/storySort.ts +++ b/lib/client-api/src/storySort.ts @@ -1,6 +1,6 @@ import { StorySortObjectParameter, Comparator } from '@storybook/addons'; -const storySort = (options: StorySortObjectParameter = {}): Comparator => ( +export const storySort = (options: StorySortObjectParameter = {}): Comparator => ( a: any, b: any ): number => { @@ -73,5 +73,3 @@ const storySort = (options: StorySortObjectParameter = {}): Comparator => ( /* istanbul ignore next */ return 0; }; - -export default storySort; diff --git a/lib/client-api/src/story_store.ts b/lib/client-api/src/story_store.ts index d7e73ba86696..7eb0464644d2 100644 --- a/lib/client-api/src/story_store.ts +++ b/lib/client-api/src/story_store.ts @@ -32,7 +32,7 @@ import { StoreSelection, } from './types'; import { HooksContext } from './hooks'; -import storySort from './storySort'; +import { storySort } from './storySort'; import { combineParameters } from './parameters'; import { inferArgTypes } from './inferArgTypes'; @@ -387,12 +387,12 @@ export default class StoryStore { const __isArgsStory = passArgsFirst && original.length > 0; const { argTypes = {} } = this._argTypesEnhancers.reduce( - (accumlatedParameters: Parameters, enhancer) => ({ - ...accumlatedParameters, + (accumulatedParameters: Parameters, enhancer) => ({ + ...accumulatedParameters, argTypes: enhancer({ ...identification, storyFn: original, - parameters: accumlatedParameters, + parameters: accumulatedParameters, args: {}, argTypes: {}, globals: {},