Skip to content

Commit

Permalink
Fix tests and sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Oct 12, 2023
1 parent 1e9f59d commit 168327a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node-src/lib/uploadMetadataFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { withFile } from 'tmp-promise';
import { STORYBOOK_BUILD_LOG_FILE } from '../tasks/build';
import { Context, FileDesc } from '../types';
import getMetadataHtml from '../ui/html/metadata.html';
import uploadingMetadata from '../ui/messages/info/uploadingMetadata';
import { findStorybookConfigFile } from './getStorybookMetadata';
import { CHROMATIC_LOG_FILE } from './log';
import { uploadAsIndividualFiles } from './upload';
import { CHROMATIC_DIAGNOSTICS_FILE } from './writeChromaticDiagnostics';
import uploadingMetadata from '../ui/messages/info/uploadingMetadata';
import { baseStorybookUrl } from './utils';
import { CHROMATIC_DIAGNOSTICS_FILE } from './writeChromaticDiagnostics';

const fileSize = (path: string): Promise<number> =>
new Promise((resolve) => stat(path, (err, stats) => resolve(err ? 0 : stats.size)));
Expand Down
4 changes: 4 additions & 0 deletions node-src/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,12 +441,14 @@ it('calls out to npm build script passed and uploads files', async () => {
contentLength: 42,
contentType: 'text/html',
localPath: expect.stringMatching(/\/iframe\.html$/),
targetPath: 'iframe.html',
targetUrl: 'https://cdn.example.com/iframe.html',
},
{
contentLength: 42,
contentType: 'text/html',
localPath: expect.stringMatching(/\/index\.html$/),
targetPath: 'index.html',
targetUrl: 'https://cdn.example.com/index.html',
},
],
Expand All @@ -466,12 +468,14 @@ it('skips building and uploads directly with storybook-build-dir', async () => {
contentLength: 42,
contentType: 'text/html',
localPath: expect.stringMatching(/\/iframe\.html$/),
targetPath: 'iframe.html',
targetUrl: 'https://cdn.example.com/iframe.html',
},
{
contentLength: 42,
contentType: 'text/html',
localPath: expect.stringMatching(/\/index\.html$/),
targetPath: 'index.html',
targetUrl: 'https://cdn.example.com/index.html',
},
],
Expand Down

0 comments on commit 168327a

Please sign in to comment.