MCPcopy Create free account
hub / github.com/dailydotdev/apps / load

Function load

packages/shared/src/features/patchy/patchyConfig.spec.ts:89–102  ·  view source on GitHub ↗
(
    faces?: { face: string; image: string }[],
  )

Source from the content-addressed store, hash-verified

87
88describe('isPatchyFaceAnimated', () => {
89 const load = (
90 faces?: { face: string; image: string }[],
91 ): typeof PatchyConfigModule => {
92 localStorage.setItem('patchy_config', JSON.stringify({ faces }));
93 let loaded: typeof PatchyConfigModule | undefined;
94 jest.isolateModules(() => {
95 // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
96 loaded = require('./patchyConfig');
97 });
98 if (!loaded) {
99 throw new Error('patchyConfig did not load');
100 }
101 return loaded;
102 };
103
104 afterEach(() => localStorage.clear());
105

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected