@happyvertical/smrt-vitest 0.40.49 → 0.40.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +12 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/setup.js +17 -3
- package/dist/setup.js.map +1 -1
- package/dist/sqlite-schema-template.d.ts +24 -0
- package/dist/sqlite-schema-template.d.ts.map +1 -1
- package/dist/sqlite-schema-template.js +46 -0
- package/dist/sqlite-schema-template.js.map +1 -1
- package/dist/test-db.d.ts.map +1 -1
- package/dist/test-db.js +5 -1
- package/dist/test-db.js.map +1 -1
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -79,6 +79,18 @@ build, and every test still receives its own database file and transaction.
|
|
|
79
79
|
Existing non-empty database files are never replaced. PostgreSQL, DuckDB, JSON,
|
|
80
80
|
remote libSQL, and in-memory SQLite retain their normal preparation paths.
|
|
81
81
|
|
|
82
|
+
Local file-backed SQLite test databases also run without durability
|
|
83
|
+
(`synchronous=OFF`, `journal_mode=MEMORY`, `temp_store=MEMORY`, #2221): test
|
|
84
|
+
databases are throwaway, and SQLite's default 2-3 fsyncs per transaction
|
|
85
|
+
turned fsync-heavy suites into 60s-timeout failures on CI runners with slow
|
|
86
|
+
disks (9.5 ms/fsync measured on the metal fleet). Applied best-effort, once
|
|
87
|
+
per handle, in two places: the setup file's `getDatabase` mock and the
|
|
88
|
+
isolated test-db factories (whose internal schema-preparation skip bypasses
|
|
89
|
+
the mock). Other engines are untouched. Do not "fix" a durability-shaped
|
|
90
|
+
test by removing this — a test that needs real fsync semantics should open
|
|
91
|
+
its database with `getDatabase` + `__smrtSkipVitestSchemaPreparation`
|
|
92
|
+
directly, which stays fully vanilla.
|
|
93
|
+
|
|
82
94
|
```typescript
|
|
83
95
|
let db, cleanup;
|
|
84
96
|
beforeEach(async () => {
|