1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-12 08:54:00 +02:00
joplin/packages/app-desktop/jest.setup.js
Henry Heino a0ec928fca
Merge pull request from GHSA-m59c-9rrj-c399
* Sanitize HTML in processPastedHtml

* Add test
2023-07-27 15:41:57 +01:00

20 lines
544 B
JavaScript

const { default: Logger, TargetType } = require('@joplin/lib/Logger');
// TODO: Some libraries required by test-utils.js seem to fail to import with the
// jsdom environment.
//
// Thus, require('@joplin/lib/testing/test-utils.js') fails and some setup must be
// copied.
const logger = new Logger();
logger.addTarget(TargetType.Console);
logger.setLevel(Logger.LEVEL_WARN);
Logger.initializeGlobalLogger(logger);
// @electron/remote requires electron to be running. Mock it.
jest.mock('@electron/remote', () => {
return { require };
});