Skip to content

Commit

Permalink
chore: code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorKarpiuk committed Jul 25, 2023
1 parent cbc7efc commit d06a09e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions packages/cli/src/__tests__/commands/build-docs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,10 @@ jest.mock('mkdirp', () => ({

describe('build-docs', () => {
it('should return correct html and call function for ssr', async () => {
const result = await getPageHTML(
{},
'../some-path/openapi.yaml',
{
...config,
redocCurrentVersion: '2.0.0',
},
undefined
);
const result = await getPageHTML({}, '../some-path/openapi.yaml', {
...config,
redocCurrentVersion: '2.0.0',
});
expect(renderToString).toBeCalledTimes(1);
expect(createStore).toBeCalledTimes(1);
expect(result).toBe('<html></html>');
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/build-docs/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export async function getPageHTML(
redocOptions = {},
redocCurrentVersion,
}: BuildDocsOptions,
configPath: string | undefined
configPath?: string
) {
process.stderr.write('Prerendering docs\n');

Expand Down

0 comments on commit d06a09e

Please sign in to comment.