1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-06 09:19:22 +02:00

Refactored handling of multiple sync targets

This commit is contained in:
Laurent Cozic
2017-07-24 18:01:40 +00:00
parent 04cd9a1e7b
commit 0f95e97d19
18 changed files with 630 additions and 581 deletions

View File

@@ -17,8 +17,6 @@ process.on('unhandledRejection', (reason, p) => {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 9000; // The first test is slow because the database needs to be built
const syncTargetId = Database.enumId('syncTarget', 'memory');
async function allItems() {
let folders = await Folder.all();
let notes = await Note.all();

View File

@@ -29,7 +29,8 @@ Resource.fsDriver_ = fsDriver;
const logDir = __dirname + '/../tests/logs';
fs.mkdirpSync(logDir, 0o755);
const syncTarget = 'filesystem';
//const syncTarget = 'filesystem';
const syncTarget = 'memory';
const syncDir = __dirname + '/../tests/sync';
const logger = new Logger();
@@ -46,8 +47,7 @@ Setting.setConstant('appId', 'net.cozic.joplin-cli');
Setting.setConstant('appType', 'cli');
function syncTargetId() {
return JoplinDatabase.enumId('syncTarget', 'filesystem');
//return JoplinDatabase.enumId('syncTarget', 'memory');
return JoplinDatabase.enumId('syncTarget', syncTarget);
}
function sleep(n) {