Add account browsing simulation
This commit is contained in:
1 parent
e2d7dc4b82
commit
27012399ec
31 files changed
+1476
-28
No files matched your search
@@ -10,7 +10,7 @@ import type { RedditPost } from '../src/reddit/api.js';
|
||||
const ACCOUNT = '@t2_grower:reddit.com';
|
||||
const OTHER_ACCOUNT = '@t2_other:reddit.com';
|
||||
/** Migrations that make up account growth, replayed together in the upgrade test. */
|
||||
const GROWTH_MIGRATION_COUNT = 2;
|
||||
const GROWTH_MIGRATION_COUNT = 3;
|
||||
|
||||
function thread(id: string, overrides: Partial<RedditPost> = {}): RedditPost {
|
||||
return {
|
||||
@@ -536,7 +536,9 @@ describe('growth migration', () => {
|
||||
runMigrations(db);
|
||||
const version = db.pragma('user_version', { simple: true }) as number;
|
||||
db.exec('ALTER TABLE account_growth_settings DROP COLUMN daily_limit');
|
||||
db.pragma(`user_version = ${version - 1}`);
|
||||
// Browsing simulation is the migration after the growth daily-limit
|
||||
// column, so rewind both to replay the real upgrade sequence.
|
||||
db.pragma(`user_version = ${version - 2}`);
|
||||
insertAccount(db, ACCOUNT);
|
||||
// Seed a row with the old shape so the upgrade runs against real data.
|
||||
db.prepare(`
|
||||
|
||||
Reference in new issue
Block a user