All files / lib/jsdom/patch jsdom-globals.patch.ts

100% Statements 9/9
100% Branches 0/0
100% Functions 3/3
100% Lines 7/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22                  13x 13x 13x 13x 13x         13x 13x    
import { setupDocumentMocks } from '../document/document.mock';
import { setupExternalLibraryMocks } from '../external/external.mock';
import { setupGlobalMocks } from '../globals/globals.mock';
import { setupWindowMocks } from '../window/window.mock';
 
/**
 * Sets up  global mocks
 * which should be used in each app and lib in test-setup.ts files.
 */
export const setupJsdomGlobalMocks: () => void = () => {
  setupGlobalMocks();
  setupWindowMocks();
  setupDocumentMocks();
  setupExternalLibraryMocks();
 
  /**
   * Override some console methods for testing environment.
   */
  window.console.log = (): void => void 0;
  window.console.group = (): void => void 0;
};