2021-05-21 15:17:21 +02:00
|
|
|
const { afterEachCleanUp } = require('@joplin/lib/testing/test-utils.js');
|
|
|
|
const { shimInit } = require('@joplin/lib/shim-init-node.js');
|
|
|
|
const shim = require('@joplin/lib/shim').default;
|
|
|
|
const sharp = require('sharp');
|
2021-10-01 20:35:27 +02:00
|
|
|
const nodeSqlite = require('sqlite3');
|
2021-05-21 15:17:21 +02:00
|
|
|
|
|
|
|
let keytar;
|
|
|
|
try {
|
|
|
|
keytar = shim.platformSupportsKeyChain() ? require('keytar') : null;
|
|
|
|
} catch (error) {
|
|
|
|
console.error('Cannot load keytar - keychain support will be disabled', error);
|
|
|
|
keytar = null;
|
|
|
|
}
|
|
|
|
|
2021-10-01 20:35:27 +02:00
|
|
|
shimInit({ sharp, keytar, nodeSqlite });
|
2020-11-10 17:59:30 +02:00
|
|
|
|
|
|
|
global.afterEach(async () => {
|
|
|
|
await afterEachCleanUp();
|
|
|
|
});
|