mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-22 23:31:48 +03:00
16 lines
495 B
TypeScript
16 lines
495 B
TypeScript
|
import assert from 'node:assert';
|
||
|
import { test } from 'node:test';
|
||
|
import { fileURLToPath } from 'node:url';
|
||
|
|
||
|
import { SqliteConnection, ValidationResult } from '../index';
|
||
|
|
||
|
test('db', { concurrency: false }, async t => {
|
||
|
await t.test('validate', async () => {
|
||
|
const path = fileURLToPath(
|
||
|
new URL('./fixtures/test01.affine', import.meta.url)
|
||
|
);
|
||
|
const result = await SqliteConnection.validate(path);
|
||
|
assert.equal(result, ValidationResult.MissingVersionColumn);
|
||
|
});
|
||
|
});
|