import { knex } from "@src/setupDbTests" ; let _nextId = 0 ; /**
 * Re-create stable-ish test ids, but for our Joist internal-testing fixtures.
 *
 * (I.e. in tests for real applications, you'd just use the factories, which would
 * use the PostgresDriver's TestUuidAssigner).
 */ function nextId ( ) { return `20000000-0000-0000-0000-${ String ( _nextId ++ ) . padStart ( 12 , "0" ) }` ; } beforeEach ( ( ) => ( _nextId = 0 ) ) ; export async function insertAuthor ( row ) { await knex . insert ( { id : nextId ( ) , created_at : new Date ( ) , updated_at : new Date ( ) , ... row , } ) . into ( "authors" ) ; }