MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / configureBrowser

Function configureBrowser

core/src/utils/test/platform.utils.ts:1–10  ·  view source on GitHub ↗
(config: any, win: any = Object.create(window))

Source from the content-addressed store, hash-verified

1export const configureBrowser = (config: any, win: any = Object.create(window)) => {
2 for (const attributeKey in config) {
3 // eslint-disable-next-line no-prototype-builtins
4 if (config.hasOwnProperty(attributeKey)) {
5 win[attributeKey] = config[attributeKey];
6 }
7 }
8
9 return win;
10};
11
12export const mockMatchMedia = (media: string[] = []) => {
13 return jest.fn().mockImplementation((query) => {

Callers 1

platform.spec.tsFile · 0.90

Calls 1

createMethod · 0.65

Tested by

no test coverage detected