fix: test case

This commit is contained in:
DarkSky
2024-08-24 02:18:23 +08:00
parent 1e1a9552c0
commit c28ef3189c
5 changed files with 18 additions and 18 deletions
@@ -1,5 +1,3 @@
import { randomUUID } from 'node:crypto';
import { TestingModule } from '@nestjs/testing';
import type { Snapshot } from '@prisma/client';
import { PrismaClient } from '@prisma/client';
@@ -50,6 +48,8 @@ const snapshot: Snapshot = {
seq: 0,
updatedAt: new Date(),
createdAt: new Date(),
createdBy: null,
updatedBy: null,
};
function getSnapshot(timestamp: number = Date.now()): DocRecord {
@@ -264,7 +264,7 @@ test('should be able to recover from history', async t => {
await adapter.createDocHistory(getSnapshot(history1Timestamp));
await adapter.rollbackDoc(
randomUUID(),
undefined,
snapshot.workspaceId,
snapshot.id,
history1Timestamp