mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-12 08:54:00 +02:00
a0ec928fca
* Sanitize HTML in processPastedHtml * Add test
20 lines
544 B
JavaScript
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 };
|
|
});
|