import { strictEqual } from 'assert' ; import { readFileSync } from 'fs' ; export const testFilePath = ( id ) => `./test-tmp/${ id }.csv` ; export const assertFile = ( path , expectedContents , encoding ? ) => { const actualContents = readFileSync ( path , encoding ?? 'utf8' ) ; strictEqual ( actualContents , expectedContents ) ; } ; export const assertRejected = ( p , message ) => { return p . then ( ( ) => new Error ( 'Should not have been called' ) , ( e ) => { strictEqual ( e . message , message ) ; } ) ; } ;