Norbert de Langen c8cf5a567b
rename
2021-02-04 13:31:31 +01:00

22 lines
598 B
TypeScript

import { filterPresetsConfig } from './config';
describe('filterPresetsConfig', () => {
it('string config', () => {
expect(
filterPresetsConfig(['@storybook/preset-scss', '@storybook/preset-typescript'])
).toEqual(['@storybook/preset-scss']);
});
it('windows paths', () => {
expect(filterPresetsConfig(['a', '@storybook\\preset-typescript'])).toEqual(['a']);
});
it('object config', () => {
const tsConfig = {
name: '@storybook/preset-typescript',
options: { foo: 1 },
};
expect(filterPresetsConfig([tsConfig, 'a'])).toEqual(['a']);
});
});