Skip to content

Commit

Permalink
Try using Jest mocks for bumpStat (not working)
Browse files Browse the repository at this point in the history
  • Loading branch information
nylen committed Aug 4, 2017
1 parent 1643b98 commit f93e5d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/enable-tracking-prompt/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {
} from '../';

describe( 'EnableTrackingPrompt', () => {
jest.mock( '@wordpress/utils/tracking' );

const originalSetUserSetting = window.setUserSetting;
const originalDocumentAddEventListener = document.addEventListener;
let eventMap = {};
Expand Down
5 changes: 5 additions & 0 deletions utils/__mocks__/tracking.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const tracking = jest.genMockFromModule( '../tracking' );

console.log( { tracking } );

module.exports = tracking;

0 comments on commit f93e5d7

Please sign in to comment.