Skip to content

Commit

Permalink
Skip core-presets test until we get a new example
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Oct 11, 2022
1 parent ded39dd commit 5943ae7
Showing 1 changed file with 34 additions and 29 deletions.
63 changes: 34 additions & 29 deletions code/lib/core-server/src/core-presets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,35 +177,40 @@ const prepareSnap = (get: any, name): Pick<Configuration, 'module' | 'entry' | '
const snap = (name: string) => `__snapshots__/${name}`;

// FIXME: we no longer have test cases
describe.each([[]])('%s', (example) => {
describe.each([
['manager', managerExecutor],
['preview', previewExecutor],
])('%s', (component, executor) => {
beforeEach(async () => {
jest.clearAllMocks();
await cache.clear();
});

it.each([
['prod', buildStaticStandalone],
['dev', buildDevStandalone],
])('%s', async (mode, builder) => {
const options = {
...baseOptions,
configDir: path.resolve(`${__dirname}/../../../examples/${example}/.storybook`),
// Only add an outputDir in production mode.
outputDir:
mode === 'prod' ? await mkdtemp(path.join(os.tmpdir(), 'storybook-static-')) : undefined,
ignorePreview: component === 'manager',
managerCache: component === 'preview',
packageJson,
};
await builder(options);
const config = prepareSnap(executor.get, component);
expect(config).toMatchSpecificSnapshot(
snap(`${example}_${component}-${mode}-${SNAPSHOT_OS}`)
);
// eslint-disable-next-line jest/no-disabled-tests
describe.skip('FIXME', () => {
describe.each([[]])('%s', (example) => {
describe.each([
['manager', managerExecutor],
['preview', previewExecutor],
])('%s', (component, executor) => {
beforeEach(async () => {
jest.clearAllMocks();
await cache.clear();
});

it.each([
['prod', buildStaticStandalone],
['dev', buildDevStandalone],
])('%s', async (mode, builder) => {
const options = {
...baseOptions,
configDir: path.resolve(`${__dirname}/../../../examples/${example}/.storybook`),
// Only add an outputDir in production mode.
outputDir:
mode === 'prod'
? await mkdtemp(path.join(os.tmpdir(), 'storybook-static-'))
: undefined,
ignorePreview: component === 'manager',
managerCache: component === 'preview',
packageJson,
};
await builder(options);
const config = prepareSnap(executor.get, component);
expect(config).toMatchSpecificSnapshot(
snap(`${example}_${component}-${mode}-${SNAPSHOT_OS}`)
);
});
});
});
});
Expand Down

0 comments on commit 5943ae7

Please sign in to comment.