release: v0.6.0 — 完全移除 IndexedDB,自研 KVStore 事务存储引擎(多key原子写/快照日志恢复/CRC自愈)+ KVStoreEngine + 旧库迁移工具 + 10万级压力验证 + 崩溃注入e2e
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
*/
|
||||
|
||||
import { MetonaSqlark } from '../src/core';
|
||||
import 'fake-indexeddb/auto';
|
||||
|
||||
let idbCounter = 0;
|
||||
|
||||
@@ -128,7 +127,7 @@ describe('v0.1.13 事务回滚 — Disk 模式 (IndexedDB)', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
dbName = `tx-disk-${++idbCounter}`;
|
||||
db = new MetonaSqlark({ name: dbName, mode: 'disk', diskEngine: 'indexeddb' });
|
||||
db = new MetonaSqlark({ name: dbName, mode: 'disk', diskEngine: 'opfs' });
|
||||
await db.init();
|
||||
await db.defineTable('users', {
|
||||
id: { type: 'string', primaryKey: true },
|
||||
@@ -138,7 +137,6 @@ describe('v0.1.13 事务回滚 — Disk 模式 (IndexedDB)', () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await db.close();
|
||||
try { indexedDB.deleteDatabase(dbName); } catch {}
|
||||
});
|
||||
|
||||
it('commit: 事务成功数据持久化', async () => {
|
||||
@@ -175,7 +173,7 @@ describe('v0.1.13 事务回滚 — Hybrid 模式', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
dbName = `tx-hybrid-${++idbCounter}`;
|
||||
db = new MetonaSqlark({ name: dbName, mode: 'hybrid', diskEngine: 'indexeddb' });
|
||||
db = new MetonaSqlark({ name: dbName, mode: 'hybrid', diskEngine: 'opfs' });
|
||||
await db.init();
|
||||
await db.defineTable('users', {
|
||||
id: { type: 'string', primaryKey: true },
|
||||
@@ -185,7 +183,6 @@ describe('v0.1.13 事务回滚 — Hybrid 模式', () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await db.close();
|
||||
try { indexedDB.deleteDatabase(dbName); } catch {}
|
||||
});
|
||||
|
||||
it('commit: 事务成功', async () => {
|
||||
|
||||
Reference in New Issue
Block a user