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

Misc cleanup #11717

Merged
merged 1 commit into from
Jul 29, 2020
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
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