Skip to content

Commit

Permalink
Merge pull request #11717 from storybookjs/misc/cleanup
Browse files Browse the repository at this point in the history
Misc cleanup
  • Loading branch information
ndelangen authored Jul 29, 2020
2 parents 9d2b53d + 7e5c832 commit 820dddd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
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

0 comments on commit 820dddd

Please sign in to comment.