mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
5fed1955a9
* trying rematch refactor: rematch for store packages migrate login to rematch Update packages/plugins/ui-theme/src/store/store.ts Co-authored-by: Sergio Moreno <sergiomorenoalbert@gmail.com> hide temporary fix test for login migrate package download resource fix tests * add missing fixture * migrate detail page support * fix tests * migrate search * migrate search * clean up tests * remove tags * fix lint * add changeset * fix: search model typings * add type * types * apply suggestions Co-authored-by: Sergio Moreno <22656541+semoal@users.noreply.github.com>
31 lines
936 B
TypeScript
31 lines
936 B
TypeScript
/**
|
|
* Setup configuration for Jest
|
|
* This file includes global settings for the JEST environment.
|
|
*/
|
|
import 'mutationobserver-shim';
|
|
|
|
// @ts-ignore : Property '__VERDACCIO_BASENAME_UI_OPTIONS' does not exist on type 'Global'.
|
|
global.__VERDACCIO_BASENAME_UI_OPTIONS = {
|
|
base: 'http://localhost:9000/',
|
|
protocol: 'http',
|
|
host: 'localhost',
|
|
primaryColor: '#4b5e40',
|
|
url_prefix: '',
|
|
darkMode: false,
|
|
language: 'en-US',
|
|
uri: 'http://localhost:9000/',
|
|
pkgManagers: ['pnpm', 'yarn', 'npm'],
|
|
title: 'Verdaccio Dev UI',
|
|
scope: '',
|
|
version: 'v1.0.0',
|
|
};
|
|
|
|
// mocking few DOM methods
|
|
// @ts-ignore : Property 'document' does not exist on type 'Global'.
|
|
if (global.document) {
|
|
// @ts-ignore : Type 'Mock<{ selectNodeContents: () => void; }, []>' is not assignable to type '() => Range'.
|
|
document.createRange = jest.fn((): void => ({
|
|
selectNodeContents: (): void => {},
|
|
}));
|
|
document.execCommand = jest.fn();
|
|
}
|