mirror of
https://github.com/zadam/trilium.git
synced 2026-07-25 13:20:26 +02:00
Revert "chore(core): set up basic vitest"
This reverts commit c7cf8d5255.
This commit is contained in:
@@ -3,7 +3,7 @@ import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig(() => ({
|
||||
root: __dirname,
|
||||
cacheDir: '../../node_modules/.vite/packages/trilium-core',
|
||||
cacheDir: '../../node_modules/.vite/apps/server',
|
||||
plugins: [],
|
||||
test: {
|
||||
watch: false,
|
||||
@@ -16,6 +16,9 @@ export default defineConfig(() => ({
|
||||
TRILIUM_INTEGRATION_TEST: "memory"
|
||||
},
|
||||
include: ['{src,spec}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
||||
exclude: [
|
||||
"spec/build-checks/**",
|
||||
],
|
||||
hookTimeout: 20_000,
|
||||
testTimeout: 40_000,
|
||||
reporters: [
|
||||
@@ -4,8 +4,7 @@
|
||||
"description": "",
|
||||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
"test": "vitest",
|
||||
"coverage": "vitest --coverage"
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@braintree/sanitize-url": "7.1.1",
|
||||
@@ -22,7 +21,6 @@
|
||||
"devDependencies": {
|
||||
"@types/escape-html": "1.0.4",
|
||||
"@types/mime-types": "3.0.1",
|
||||
"@types/sanitize-html": "2.16.1",
|
||||
"vite": "8.0.2"
|
||||
"@types/sanitize-html": "2.16.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
import { beforeAll } from "vitest";
|
||||
import i18next from "i18next";
|
||||
import { join } from "path";
|
||||
import { setDayjsLocale } from "@triliumnext/commons";
|
||||
|
||||
// Initialize environment variables.
|
||||
process.env.TRILIUM_DATA_DIR = join(__dirname, "../../apps/server/spec/db");
|
||||
process.env.TRILIUM_RESOURCE_DIR = join(__dirname, "../src");
|
||||
process.env.TRILIUM_INTEGRATION_TEST = "memory";
|
||||
process.env.TRILIUM_ENV = "dev";
|
||||
process.env.TRILIUM_PUBLIC_SERVER = "http://localhost:4200";
|
||||
|
||||
beforeAll(async () => {
|
||||
// Initialize the translations manually to avoid any side effects.
|
||||
const Backend = (await import("i18next-fs-backend")).default;
|
||||
|
||||
// Initialize translations
|
||||
await i18next.use(Backend).init({
|
||||
lng: "en",
|
||||
fallbackLng: "en",
|
||||
ns: "server",
|
||||
backend: {
|
||||
loadPath: join(__dirname, "../src/assets/translations/{{lng}}/{{ns}}.json")
|
||||
},
|
||||
showSupportNotice: false
|
||||
});
|
||||
|
||||
// Initialize dayjs
|
||||
await setDayjsLocale("en");
|
||||
});
|
||||
9
pnpm-lock.yaml
generated
9
pnpm-lock.yaml
generated
@@ -1738,9 +1738,6 @@ importers:
|
||||
'@types/sanitize-html':
|
||||
specifier: 2.16.1
|
||||
version: 2.16.1
|
||||
vite:
|
||||
specifier: 8.0.2
|
||||
version: 8.0.2(@types/node@24.12.0)(esbuild@0.27.4)(jiti@2.6.1)(less@4.1.3)(sass-embedded@1.91.0)(sass@1.91.0)(terser@5.44.0)(tsx@4.21.0)(yaml@2.8.2)
|
||||
|
||||
packages/turndown-plugin-gfm:
|
||||
devDependencies:
|
||||
@@ -17279,8 +17276,6 @@ snapshots:
|
||||
'@ckeditor/ckeditor5-utils': 47.6.1
|
||||
'@ckeditor/ckeditor5-widget': 47.6.1
|
||||
es-toolkit: 1.39.5
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@ckeditor/ckeditor5-cloud-services@47.6.1':
|
||||
dependencies:
|
||||
@@ -17871,6 +17866,8 @@ snapshots:
|
||||
'@ckeditor/ckeditor5-utils': 47.6.1
|
||||
ckeditor5: 47.6.1
|
||||
es-toolkit: 1.39.5
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@ckeditor/ckeditor5-merge-fields@47.6.1':
|
||||
dependencies:
|
||||
@@ -25680,6 +25677,8 @@ snapshots:
|
||||
ckeditor5-collaboration@47.6.1:
|
||||
dependencies:
|
||||
'@ckeditor/ckeditor5-collaboration-core': 47.6.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
ckeditor5-premium-features@47.6.1(bufferutil@4.0.9)(ckeditor5@47.6.1)(utf-8-validate@6.0.5):
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user