Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur791004 committed Sep 30, 2024
1 parent 4ee5515 commit f700b1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 176 deletions.
175 changes: 0 additions & 175 deletions client/my-sites/themes/test/thanks-modal.jsx

This file was deleted.

10 changes: 9 additions & 1 deletion client/state/themes/test/actions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Importing `jest-fetch-mock` adds a jest-friendly `fetch` polyfill to the global scope.
import 'jest-fetch-mock';
import ThemeQueryManager from 'calypso/lib/query-manager/theme';
import { SITE_REQUEST } from 'calypso/state/action-types';
import {
ACTIVE_THEME_REQUEST,
ACTIVE_THEME_REQUEST_SUCCESS,
Expand Down Expand Up @@ -1167,7 +1168,7 @@ describe( 'actions', () => {

test( 'should dispatch success', () => {
return initiateThemeTransfer( siteId )( spy ).then( () => {
expect( spy ).toHaveBeenCalledTimes( 3 );
expect( spy ).toHaveBeenCalledTimes( 4 );

expect( spy ).toHaveBeenCalledWith(
expect.objectContaining( {
Expand All @@ -1186,6 +1187,13 @@ describe( 'actions', () => {
} )
);

expect( spy ).toHaveBeenCalledWith(
expect.objectContaining( {
type: SITE_REQUEST,
siteId,
} )
);

expect( spy ).toHaveBeenCalledWith( expect.any( Function ) );
} );
} );
Expand Down

0 comments on commit f700b1a

Please sign in to comment.