mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-06-04 05:22:58 +00:00
7d2ba1b0b9
- Database fetching (a.k.a. Reset Synchronisation on This Device) on the initialisation now supports streaming and is faster (CouchDB only) - The database fetching process has been streamlined, and database operations are now suspended until it has been completed - The initial synchronisation process has been simplified, making it easier to synchronise files with the remote server - We can select the remote database to fetch from during the initialisation, when there are multiple remote databases configured (e.g. multiple CouchDBs or S3 remotes)
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
import { defineConfig, mergeConfig } from "vitest/config";
|
|
import viteConfig from "./vitest.config.common";
|
|
|
|
const importOnlyFiles = ["**/encryption/encryptHKDF.ts"];
|
|
export default mergeConfig(
|
|
viteConfig,
|
|
defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
obsidian: "", // prevent accidental imports of obsidian types in unit tests,
|
|
},
|
|
},
|
|
test: {
|
|
logHeapUsage: true,
|
|
// maxConcurrency: 2,
|
|
name: "unit-tests",
|
|
include: ["**/*unit.test.ts", "**/*.unit.spec.ts"],
|
|
exclude: ["test/**", "src/apps/**"],
|
|
coverage: {
|
|
include: ["src/**/*.ts"],
|
|
exclude: [
|
|
"**/*.test.ts",
|
|
"**/*unit.test.ts",
|
|
"**/*.unit.spec.ts",
|
|
"test/**",
|
|
"src/lib/**/*.test.ts",
|
|
"**/_*",
|
|
"src/apps/**",
|
|
// "src/cli/**",
|
|
"src/lib/src/cli/**",
|
|
"**/*_obsolete.ts",
|
|
...importOnlyFiles,
|
|
],
|
|
provider: "v8",
|
|
reporter: ["text", "json", "html", ["text", { file: "coverage-text.txt" }]],
|
|
},
|
|
},
|
|
})
|
|
);
|