Skip to content
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
Misc cleanup
  • Loading branch information
shilman committed Jul 29, 2020
commit 7e5c8323e4e6c85eadfafc6dfdd8f06d8b3daed0
2 changes: 1 addition & 1 deletion lib/client-api/src/storySort.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import storySort from './storySort';
import { storySort } from './storySort';

describe('preview.storySort', () => {
const fixture = {
Expand Down
4 changes: 1 addition & 3 deletions lib/client-api/src/storySort.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StorySortObjectParameter, Comparator } from '@storybook/addons';

const storySort = (options: StorySortObjectParameter = {}): Comparator<any> => (
export const storySort = (options: StorySortObjectParameter = {}): Comparator<any> => (
a: any,
b: any
): number => {
Expand Down Expand Up @@ -73,5 +73,3 @@ const storySort = (options: StorySortObjectParameter = {}): Comparator<any> => (
/* istanbul ignore next */
return 0;
};

export default storySort;
8 changes: 4 additions & 4 deletions lib/client-api/src/story_store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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: {},
Expand Down