mirror of
https://github.com/laurent22/joplin.git
synced 2026-06-18 20:16:34 +02:00
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
22 lines
571 B
TypeScript
22 lines
571 B
TypeScript
import { setupDatabaseAndSynchronizer, switchClient } from './testing/test-utils';
|
|
import BaseModel from './BaseModel';
|
|
|
|
describe('database', () => {
|
|
beforeEach(async () => {
|
|
await setupDatabaseAndSynchronizer(1);
|
|
await switchClient(1);
|
|
});
|
|
|
|
it('should not modify cached field names', (async () => {
|
|
const db = BaseModel.db();
|
|
|
|
const fieldNames = db.tableFieldNames('notes');
|
|
const fieldCount = fieldNames.length;
|
|
fieldNames.push('type_');
|
|
|
|
expect(fieldCount).toBeGreaterThan(0);
|
|
expect(db.tableFieldNames('notes').length).toBe(fieldCount);
|
|
}));
|
|
|
|
});
|