mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 09:07:29 +02:00
refactor: improve internal typing (#6507)
* refactor: improve internal typing * fix * fix test
This commit is contained in:
parent
58e07a6796
commit
2553f1fb5a
14 changed files with 165 additions and 132 deletions
|
@ -249,7 +249,7 @@ describe('simple website', () => {
|
|||
.spyOn(cliDocs, 'cliDocsVersionCommand')
|
||||
.mockImplementation();
|
||||
const cli = new commander.Command();
|
||||
// @ts-expect-error: TODO annoying type incompatibility
|
||||
// @ts-expect-error: in actual usage, we pass the static commander instead of the new command
|
||||
plugin.extendCli!(cli);
|
||||
cli.parse(['node', 'test', 'docs:version', '1.0.0']);
|
||||
expect(mock).toHaveBeenCalledTimes(1);
|
||||
|
@ -373,7 +373,7 @@ describe('versioned website', () => {
|
|||
.spyOn(cliDocs, 'cliDocsVersionCommand')
|
||||
.mockImplementation();
|
||||
const cli = new commander.Command();
|
||||
// @ts-expect-error: TODO annoying type incompatibility
|
||||
// @ts-expect-error: in actual usage, we pass the static commander instead of the new command
|
||||
plugin.extendCli!(cli);
|
||||
cli.parse(['node', 'test', 'docs:version', '2.0.0']);
|
||||
expect(mock).toHaveBeenCalledTimes(1);
|
||||
|
@ -522,7 +522,7 @@ describe('versioned website (community)', () => {
|
|||
.spyOn(cliDocs, 'cliDocsVersionCommand')
|
||||
.mockImplementation();
|
||||
const cli = new commander.Command();
|
||||
// @ts-expect-error: TODO annoying type incompatibility
|
||||
// @ts-expect-error: in actual usage, we pass the static commander instead of the new command
|
||||
plugin.extendCli!(cli);
|
||||
cli.parse(['node', 'test', `docs:version:${pluginId}`, '2.0.0']);
|
||||
expect(mock).toHaveBeenCalledTimes(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue