Skip to content

Commit

Permalink
fix chat context tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sejas committed Dec 18, 2024
1 parent aeb71eb commit 74f58c4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/hooks/tests/use-chat-context.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ describe( 'useChatContext hook', () => {
expect( getIpcApi().executeWPCLiInline ).toHaveBeenNthCalledWith( 1, {
siteId: SELECTED_SITE.id,
args: 'plugin list --format=json --status=active',
skipPluginsAndThemes: true,
} );
expect( getIpcApi().executeWPCLiInline ).toHaveBeenNthCalledWith( 2, {
siteId: SELECTED_SITE.id,
args: 'theme list --format=json',
skipPluginsAndThemes: true,
} );
expect( getIpcApi().executeWPCLiInline ).toHaveBeenCalledTimes( 2 );
} );
Expand Down Expand Up @@ -234,10 +236,12 @@ describe( 'useChatContext hook', () => {
expect( getIpcApi().executeWPCLiInline ).toHaveBeenNthCalledWith( 1, {
siteId: ANOTHER_SITE.id,
args: 'plugin list --format=json --status=active',
skipPluginsAndThemes: true,
} );
expect( getIpcApi().executeWPCLiInline ).toHaveBeenNthCalledWith( 2, {
siteId: ANOTHER_SITE.id,
args: 'theme list --format=json',
skipPluginsAndThemes: true,
} );
expect( getIpcApi().executeWPCLiInline ).toHaveBeenCalledTimes( 2 );
} );
Expand Down Expand Up @@ -288,10 +292,12 @@ describe( 'useChatContext hook', () => {
expect( getIpcApi().executeWPCLiInline ).toHaveBeenNthCalledWith( 1, {
siteId: SELECTED_SITE.id,
args: 'plugin list --format=json --status=active',
skipPluginsAndThemes: true,
} );
expect( getIpcApi().executeWPCLiInline ).toHaveBeenNthCalledWith( 2, {
siteId: SELECTED_SITE.id,
args: 'theme list --format=json',
skipPluginsAndThemes: true,
} );
expect( getIpcApi().executeWPCLiInline ).toHaveBeenCalledTimes( 2 );
} );
Expand Down Expand Up @@ -391,10 +397,12 @@ describe( 'useChatContext hook', () => {
expect( getIpcApi().executeWPCLiInline ).toHaveBeenNthCalledWith( 1, {
siteId: NEW_SITE.id,
args: 'plugin list --format=json --status=active',
skipPluginsAndThemes: true,
} );
expect( getIpcApi().executeWPCLiInline ).toHaveBeenNthCalledWith( 2, {
siteId: NEW_SITE.id,
args: 'theme list --format=json',
skipPluginsAndThemes: true,
} );
expect( getIpcApi().executeWPCLiInline ).toHaveBeenCalledTimes( 2 );
} );
Expand Down Expand Up @@ -436,10 +444,12 @@ describe( 'useChatContext hook', () => {
expect( getIpcApi().executeWPCLiInline ).toHaveBeenNthCalledWith( 1, {
siteId: SELECTED_SITE.id,
args: 'plugin list --format=json --status=active',
skipPluginsAndThemes: true,
} );
expect( getIpcApi().executeWPCLiInline ).toHaveBeenNthCalledWith( 2, {
siteId: SELECTED_SITE.id,
args: 'theme list --format=json',
skipPluginsAndThemes: true,
} );
expect( getIpcApi().executeWPCLiInline ).toHaveBeenCalledTimes( 2 );
} );
Expand Down

0 comments on commit 74f58c4

Please sign in to comment.