Files
obsidian-livesync/vitest.config.unit.ts
vorotamoroz e08fbbd223 ### Fixed and refactored
- Fixed the inexplicable behaviour when retrieving chunks from the network.
    - Chunk manager has been layered to responsible its own areas and duties. e.g., `DatabaseWriteLayer`, `DatabaseReadLayer`, `NetworkLayer`, `CacheLayer`,and `ArrivalWaitLayer`.
        - All layers have test now!
        - `LayeredChunkManager` has been implemented to manage these layers. Also tested.
    - `EntryManager` has been mostly rewritten, and also tested.

- Now we can configure `Never warn` for remote storage size notification, again.
2026-02-27 11:00:30 +00:00

34 lines
1.0 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: {
name: "unit-tests",
include: ["**/*unit.test.ts", "**/*.unit.spec.ts"],
exclude: ["test/**"],
coverage: {
include: ["src/**/*.ts"],
exclude: [
"**/*.test.ts",
"src/lib/**/*.test.ts",
"**/_*",
"src/lib/apps",
"src/lib/src/cli",
"**/*_obsolete.ts",
...importOnlyFiles,
],
provider: "v8",
reporter: ["text", "json", "html"],
},
},
})
);